blob: 72751ed1f374e4a5f3a88d8ff2f8955a397443a3 [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
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530676OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200677PYTHON
678ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200679ac_ct_READELF
680READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000681ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200682ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000683AR
684RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000685USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000686GNULD
687LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000689RUNSHARED
690INSTSONAME
691LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000692PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100697MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000698BUILDEXEEXT
699EGREP
700GREP
701CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200702NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1345d202015-04-13 21:59:57 +0200715PLATDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000716SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200717_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000719FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800721FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000722FRAMEWORKALTINSTALLLAST
723FRAMEWORKALTINSTALLFIRST
724FRAMEWORKINSTALLLAST
725FRAMEWORKINSTALLFIRST
726PYTHONFRAMEWORKINSTALLDIR
727PYTHONFRAMEWORKPREFIX
728PYTHONFRAMEWORKDIR
729PYTHONFRAMEWORKIDENTIFIER
730PYTHONFRAMEWORK
731LIPO_32BIT_FLAGS
732ARCH_RUN_32BIT
733UNIVERSALSDK
734CONFIG_ARGS
735SOVERSION
736VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200737PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500746HAS_HG
747HGBRANCH
748HGTAG
749HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400750BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000751target_alias
752host_alias
753build_alias
754LIBS
755ECHO_T
756ECHO_N
757ECHO_C
758DEFS
759mandir
760localedir
761libdir
762psdir
763pdfdir
764dvidir
765htmldir
766infodir
767docdir
768oldincludedir
769includedir
770localstatedir
771sharedstatedir
772sysconfdir
773datadir
774datarootdir
775libexecdir
776sbindir
777bindir
778program_transform_name
779prefix
780exec_prefix
781PACKAGE_URL
782PACKAGE_BUGREPORT
783PACKAGE_STRING
784PACKAGE_VERSION
785PACKAGE_TARNAME
786PACKAGE_NAME
787PATH_SEPARATOR
788SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000789ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000790ac_user_opts='
791enable_option_checking
792enable_universalsdk
793with_universal_archs
794with_framework_name
795enable_framework
796with_gcc
797with_cxx_main
798with_suffix
799enable_shared
800enable_profiling
801with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100802with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100803with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_libs
805with_system_expat
806with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100807with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000808enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700809with_tcltk_includes
810with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_dbmliborder
812with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_threads
814with_thread
815enable_ipv6
816with_doc_strings
817with_tsc
818with_pymalloc
819with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_fpectl
821with_libm
822with_libc
823enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800825with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000826'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827 ac_precious_vars='build_alias
828host_alias
829target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100830MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831CC
832CFLAGS
833LDFLAGS
834LIBS
835CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100836CPP
837PKG_CONFIG
838PKG_CONFIG_PATH
839PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000843ac_init_help=
844ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000845ac_unrecognized_opts=
846ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# The variables have the same names as the options, with
848# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000849cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852no_recursion=
853prefix=NONE
854program_prefix=NONE
855program_suffix=NONE
856program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861x_includes=NONE
862x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000863
864# Installation directory options.
865# These are left unexpanded so users can "make install exec_prefix=/foo"
866# and all the variables that are supposed to be based on exec_prefix
867# by default will actually change.
868# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870bindir='${exec_prefix}/bin'
871sbindir='${exec_prefix}/sbin'
872libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873datarootdir='${prefix}/share'
874datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875sysconfdir='${prefix}/etc'
876sharedstatedir='${prefix}/com'
877localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878includedir='${prefix}/include'
879oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
881infodir='${datarootdir}/info'
882htmldir='${docdir}'
883dvidir='${docdir}'
884pdfdir='${docdir}'
885psdir='${docdir}'
886libdir='${exec_prefix}/lib'
887localedir='${datarootdir}/locale'
888mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000889
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 # If the previous option needs an argument, assign it.
895 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 ac_prev=
898 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200902 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
903 *=) ac_optarg= ;;
904 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Accept the important Cygnus configure options, so we can diagnose typos.
908
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 case $ac_dashdash$ac_option in
910 --)
911 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -bindir | --bindir | --bindi | --bind | --bin | --bi)
914 ac_prev=bindir ;;
915 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 -cache-file | --cache-file | --cache-fil | --cache-fi \
924 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
925 ac_prev=cache_file ;;
926 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
927 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 cache_file=$ac_optarg ;;
929
930 --config-cache | -C)
931 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000935 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000938 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
939 | --dataroo | --dataro | --datar)
940 ac_prev=datarootdir ;;
941 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
942 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
943 datarootdir=$ac_optarg ;;
944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000946 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000948 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200949 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000950 ac_useropt_orig=$ac_useropt
951 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
952 case $ac_user_opts in
953 *"
954"enable_$ac_useropt"
955"*) ;;
956 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
957 ac_unrecognized_sep=', ';;
958 esac
959 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960
961 -docdir | --docdir | --docdi | --doc | --do)
962 ac_prev=docdir ;;
963 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
964 docdir=$ac_optarg ;;
965
966 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
967 ac_prev=dvidir ;;
968 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
969 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000973 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200975 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000976 ac_useropt_orig=$ac_useropt
977 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
978 case $ac_user_opts in
979 *"
980"enable_$ac_useropt"
981"*) ;;
982 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
983 ac_unrecognized_sep=', ';;
984 esac
985 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
988 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
989 | --exec | --exe | --ex)
990 ac_prev=exec_prefix ;;
991 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
992 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
993 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000994 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
996 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000997 # Obsolete; use --with-gas.
998 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 -help | --help | --hel | --he | -h)
1001 ac_init_help=long ;;
1002 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1003 ac_init_help=recursive ;;
1004 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1005 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001012 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1013 ac_prev=htmldir ;;
1014 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1015 | --ht=*)
1016 htmldir=$ac_optarg ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -includedir | --includedir | --includedi | --included | --include \
1019 | --includ | --inclu | --incl | --inc)
1020 ac_prev=includedir ;;
1021 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1022 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -infodir | --infodir | --infodi | --infod | --info | --inf)
1026 ac_prev=infodir ;;
1027 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -libdir | --libdir | --libdi | --libd)
1031 ac_prev=libdir ;;
1032 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1036 | --libexe | --libex | --libe)
1037 ac_prev=libexecdir ;;
1038 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1039 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 -localedir | --localedir | --localedi | --localed | --locale)
1043 ac_prev=localedir ;;
1044 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1045 localedir=$ac_optarg ;;
1046
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001048 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 ac_prev=localstatedir ;;
1050 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001051 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1055 ac_prev=mandir ;;
1056 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 # Obsolete; use --without-fp.
1061 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065 no_create=yes ;;
1066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1068 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1069 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1072 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1073 | --oldin | --oldi | --old | --ol | --o)
1074 ac_prev=oldincludedir ;;
1075 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1076 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1077 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1081 ac_prev=prefix ;;
1082 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1086 | --program-pre | --program-pr | --program-p)
1087 ac_prev=program_prefix ;;
1088 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1089 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1093 | --program-suf | --program-su | --program-s)
1094 ac_prev=program_suffix ;;
1095 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1096 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-transform-name | --program-transform-name \
1100 | --program-transform-nam | --program-transform-na \
1101 | --program-transform-n | --program-transform- \
1102 | --program-transform | --program-transfor \
1103 | --program-transfo | --program-transf \
1104 | --program-trans | --program-tran \
1105 | --progr-tra | --program-tr | --program-t)
1106 ac_prev=program_transform_name ;;
1107 -program-transform-name=* | --program-transform-name=* \
1108 | --program-transform-nam=* | --program-transform-na=* \
1109 | --program-transform-n=* | --program-transform-=* \
1110 | --program-transform=* | --program-transfor=* \
1111 | --program-transfo=* | --program-transf=* \
1112 | --program-trans=* | --program-tran=* \
1113 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001116 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1117 ac_prev=pdfdir ;;
1118 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1119 pdfdir=$ac_optarg ;;
1120
1121 -psdir | --psdir | --psdi | --psd | --ps)
1122 ac_prev=psdir ;;
1123 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1124 psdir=$ac_optarg ;;
1125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1127 | -silent | --silent | --silen | --sile | --sil)
1128 silent=yes ;;
1129
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001130 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1131 ac_prev=sbindir ;;
1132 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1133 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135
1136 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1137 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1138 | --sharedst | --shareds | --shared | --share | --shar \
1139 | --sha | --sh)
1140 ac_prev=sharedstatedir ;;
1141 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1142 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1143 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1144 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001147 -site | --site | --sit)
1148 ac_prev=site ;;
1149 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151
Guido van Rossum7f43da71994-08-01 12:15:30 +00001152 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1153 ac_prev=srcdir ;;
1154 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1158 | --syscon | --sysco | --sysc | --sys | --sy)
1159 ac_prev=sysconfdir ;;
1160 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1161 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168
1169 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1170 verbose=yes ;;
1171
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 -version | --version | --versio | --versi | --vers | -V)
1173 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001179 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001180 ac_useropt_orig=$ac_useropt
1181 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1182 case $ac_user_opts in
1183 *"
1184"with_$ac_useropt"
1185"*) ;;
1186 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1187 ac_unrecognized_sep=', ';;
1188 esac
1189 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001195 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 --x)
1208 # Obsolete; use --with-x.
1209 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1212 | --x-incl | --x-inc | --x-in | --x-i)
1213 ac_prev=x_includes ;;
1214 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1215 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
1218 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1219 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1220 ac_prev=x_libraries ;;
1221 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1222 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1226Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227 ;;
1228
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 *=*)
1230 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1231 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 case $ac_envvar in #(
1233 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001236 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 export $ac_envvar ;;
1238
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001239 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001244 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
1247 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001248done
1249
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253fi
1254
Matthias Kloseb9621712010-04-24 17:59:49 +00001255if test -n "$ac_unrecognized_opts"; then
1256 case $enable_option_checking in
1257 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1260 esac
1261fi
1262
1263# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001264for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1265 datadir sysconfdir sharedstatedir localstatedir includedir \
1266 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1267 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001268do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 # Remove trailing slashes.
1271 case $ac_val in
1272 */ )
1273 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1274 eval $ac_var=\$ac_val;;
1275 esac
1276 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 [\\/$]* | ?:[\\/]* ) continue;;
1279 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001281 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001282done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# There might be people who depend on the old broken behavior: `$host'
1285# used to hold the argument of --host etc.
1286# FIXME: To remove some day.
1287build=$build_alias
1288host=$host_alias
1289target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Martin v. Löwis11437992002-04-12 09:54:03 +00001291# FIXME: To remove some day.
1292if test "x$host_alias" != x; then
1293 if test "x$build_alias" = x; then
1294 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 elif test "x$build_alias" != "x$host_alias"; then
1296 cross_compiling=yes
1297 fi
1298fi
1299
1300ac_tool_prefix=
1301test -n "$host_alias" && ac_tool_prefix=$host_alias-
1302
1303test "$silent" = yes && exec 6>/dev/null
1304
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001306ac_pwd=`pwd` && test -n "$ac_pwd" &&
1307ac_ls_di=`ls -di .` &&
1308ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001312
1313
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314# Find the source files, if location was not specified.
1315if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001316 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001318 ac_confdir=`$as_dirname -- "$as_myself" ||
1319$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1320 X"$as_myself" : 'X\(//\)[^/]' \| \
1321 X"$as_myself" : 'X\(//\)$' \| \
1322 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1323$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\/\)[^/].*/{
1329 s//\1/
1330 q
1331 }
1332 /^X\(\/\/\)$/{
1333 s//\1/
1334 q
1335 }
1336 /^X\(\/\).*/{
1337 s//\1/
1338 q
1339 }
1340 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343 srcdir=..
1344 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345else
1346 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348if test ! -r "$srcdir/$ac_unique_file"; then
1349 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001350 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1353ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001354 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 pwd)`
1356# When building in place, set srcdir=.
1357if test "$ac_abs_confdir" = "$ac_pwd"; then
1358 srcdir=.
1359fi
1360# Remove unnecessary trailing slashes from srcdir.
1361# Double slashes in file names in object file debugging info
1362# mess up M-x gdb in Emacs.
1363case $srcdir in
1364*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1365esac
1366for ac_var in $ac_precious_vars; do
1367 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1368 eval ac_env_${ac_var}_value=\$${ac_var}
1369 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1370 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1371done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372
Martin v. Löwis11437992002-04-12 09:54:03 +00001373#
1374# Report the --help message.
1375#
1376if test "$ac_init_help" = "long"; then
1377 # Omit some internal or obsolete options to make the list less imposing.
1378 # This message is too long to be a string in the A/UX 3.1 sh.
1379 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001380\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
1382Usage: $0 [OPTION]... [VAR=VALUE]...
1383
1384To assign environment variables (e.g., CC, CFLAGS...), specify them as
1385VAR=VALUE. See below for descriptions of some of the useful variables.
1386
1387Defaults for the options are specified in brackets.
1388
1389Configuration:
1390 -h, --help display this help and exit
1391 --help=short display options specific to this package
1392 --help=recursive display the short help of all the included packages
1393 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001394 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --cache-file=FILE cache test results in FILE [disabled]
1396 -C, --config-cache alias for \`--cache-file=config.cache'
1397 -n, --no-create do not create output files
1398 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400Installation directories:
1401 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001404 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406By default, \`make install' will install all the files in
1407\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1408an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1409for instance \`--prefix=\$HOME'.
1410
1411For better control, use the options below.
1412
1413Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 --bindir=DIR user executables [EPREFIX/bin]
1415 --sbindir=DIR system admin executables [EPREFIX/sbin]
1416 --libexecdir=DIR program executables [EPREFIX/libexec]
1417 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1418 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1419 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1420 --libdir=DIR object code libraries [EPREFIX/lib]
1421 --includedir=DIR C header files [PREFIX/include]
1422 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1423 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1424 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1425 --infodir=DIR info documentation [DATAROOTDIR/info]
1426 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1427 --mandir=DIR man documentation [DATAROOTDIR/man]
1428 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1429 --htmldir=DIR html documentation [DOCDIR]
1430 --dvidir=DIR dvi documentation [DOCDIR]
1431 --pdfdir=DIR pdf documentation [DOCDIR]
1432 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434
1435 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001436
1437System types:
1438 --build=BUILD configure for building on BUILD [guessed]
1439 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001440_ACEOF
1441fi
1442
1443if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001444 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001445 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001446 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001447 cat <<\_ACEOF
1448
1449Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001450 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001451 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1452 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001453 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001454 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --enable-framework[=INSTALLDIR]
1456 Build (MacOSX|Darwin) framework
1457 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001458 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001459 --enable-loadable-sqlite-extensions
1460 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-ipv6 Enable ipv6 (with ipv4) support
1462 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001463 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001464 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465
1466Optional Packages:
1467 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1468 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001469 --with-universal-archs=ARCH
1470 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001471 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001472 --with-framework-name=FRAMEWORK
1473 specify an alternate name of the framework built
1474 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001476 --with-cxx-main=<compiler>
1477 compile main() and link python executable with C++
1478 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-suffix=.exe set executable suffix
1480 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001481 --with-hash-algorithm=[fnv|siphash24]
1482 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001483 --with-address-sanitizer
1484 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001486 --with-system-expat build pyexpat module using an installed expat
1487 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001488 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001489 --with-system-libmpdec build _decimal module using an installed libmpdec
1490 library
Ned Deilyd819b932013-09-06 01:07:05 -07001491 --with-tcltk-includes='-I...'
1492 override search for Tcl and Tk include files
1493 --with-tcltk-libs='-L...'
1494 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001495 --with-dbmliborder=db1:db2:...
1496 order to check db backends for dbm. Valid value is a
1497 colon separated string with the backend names
1498 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-threads[=DIRECTORY]
1501 disable/enable thread support
1502 --with(out)-thread[=DIRECTORY]
1503 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001505 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001507 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-fpectl enable SIGFPE catching
1509 --with-libm=STRING math library
1510 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001511 --with(out)-computed-gotos
1512 Use computed gotos in evaluation loop (enabled by
1513 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001514 --with(out)-ensurepip=[=upgrade]
1515 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001516
1517Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001518 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CC C compiler command
1520 CFLAGS C compiler flags
1521 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1522 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001524 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001526 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001527 PKG_CONFIG path to pkg-config utility
1528 PKG_CONFIG_PATH
1529 directories to add to pkg-config's search path
1530 PKG_CONFIG_LIBDIR
1531 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001532
1533Use these variables to override the choices made by `configure' or to help
1534it to find libraries and programs with nonstandard names/locations.
1535
Georg Brandle2e15612009-05-20 18:25:10 +00001536Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001539fi
1540
1541if test "$ac_init_help" = "recursive"; then
1542 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001544 test -d "$ac_dir" ||
1545 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1546 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_builddir=.
1548
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549case "$ac_dir" in
1550.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1551*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001552 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 case $ac_top_builddir_sub in
1556 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1557 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1558 esac ;;
1559esac
1560ac_abs_top_builddir=$ac_pwd
1561ac_abs_builddir=$ac_pwd$ac_dir_suffix
1562# for backward compatibility:
1563ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 ac_top_srcdir=$ac_top_builddir_sub
1569 ac_abs_top_srcdir=$ac_pwd ;;
1570 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 ac_top_srcdir=$srcdir
1573 ac_abs_top_srcdir=$srcdir ;;
1574 *) # Relative name.
1575 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1576 ac_top_srcdir=$ac_top_build_prefix$srcdir
1577 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001578esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 cd "$ac_dir" || { ac_status=$?; continue; }
1582 # Check for guested configure.
1583 if test -f "$ac_srcdir/configure.gnu"; then
1584 echo &&
1585 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1586 elif test -f "$ac_srcdir/configure"; then
1587 echo &&
1588 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 fi || ac_status=$?
1592 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 done
1594fi
1595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001597if $ac_init_version; then
1598 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001599python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001600generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001602Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603This configure script is free software; the Free Software Foundation
1604gives unlimited permission to copy, distribute and modify it.
1605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001608
1609## ------------------------ ##
1610## Autoconf initialization. ##
1611## ------------------------ ##
1612
1613# ac_fn_c_try_compile LINENO
1614# --------------------------
1615# Try to compile conftest.$ac_ext, and return whether this succeeded.
1616ac_fn_c_try_compile ()
1617{
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext
1620 if { { ac_try="$ac_compile"
1621case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624esac
1625eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626$as_echo "$ac_try_echo"; } >&5
1627 (eval "$ac_compile") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_c_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest.$ac_objext; then :
1639 ac_retval=0
1640else
1641 $as_echo "$as_me: failed program was:" >&5
1642sed 's/^/| /' conftest.$ac_ext >&5
1643
1644 ac_retval=1
1645fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001646 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001647 as_fn_set_status $ac_retval
1648
1649} # ac_fn_c_try_compile
1650
Matthias Kloseb9621712010-04-24 17:59:49 +00001651# ac_fn_c_try_link LINENO
1652# -----------------------
1653# Try to link conftest.$ac_ext, and return whether this succeeded.
1654ac_fn_c_try_link ()
1655{
1656 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1657 rm -f conftest.$ac_objext conftest$ac_exeext
1658 if { { ac_try="$ac_link"
1659case "(($ac_try" in
1660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1661 *) ac_try_echo=$ac_try;;
1662esac
1663eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1664$as_echo "$ac_try_echo"; } >&5
1665 (eval "$ac_link") 2>conftest.err
1666 ac_status=$?
1667 if test -s conftest.err; then
1668 grep -v '^ *+' conftest.err >conftest.er1
1669 cat conftest.er1 >&5
1670 mv -f conftest.er1 conftest.err
1671 fi
1672 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1673 test $ac_status = 0; } && {
1674 test -z "$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 } && test -s conftest$ac_exeext && {
1677 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001678 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001679 }; then :
1680 ac_retval=0
1681else
1682 $as_echo "$as_me: failed program was:" >&5
1683sed 's/^/| /' conftest.$ac_ext >&5
1684
1685 ac_retval=1
1686fi
1687 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1688 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1689 # interfere with the next link command; also delete a directory that is
1690 # left behind by Apple's compiler. We do this before executing the actions.
1691 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_link
1696
Matthias Kloseb9621712010-04-24 17:59:49 +00001697# ac_fn_c_try_cpp LINENO
1698# ----------------------
1699# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1700ac_fn_c_try_cpp ()
1701{
1702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1703 if { { ac_try="$ac_cpp conftest.$ac_ext"
1704case "(($ac_try" in
1705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1706 *) ac_try_echo=$ac_try;;
1707esac
1708eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1709$as_echo "$ac_try_echo"; } >&5
1710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1711 ac_status=$?
1712 if test -s conftest.err; then
1713 grep -v '^ *+' conftest.err >conftest.er1
1714 cat conftest.er1 >&5
1715 mv -f conftest.er1 conftest.err
1716 fi
1717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001718 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1720 test ! -s conftest.err
1721 }; then :
1722 ac_retval=0
1723else
1724 $as_echo "$as_me: failed program was:" >&5
1725sed 's/^/| /' conftest.$ac_ext >&5
1726
1727 ac_retval=1
1728fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001729 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 as_fn_set_status $ac_retval
1731
1732} # ac_fn_c_try_cpp
1733
1734# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1735# -------------------------------------------------------
1736# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1737# the include files in INCLUDES and setting the cache variable VAR
1738# accordingly.
1739ac_fn_c_check_header_mongrel ()
1740{
1741 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1744$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001745if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 $as_echo_n "(cached) " >&6
1747fi
1748eval ac_res=\$$3
1749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1750$as_echo "$ac_res" >&6; }
1751else
1752 # Is the header compilable?
1753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1754$as_echo_n "checking $2 usability... " >&6; }
1755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1756/* end confdefs.h. */
1757$4
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_compile "$LINENO"; then :
1761 ac_header_compiler=yes
1762else
1763 ac_header_compiler=no
1764fi
1765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1767$as_echo "$ac_header_compiler" >&6; }
1768
1769# Is the header present?
1770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1771$as_echo_n "checking $2 presence... " >&6; }
1772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773/* end confdefs.h. */
1774#include <$2>
1775_ACEOF
1776if ac_fn_c_try_cpp "$LINENO"; then :
1777 ac_header_preproc=yes
1778else
1779 ac_header_preproc=no
1780fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001781rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1783$as_echo "$ac_header_preproc" >&6; }
1784
1785# So? What about this header?
1786case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1787 yes:no: )
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1789$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1792 ;;
1793 no:yes:* )
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1795$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1797$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1799$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1801$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1803$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001804( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001805## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001807 ) | sed "s/^/$as_me: WARNING: /" >&2
1808 ;;
1809esac
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1811$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001812if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001813 $as_echo_n "(cached) " >&6
1814else
1815 eval "$3=\$ac_header_compiler"
1816fi
1817eval ac_res=\$$3
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1819$as_echo "$ac_res" >&6; }
1820fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001822
1823} # ac_fn_c_check_header_mongrel
1824
1825# ac_fn_c_try_run LINENO
1826# ----------------------
1827# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1828# that executables *can* be run.
1829ac_fn_c_try_run ()
1830{
1831 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1832 if { { ac_try="$ac_link"
1833case "(($ac_try" in
1834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1835 *) ac_try_echo=$ac_try;;
1836esac
1837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1838$as_echo "$ac_try_echo"; } >&5
1839 (eval "$ac_link") 2>&5
1840 ac_status=$?
1841 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1842 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1843 { { case "(($ac_try" in
1844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1845 *) ac_try_echo=$ac_try;;
1846esac
1847eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1848$as_echo "$ac_try_echo"; } >&5
1849 (eval "$ac_try") 2>&5
1850 ac_status=$?
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; }; }; then :
1853 ac_retval=0
1854else
1855 $as_echo "$as_me: program exited with status $ac_status" >&5
1856 $as_echo "$as_me: failed program was:" >&5
1857sed 's/^/| /' conftest.$ac_ext >&5
1858
1859 ac_retval=$ac_status
1860fi
1861 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001862 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001863 as_fn_set_status $ac_retval
1864
1865} # ac_fn_c_try_run
1866
1867# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1868# -------------------------------------------------------
1869# Tests whether HEADER exists and can be compiled using the include files in
1870# INCLUDES, setting the cache variable VAR accordingly.
1871ac_fn_c_check_header_compile ()
1872{
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1875$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001876if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 $as_echo_n "(cached) " >&6
1878else
1879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1880/* end confdefs.h. */
1881$4
1882#include <$2>
1883_ACEOF
1884if ac_fn_c_try_compile "$LINENO"; then :
1885 eval "$3=yes"
1886else
1887 eval "$3=no"
1888fi
1889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1890fi
1891eval ac_res=\$$3
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001895
1896} # ac_fn_c_check_header_compile
1897
Matthias Kloseb9621712010-04-24 17:59:49 +00001898# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1899# -------------------------------------------
1900# Tests whether TYPE exists after having included INCLUDES, setting cache
1901# variable VAR accordingly.
1902ac_fn_c_check_type ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 eval "$3=no"
1911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1912/* end confdefs.h. */
1913$4
1914int
1915main ()
1916{
1917if (sizeof ($2))
1918 return 0;
1919 ;
1920 return 0;
1921}
1922_ACEOF
1923if ac_fn_c_try_compile "$LINENO"; then :
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof (($2)))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937
1938else
1939 eval "$3=yes"
1940fi
1941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1942fi
1943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1944fi
1945eval ac_res=\$$3
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1947$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001948 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001949
1950} # ac_fn_c_check_type
1951
1952# ac_fn_c_find_uintX_t LINENO BITS VAR
1953# ------------------------------------
1954# Finds an unsigned integer type with width BITS, setting cache variable VAR
1955# accordingly.
1956ac_fn_c_find_uintX_t ()
1957{
1958 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1960$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001962 $as_echo_n "(cached) " >&6
1963else
1964 eval "$3=no"
1965 # Order is important - never check a type that is potentially smaller
1966 # than half of the expected target width.
1967 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1968 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1970/* end confdefs.h. */
1971$ac_includes_default
1972int
1973main ()
1974{
1975static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001976test_array [0] = 0;
1977return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979 ;
1980 return 0;
1981}
1982_ACEOF
1983if ac_fn_c_try_compile "$LINENO"; then :
1984 case $ac_type in #(
1985 uint$2_t) :
1986 eval "$3=yes" ;; #(
1987 *) :
1988 eval "$3=\$ac_type" ;;
1989esac
1990fi
1991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001992 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001993
1994else
1995 break
1996fi
1997 done
1998fi
1999eval ac_res=\$$3
2000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2001$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004} # ac_fn_c_find_uintX_t
2005
2006# ac_fn_c_find_intX_t LINENO BITS VAR
2007# -----------------------------------
2008# Finds a signed integer type with width BITS, setting cache variable VAR
2009# accordingly.
2010ac_fn_c_find_intX_t ()
2011{
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2014$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002015if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002016 $as_echo_n "(cached) " >&6
2017else
2018 eval "$3=no"
2019 # Order is important - never check a type that is potentially smaller
2020 # than half of the expected target width.
2021 for ac_type in int$2_t 'int' 'long int' \
2022 'long long int' 'short int' 'signed char'; do
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002027int
2028main ()
2029{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002042 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002043int
2044main ()
2045{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002046static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002047 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056
2057else
2058 case $ac_type in #(
2059 int$2_t) :
2060 eval "$3=yes" ;; #(
2061 *) :
2062 eval "$3=\$ac_type" ;;
2063esac
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066fi
2067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002068 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070else
2071 break
2072fi
2073 done
2074fi
2075eval ac_res=\$$3
2076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2077$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002078 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002079
2080} # ac_fn_c_find_intX_t
2081
2082# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2083# --------------------------------------------
2084# Tries to find the compile-time value of EXPR in a program that includes
2085# INCLUDES, setting VAR accordingly. Returns whether the value could be
2086# computed
2087ac_fn_c_compute_int ()
2088{
2089 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2090 if test "$cross_compiling" = yes; then
2091 # Depending upon the size, compute the lo and hi bounds.
2092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_lo=0 ac_mid=0
2108 while :; do
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002116test_array [0] = 0;
2117return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_hi=$ac_mid; break
2125else
2126 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2127 if test $ac_lo -le $ac_mid; then
2128 ac_lo= ac_hi=
2129 break
2130 fi
2131 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2132fi
2133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2134 done
2135else
2136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h. */
2138$4
2139int
2140main ()
2141{
2142static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002143test_array [0] = 0;
2144return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_compile "$LINENO"; then :
2151 ac_hi=-1 ac_mid=-1
2152 while :; do
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002160test_array [0] = 0;
2161return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_lo=$ac_mid; break
2169else
2170 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2171 if test $ac_mid -le $ac_hi; then
2172 ac_lo= ac_hi=
2173 break
2174 fi
2175 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2176fi
2177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2178 done
2179else
2180 ac_lo= ac_hi=
2181fi
2182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2183fi
2184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2185# Binary search between lo and hi bounds.
2186while test "x$ac_lo" != "x$ac_hi"; do
2187 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191int
2192main ()
2193{
2194static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002195test_array [0] = 0;
2196return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002197
2198 ;
2199 return 0;
2200}
2201_ACEOF
2202if ac_fn_c_try_compile "$LINENO"; then :
2203 ac_hi=$ac_mid
2204else
2205 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208done
2209case $ac_lo in #((
2210?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2211'') ac_retval=1 ;;
2212esac
2213 else
2214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2215/* end confdefs.h. */
2216$4
2217static long int longval () { return $2; }
2218static unsigned long int ulongval () { return $2; }
2219#include <stdio.h>
2220#include <stdlib.h>
2221int
2222main ()
2223{
2224
2225 FILE *f = fopen ("conftest.val", "w");
2226 if (! f)
2227 return 1;
2228 if (($2) < 0)
2229 {
2230 long int i = longval ();
2231 if (i != ($2))
2232 return 1;
2233 fprintf (f, "%ld", i);
2234 }
2235 else
2236 {
2237 unsigned long int i = ulongval ();
2238 if (i != ($2))
2239 return 1;
2240 fprintf (f, "%lu", i);
2241 }
2242 /* Do not output a trailing newline, as this causes \r\n confusion
2243 on some platforms. */
2244 return ferror (f) || fclose (f) != 0;
2245
2246 ;
2247 return 0;
2248}
2249_ACEOF
2250if ac_fn_c_try_run "$LINENO"; then :
2251 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2252else
2253 ac_retval=1
2254fi
2255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2256 conftest.$ac_objext conftest.beam conftest.$ac_ext
2257rm -f conftest.val
2258
2259 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002260 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002261 as_fn_set_status $ac_retval
2262
2263} # ac_fn_c_compute_int
2264
2265# ac_fn_c_check_func LINENO FUNC VAR
2266# ----------------------------------
2267# Tests whether FUNC exists, setting the cache variable VAR accordingly
2268ac_fn_c_check_func ()
2269{
2270 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2272$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002273if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002274 $as_echo_n "(cached) " >&6
2275else
2276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2277/* end confdefs.h. */
2278/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2279 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2280#define $2 innocuous_$2
2281
2282/* System header to define __stub macros and hopefully few prototypes,
2283 which can conflict with char $2 (); below.
2284 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2285 <limits.h> exists even on freestanding compilers. */
2286
2287#ifdef __STDC__
2288# include <limits.h>
2289#else
2290# include <assert.h>
2291#endif
2292
2293#undef $2
2294
2295/* Override any GCC internal prototype to avoid an error.
2296 Use char because int might match the return type of a GCC
2297 builtin and then its argument prototype would still apply. */
2298#ifdef __cplusplus
2299extern "C"
2300#endif
2301char $2 ();
2302/* The GNU C library defines this for functions which it implements
2303 to always fail with ENOSYS. Some functions are actually named
2304 something starting with __ and the normal name is an alias. */
2305#if defined __stub_$2 || defined __stub___$2
2306choke me
2307#endif
2308
2309int
2310main ()
2311{
2312return $2 ();
2313 ;
2314 return 0;
2315}
2316_ACEOF
2317if ac_fn_c_try_link "$LINENO"; then :
2318 eval "$3=yes"
2319else
2320 eval "$3=no"
2321fi
2322rm -f core conftest.err conftest.$ac_objext \
2323 conftest$ac_exeext conftest.$ac_ext
2324fi
2325eval ac_res=\$$3
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2327$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002328 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002329
2330} # ac_fn_c_check_func
2331
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002332# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2333# ---------------------------------------------
2334# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2335# accordingly.
2336ac_fn_c_check_decl ()
2337{
2338 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339 as_decl_name=`echo $2|sed 's/ *(.*//'`
2340 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2342$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2343if eval \${$3+:} false; then :
2344 $as_echo_n "(cached) " >&6
2345else
2346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2347/* end confdefs.h. */
2348$4
2349int
2350main ()
2351{
2352#ifndef $as_decl_name
2353#ifdef __cplusplus
2354 (void) $as_decl_use;
2355#else
2356 (void) $as_decl_name;
2357#endif
2358#endif
2359
2360 ;
2361 return 0;
2362}
2363_ACEOF
2364if ac_fn_c_try_compile "$LINENO"; then :
2365 eval "$3=yes"
2366else
2367 eval "$3=no"
2368fi
2369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370fi
2371eval ac_res=\$$3
2372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2373$as_echo "$ac_res" >&6; }
2374 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2375
2376} # ac_fn_c_check_decl
2377
Matthias Kloseb9621712010-04-24 17:59:49 +00002378# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2379# ----------------------------------------------------
2380# Tries to find if the field MEMBER exists in type AGGR, after including
2381# INCLUDES, setting cache variable VAR accordingly.
2382ac_fn_c_check_member ()
2383{
2384 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2386$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002387if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo_n "(cached) " >&6
2389else
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h. */
2392$5
2393int
2394main ()
2395{
2396static $2 ac_aggr;
2397if (ac_aggr.$3)
2398return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$4=yes"
2405else
2406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h. */
2408$5
2409int
2410main ()
2411{
2412static $2 ac_aggr;
2413if (sizeof ac_aggr.$3)
2414return 0;
2415 ;
2416 return 0;
2417}
2418_ACEOF
2419if ac_fn_c_try_compile "$LINENO"; then :
2420 eval "$4=yes"
2421else
2422 eval "$4=no"
2423fi
2424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2425fi
2426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2427fi
2428eval ac_res=\$$4
2429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2430$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002431 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002432
2433} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002434cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002435This file contains any messages produced by compilers while
2436running configure, to aid debugging if configure makes a mistake.
2437
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002438It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002439generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002440
2441 $ $0 $@
2442
2443_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002445{
2446cat <<_ASUNAME
2447## --------- ##
2448## Platform. ##
2449## --------- ##
2450
2451hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2452uname -m = `(uname -m) 2>/dev/null || echo unknown`
2453uname -r = `(uname -r) 2>/dev/null || echo unknown`
2454uname -s = `(uname -s) 2>/dev/null || echo unknown`
2455uname -v = `(uname -v) 2>/dev/null || echo unknown`
2456
2457/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2458/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2459
2460/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2461/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2462/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002464/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2465/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2466/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2467
2468_ASUNAME
2469
2470as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2471for as_dir in $PATH
2472do
2473 IFS=$as_save_IFS
2474 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 $as_echo "PATH: $as_dir"
2476 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002478
2479} >&5
2480
2481cat >&5 <<_ACEOF
2482
2483
2484## ----------- ##
2485## Core tests. ##
2486## ----------- ##
2487
2488_ACEOF
2489
2490
2491# Keep a trace of the command line.
2492# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002493# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002494# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002495# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002496ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002497ac_configure_args0=
2498ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002499ac_must_keep_next=false
2500for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002501do
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 for ac_arg
2503 do
2504 case $ac_arg in
2505 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2506 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2507 | -silent | --silent | --silen | --sile | --sil)
2508 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 esac
2512 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002517 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002519 case $ac_arg in
2520 *=* | --config-cache | -C | -disable-* | --disable-* \
2521 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2522 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2523 | -with-* | --with-* | -without-* | --without-* | --x)
2524 case "$ac_configure_args0 " in
2525 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2526 esac
2527 ;;
2528 -* ) ac_must_keep_next=true ;;
2529 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 ;;
2533 esac
2534 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002535done
Matthias Kloseb9621712010-04-24 17:59:49 +00002536{ ac_configure_args0=; unset ac_configure_args0;}
2537{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
2539# When interrupted or exit'd, cleanup temporary files, and complete
2540# config.log. We remove comments because anyway the quotes in there
2541# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542# WARNING: Use '\'' to represent an apostrophe within the trap.
2543# 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 +00002544trap 'exit_status=$?
2545 # Save into config.log some information that might help in debugging.
2546 {
2547 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002548
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002549 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002550## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 echo
2553 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554(
2555 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2556 eval ac_val=\$$ac_var
2557 case $ac_val in #(
2558 *${as_nl}*)
2559 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2561$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 esac
2563 case $ac_var in #(
2564 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002565 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2566 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 esac ;;
2568 esac
2569 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002570 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2572 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002573 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 "s/'\''/'\''\\\\'\'''\''/g;
2575 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2576 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002577 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002579 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 esac |
2581 sort
2582)
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002584
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002586## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_vars
2590 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 eval ac_val=\$$ac_var
2592 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 done | sort
2597 echo
2598
2599 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002603 echo
2604 for ac_var in $ac_subst_files
2605 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 eval ac_val=\$$ac_var
2607 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002610 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002611 done | sort
2612 echo
2613 fi
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002616 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002617## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002618## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 echo
2622 fi
2623 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 $as_echo "$as_me: caught signal $ac_signal"
2625 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 rm -f core *.core core.conftest.* &&
2628 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002631for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002633done
2634ac_signal=0
2635
2636# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002638
Matthias Kloseb9621712010-04-24 17:59:49 +00002639$as_echo "/* confdefs.h */" > confdefs.h
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641# Predefined preprocessor variables.
2642
2643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_NAME "$PACKAGE_NAME"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_VERSION "$PACKAGE_VERSION"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_STRING "$PACKAGE_STRING"
2657_ACEOF
2658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2661_ACEOF
2662
Matthias Kloseb9621712010-04-24 17:59:49 +00002663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_URL "$PACKAGE_URL"
2665_ACEOF
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667
2668# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669# Prefer an explicitly selected file to automatically selected ones.
2670ac_site_file1=NONE
2671ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 # We do not want a PATH search for config.site.
2674 case $CONFIG_SITE in #((
2675 -*) ac_site_file1=./$CONFIG_SITE;;
2676 */*) ac_site_file1=$CONFIG_SITE;;
2677 *) ac_site_file1=./$CONFIG_SITE;;
2678 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002680 ac_site_file1=$prefix/share/config.site
2681 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682else
Matthias Kloseb9621712010-04-24 17:59:49 +00002683 ac_site_file1=$ac_default_prefix/share/config.site
2684 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002686for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687do
Matthias Kloseb9621712010-04-24 17:59:49 +00002688 test "x$ac_site_file" = xNONE && continue
2689 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2691$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002693 . "$ac_site_file" \
2694 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2696as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002697See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698 fi
2699done
2700
2701if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 # Some versions of bash will fail to source /dev/null (special files
2703 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2704 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2706$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 esac
2711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712else
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2714$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 >$cache_file
2716fi
2717
2718# Check that the precious variables saved in the cache have kept the same
2719# value.
2720ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2723 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 case $ac_old_set,$ac_new_set in
2727 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2729$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 +00002730 ac_cache_corrupted=: ;;
2731 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2733$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 ac_cache_corrupted=: ;;
2735 ,);;
2736 *)
2737 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 # differences in whitespace do not lead to failure.
2739 ac_old_val_w=`echo x $ac_old_val`
2740 ac_new_val_w=`echo x $ac_new_val`
2741 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2743$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2744 ac_cache_corrupted=:
2745 else
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2747$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2748 eval $ac_var=\$ac_old_val
2749 fi
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2751$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2753$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002754 fi;;
2755 esac
2756 # Pass precious variables to config.status.
2757 if test "$ac_new_set" = set; then
2758 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002759 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002760 *) ac_arg=$ac_var=$ac_new_val ;;
2761 esac
2762 case " $ac_configure_args " in
2763 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002764 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 esac
2766 fi
2767done
2768if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002769 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2772$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002773 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002775## -------------------- ##
2776## Main body of script. ##
2777## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778
Guido van Rossum7f43da71994-08-01 12:15:30 +00002779ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2783ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784
Guido van Rossum627b2d71993-12-24 10:39:16 +00002785
Michael W. Hudson54241132001-12-07 15:38:26 +00002786
Trent Nelson4d4ec652012-10-16 08:51:24 -04002787
Trent Nelson5595ab52012-10-17 04:47:31 -04002788if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002789 # If we're building out-of-tree, we need to make sure the following
2790 # resources get picked up before their $srcdir counterparts.
2791 # Objects/ -> typeslots.inc
2792 # Include/ -> Python-ast.h, graminit.h
2793 # Python/ -> importlib.h
2794 # (A side effect of this is that these resources will automatically be
2795 # regenerated when building out-of-tree, regardless of whether or not
2796 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2797 # off.)
2798 BASECPPFLAGS="-IObjects -IInclude -IPython"
2799else
2800 BASECPPFLAGS=""
2801fi
2802
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002803
2804
2805
2806
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002807if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002808then
2809# Extract the first word of "hg", so it can be a program name with args.
2810set dummy hg; ac_word=$2
2811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2812$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002813if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 $as_echo_n "(cached) " >&6
2815else
2816 if test -n "$HAS_HG"; then
2817 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2818else
2819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820for as_dir in $PATH
2821do
2822 IFS=$as_save_IFS
2823 test -z "$as_dir" && as_dir=.
2824 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002826 ac_cv_prog_HAS_HG="found"
2827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2828 break 2
2829 fi
2830done
2831 done
2832IFS=$as_save_IFS
2833
2834 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2835fi
2836fi
2837HAS_HG=$ac_cv_prog_HAS_HG
2838if test -n "$HAS_HG"; then
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2840$as_echo "$HAS_HG" >&6; }
2841else
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2843$as_echo "no" >&6; }
2844fi
2845
2846
2847else
2848HAS_HG=no-repository
2849fi
2850if test $HAS_HG = found
2851then
2852 HGVERSION="hg id -i \$(srcdir)"
2853 HGTAG="hg id -t \$(srcdir)"
2854 HGBRANCH="hg id -b \$(srcdir)"
2855else
2856 HGVERSION=""
2857 HGTAG=""
2858 HGBRANCH=""
2859fi
2860
2861
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002862ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002863
2864
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002865ac_aux_dir=
2866for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2867 if test -f "$ac_dir/install-sh"; then
2868 ac_aux_dir=$ac_dir
2869 ac_install_sh="$ac_aux_dir/install-sh -c"
2870 break
2871 elif test -f "$ac_dir/install.sh"; then
2872 ac_aux_dir=$ac_dir
2873 ac_install_sh="$ac_aux_dir/install.sh -c"
2874 break
2875 elif test -f "$ac_dir/shtool"; then
2876 ac_aux_dir=$ac_dir
2877 ac_install_sh="$ac_aux_dir/shtool install -c"
2878 break
2879 fi
2880done
2881if test -z "$ac_aux_dir"; then
2882 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2883fi
2884
2885# These three variables are undocumented and unsupported,
2886# and are intended to be withdrawn in a future Autoconf release.
2887# They can cause serious problems if a builder's source tree is in a directory
2888# whose full name contains unusual characters.
2889ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2890ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2891ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2892
2893
2894# Make sure we can run config.sub.
2895$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2896 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2897
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2899$as_echo_n "checking build system type... " >&6; }
2900if ${ac_cv_build+:} false; then :
2901 $as_echo_n "(cached) " >&6
2902else
2903 ac_build_alias=$build_alias
2904test "x$ac_build_alias" = x &&
2905 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2906test "x$ac_build_alias" = x &&
2907 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2908ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2909 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2910
2911fi
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2913$as_echo "$ac_cv_build" >&6; }
2914case $ac_cv_build in
2915*-*-*) ;;
2916*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2917esac
2918build=$ac_cv_build
2919ac_save_IFS=$IFS; IFS='-'
2920set x $ac_cv_build
2921shift
2922build_cpu=$1
2923build_vendor=$2
2924shift; shift
2925# Remember, the first character of IFS is used to create $*,
2926# except with old shells:
2927build_os=$*
2928IFS=$ac_save_IFS
2929case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2930
2931
2932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2933$as_echo_n "checking host system type... " >&6; }
2934if ${ac_cv_host+:} false; then :
2935 $as_echo_n "(cached) " >&6
2936else
2937 if test "x$host_alias" = x; then
2938 ac_cv_host=$ac_cv_build
2939else
2940 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2941 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2942fi
2943
2944fi
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2946$as_echo "$ac_cv_host" >&6; }
2947case $ac_cv_host in
2948*-*-*) ;;
2949*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2950esac
2951host=$ac_cv_host
2952ac_save_IFS=$IFS; IFS='-'
2953set x $ac_cv_host
2954shift
2955host_cpu=$1
2956host_vendor=$2
2957shift; shift
2958# Remember, the first character of IFS is used to create $*,
2959# except with old shells:
2960host_os=$*
2961IFS=$ac_save_IFS
2962case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2963
2964
2965
doko@python.orga10e4a92013-01-25 18:45:12 +01002966
2967
Ned Deilyfcbc2462014-08-22 13:32:49 -07002968# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2969rm -f pybuilddir.txt
2970
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002971if test "$cross_compiling" = yes; then
2972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2973$as_echo_n "checking for python interpreter for cross build... " >&6; }
2974 if test -z "$PYTHON_FOR_BUILD"; then
2975 for interp in python$PACKAGE_VERSION python3 python; do
2976 which $interp >/dev/null 2>&1 || continue
2977 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2978 break
2979 fi
2980 interp=
2981 done
2982 if test x$interp = x; then
2983 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2984 fi
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2986$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002987 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 +02002988 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002989elif test "$cross_compiling" = maybe; then
2990 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002991else
2992 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2993fi
2994
2995
Martin v. Löwis11437992002-04-12 09:54:03 +00002996
Benjamin Petersond23f8222009-04-05 19:13:16 +00002997if test "$prefix" != "/"; then
2998 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2999fi
3000
3001
Martin v. Löwis11437992002-04-12 09:54:03 +00003002
3003
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003004# We don't use PACKAGE_ variables, and they cause conflicts
3005# with other autoconf-based packages that include Python.h
3006grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3007rm confdefs.h
3008mv confdefs.h.new confdefs.h
3009
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003010
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003011VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003012
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003013# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003014
3015SOVERSION=1.0
3016
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003017# The later defininition of _XOPEN_SOURCE disables certain features
3018# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003021
3022
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003023# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3024# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3025# them.
3026
Matthias Kloseb9621712010-04-24 17:59:49 +00003027$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003028
3029
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003030# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3031# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3032# them.
3033
Matthias Kloseb9621712010-04-24 17:59:49 +00003034$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003035
3036
Martin v. Löwisd6320502004-08-12 13:45:08 +00003037# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3038# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003041
3042
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003043# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3044# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3045# them.
3046
Matthias Kloseb9621712010-04-24 17:59:49 +00003047$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003048
3049
3050
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003051define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003052
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003053# Arguments passed to configure.
3054
3055CONFIG_ARGS="$ac_configure_args"
3056
Matthias Kloseb9621712010-04-24 17:59:49 +00003057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3058$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003060if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003061 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003062 case $enableval in
3063 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 # Locate the best usable SDK, see Mac/README.txt for more
3065 # information
3066 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3070 if test ! -d "${enableval}"
3071 then
3072 enableval=/
3073 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075 ;;
3076 esac
3077 case $enableval in
3078 no)
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081 ;;
3082 *)
3083 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084 if test ! -d "${UNIVERSALSDK}"
3085 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003086 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088 ;;
3089 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003090
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092else
3093
3094 UNIVERSALSDK=
3095 enable_universalsdk=
3096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003098
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099if test -n "${UNIVERSALSDK}"
3100then
Matthias Kloseb9621712010-04-24 17:59:49 +00003101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3102$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003103else
Matthias Kloseb9621712010-04-24 17:59:49 +00003104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003106fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003109
Ned Deily87adb6e2013-10-18 21:09:56 -07003110ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003111
Ned Deilycbfb9a52012-06-23 16:02:19 -07003112# For backward compatibility reasons we prefer to select '32-bit' if available,
3113# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003115if test "`uname -s`" = "Darwin"
3116then
3117 if test -n "${UNIVERSALSDK}"
3118 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003119 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003120 then
3121 UNIVERSAL_ARCHS="intel"
3122 fi
3123 fi
3124fi
3125
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003126
Matthias Kloseb9621712010-04-24 17:59:49 +00003127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3128$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129
3130# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003131if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003132 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 UNIVERSAL_ARCHS="$withval"
3134
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003135fi
3136
Ned Deily87adb6e2013-10-18 21:09:56 -07003137if test -n "${UNIVERSALSDK}"
3138then
3139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3140$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3141else
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3143$as_echo "no" >&6; }
3144fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003146
3147# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003149 withval=$with_framework_name;
3150 PYTHONFRAMEWORK=${withval}
3151 PYTHONFRAMEWORKDIR=${withval}.framework
3152 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3153
3154else
3155
3156 PYTHONFRAMEWORK=Python
3157 PYTHONFRAMEWORKDIR=Python.framework
3158 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3159
3160fi
3161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003162# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003163if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003165 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003166 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003167 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 esac
3169 case $enableval in
3170 no)
3171 PYTHONFRAMEWORK=
3172 PYTHONFRAMEWORKDIR=no-framework
3173 PYTHONFRAMEWORKPREFIX=
3174 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST=
3176 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003177 FRAMEWORKALTINSTALLFIRST=
3178 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003180 if test "x${prefix}" = "xNONE"; then
3181 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003186 ;;
3187 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003189 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003191 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003192 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3193 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003194 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003197 if test "x${prefix}" = "xNONE" ; then
3198 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003199
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003200 else
3201 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3202 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003203
3204 case "${enableval}" in
3205 /System*)
3206 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3207 if test "${prefix}" = "NONE" ; then
3208 # See below
3209 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3210 fi
3211 ;;
3212
3213 /Library*)
3214 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3215 ;;
3216
3217 */Library/Frameworks)
3218 MDIR="`dirname "${enableval}"`"
3219 MDIR="`dirname "${MDIR}"`"
3220 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3221
3222 if test "${prefix}" = "NONE"; then
3223 # User hasn't specified the
3224 # --prefix option, but wants to install
3225 # the framework in a non-default location,
3226 # ensure that the compatibility links get
3227 # installed relative to that prefix as well
3228 # instead of in /usr/local.
3229 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3230 fi
3231 ;;
3232
3233 *)
3234 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3235 ;;
3236 esac
3237
Jack Jansen127e56e2001-09-11 14:41:54 +00003238 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003244 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003245
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003246 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3247
3248 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3249
Jack Jansene578a632001-08-15 01:27:14 +00003250 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003251
Guido van Rossum563e7081996-09-10 18:20:48 +00003252else
Martin v. Löwis11437992002-04-12 09:54:03 +00003253
Jack Jansene578a632001-08-15 01:27:14 +00003254 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003255 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003256 PYTHONFRAMEWORKPREFIX=
3257 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258 FRAMEWORKINSTALLFIRST=
3259 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003260 FRAMEWORKALTINSTALLFIRST=
3261 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003262 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263 if test "x${prefix}" = "xNONE" ; then
3264 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3265 else
3266 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3267 fi
Jack Jansene578a632001-08-15 01:27:14 +00003268 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003269
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003271fi
3272
Thomas Wouters477c8d52006-05-27 19:21:47 +00003273
3274
Michael W. Hudson54241132001-12-07 15:38:26 +00003275
3276
3277
3278
Jack Jansene578a632001-08-15 01:27:14 +00003279
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003280
3281
3282
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003283
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003284
Ned Deilyb8f944f2013-11-21 22:42:25 -08003285
Jack Jansene578a632001-08-15 01:27:14 +00003286##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003287## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003288## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003289##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290# Set name for machine-dependent library files
3291
Matthias Kloseb9621712010-04-24 17:59:49 +00003292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3293$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294if test -z "$MACHDEP"
3295then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 # avoid using uname for cross builds
3297 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003298 # ac_sys_system and ac_sys_release are used for setting
3299 # a lot of different things including 'define_xopen_source'
3300 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003301 case "$host" in
3302 *-*-linux*)
3303 ac_sys_system=Linux
3304 ;;
3305 *-*-cygwin*)
3306 ac_sys_system=Cygwin
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 ac_sys_release=
3314 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003315 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003316 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003317 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003318 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003319 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003320 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003322 fi
3323 ac_md_system=`echo $ac_sys_system |
3324 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3325 ac_md_release=`echo $ac_sys_release |
3326 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3327 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003328
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003329 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003330 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003331 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003332 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003333 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003334 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336fi
Guido van Rossum91922671997-10-09 20:24:13 +00003337
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003338
3339if test "$cross_compiling" = yes; then
3340 case "$host" in
3341 *-*-linux*)
3342 case "$host_cpu" in
3343 arm*)
3344 _host_cpu=arm
3345 ;;
3346 *)
3347 _host_cpu=$host_cpu
3348 esac
3349 ;;
3350 *-*-cygwin*)
3351 _host_cpu=
3352 ;;
3353 *)
3354 # for now, limit cross builds to known configurations
3355 MACHDEP="unknown"
3356 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3357 esac
3358 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3359fi
3360
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003361# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3362# disable features if it is defined, without any means to access these
3363# features as extensions. For these systems, we skip the definition of
3364# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3365# some feature, make sure there is no alternative way to access this
3366# feature. Also, when using wildcards, make sure you have verified the
3367# need for not defining _XOPEN_SOURCE on all systems matching the
3368# wildcard, and that the wildcard does not include future systems
3369# (which may remove their limitations).
3370case $ac_sys_system/$ac_sys_release in
3371 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3372 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003373 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003374 # In addition, Stefan Krah confirms that issue #1244610 exists through
3375 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003376 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003377 define_xopen_source=no
3378 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3379 # also defined. This can be overridden by defining _BSD_SOURCE
3380 # As this has a different meaning on Linux, only define it on OpenBSD
3381
Matthias Kloseb9621712010-04-24 17:59:49 +00003382$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003383
3384 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003385 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003386 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3387 # also defined. This can be overridden by defining _BSD_SOURCE
3388 # As this has a different meaning on Linux, only define it on OpenBSD
3389
Matthias Kloseb9621712010-04-24 17:59:49 +00003390$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003391
3392 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003393 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3394 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3395 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003396 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 +00003397 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003398 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3399 # request to enable features supported by the standard as a request
3400 # to disable features not supported by the standard. The best way
3401 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3402 # entirely and define __EXTENSIONS__ instead.
3403 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003404 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3406 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003407 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003408 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003409 define_xopen_source=no;;
3410 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003411 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003412 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003413 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003414 # On FreeBSD 4, the math functions C89 does not cover are never defined
3415 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3416 FreeBSD/4.*)
3417 define_xopen_source=no;;
3418 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3419 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3420 # identifies itself as Darwin/7.*
3421 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3422 # disables platform specific features beyond repair.
3423 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3424 # has no effect, don't bother defining them
3425 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003426 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003427 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3430 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3431 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003432 AIX/4)
3433 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003434 AIX/5)
3435 if test `uname -r` -eq 1; then
3436 define_xopen_source=no
3437 fi
3438 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003439 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3440 # defining NI_NUMERICHOST.
3441 QNX/6.3.2)
3442 define_xopen_source=no
3443 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003445esac
3446
3447if test $define_xopen_source = yes
3448then
Victor Stinner14d098d2011-09-07 22:29:43 +02003449 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003450
Victor Stinner14d098d2011-09-07 22:29:43 +02003451$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003452
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003453
3454 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3455 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3456 # several APIs are not declared. Since this is also needed in some
3457 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003458
Matthias Kloseb9621712010-04-24 17:59:49 +00003459$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
3461
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003462
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003463$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003464
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003465fi
3466
Christian Heimes647cd872013-12-07 23:39:33 +01003467# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3468case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003469 hp*|HP*)
3470 define_stdc_a1=yes;;
3471 *)
3472 define_stdc_a1=no;;
3473esac
3474
3475if test $define_stdc_a1 = yes
3476then
Christian Heimes647cd872013-12-07 23:39:33 +01003477
3478$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3479
Christian Heimesb02bcae2013-12-08 15:21:08 +01003480fi
Christian Heimes647cd872013-12-07 23:39:33 +01003481
Guido van Rossum91922671997-10-09 20:24:13 +00003482#
3483# SGI compilers allow the specification of the both the ABI and the
3484# ISA on the command line. Depending on the values of these switches,
3485# different and often incompatable code will be generated.
3486#
3487# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3488# thus supply support for various ABI/ISA combinations. The MACHDEP
3489# variable is also adjusted.
3490#
3491
3492if test ! -z "$SGI_ABI"
3493then
3494 CC="cc $SGI_ABI"
3495 LDFLAGS="$SGI_ABI $LDFLAGS"
3496 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3499$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003500
doko@ubuntu.com1345d202015-04-13 21:59:57 +02003501
3502PLATDIR=plat-$MACHDEP
3503
Jack Jansen6b08a402004-06-03 12:41:45 +00003504# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3505# it may influence the way we can build extensions, so distutils
3506# needs to check it
3507
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508
Jack Jansen6b08a402004-06-03 12:41:45 +00003509CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003510EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003511
Guido van Rossum627b2d71993-12-24 10:39:16 +00003512# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003513
3514# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3515# for debug/optimization stuff. BASECFLAGS is for flags that are required
3516# just to get things to compile and link. Users are free to override OPT
3517# when running configure or make. The build should not break if they do.
3518# BASECFLAGS should generally not be messed with, however.
3519
3520# XXX shouldn't some/most/all of this code be merged with the stuff later
3521# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3523$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003526if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003527 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003528 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003529 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003530 without_gcc=yes;;
3531 yes) CC=gcc
3532 without_gcc=no;;
3533 *) CC=$withval
3534 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003535 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003538 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003539 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003540 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003541 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003542 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003543fi
3544
Matthias Kloseb9621712010-04-24 17:59:49 +00003545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3546$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003547
Guido van Rossum8b131c51995-03-09 14:10:13 +00003548# If the user switches compilers, we can't believe the cache
3549if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3550then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003551 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003552(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003553fi
3554
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003555# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3556# when the compiler supports them, but we don't always want -O2, and
3557# we set -g later.
3558if test -z "$CFLAGS"; then
3559 CFLAGS=
3560fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003561
3562if test "$ac_sys_system" = "Darwin"
3563then
3564 # Compiler selection on MacOSX is more complicated than
3565 # AC_PROG_CC can handle, see Mac/README.txt for more
3566 # information
3567 if test -z "${CC}"
3568 then
3569 found_gcc=
3570 found_clang=
3571 as_save_IFS=$IFS; IFS=:
3572 for as_dir in $PATH
3573 do
3574 IFS=$as_save_IFS
3575 if test -x $as_dir/gcc; then
3576 if test -z "${found_gcc}"; then
3577 found_gcc=$as_dir/gcc
3578 fi
3579 fi
3580 if test -x $as_dir/clang; then
3581 if test -z "${found_clang}"; then
3582 found_clang=$as_dir/clang
3583 fi
3584 fi
3585 done
3586 IFS=$as_save_IFS
3587
3588 if test -n "$found_gcc" -a -n "$found_clang"
3589 then
3590 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3591 then
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3593$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3594 CC="$found_clang"
3595 CXX="$found_clang++"
3596 fi
3597
3598
3599 elif test -z "$found_gcc" -a -n "$found_clang"
3600 then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3602$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3603 CC="$found_clang"
3604 CXX="$found_clang++"
3605
3606 elif test -z "$found_gcc" -a -z "$found_clang"
3607 then
3608 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3609 if test -n "${found_clang}"
3610 then
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3612$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3613 CC="${found_clang}"
3614 CXX="`/usr/bin/xcrun -find clang++`"
3615
3616 # else: use default behaviour
3617 fi
3618 fi
3619 fi
3620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621ac_ext=c
3622ac_cpp='$CPP $CPPFLAGS'
3623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3625ac_compiler_gnu=$ac_cv_c_compiler_gnu
3626if test -n "$ac_tool_prefix"; then
3627 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3628set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
Jack Jansendd19cf82001-12-06 22:36:17 +00003652fi
3653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665if test -z "$ac_cv_prog_CC"; then
3666 ac_ct_CC=$CC
3667 # Extract the first word of "gcc", so it can be a program name with args.
3668set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$ac_ct_CC"; then
3675 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3676else
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH
3679do
3680 IFS=$as_save_IFS
3681 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003684 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $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 +00003686 break 2
3687 fi
3688done
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003691
3692fi
3693fi
3694ac_ct_CC=$ac_cv_prog_ac_ct_CC
3695if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3697$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003698else
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3700$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003701fi
3702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003703 if test "x$ac_ct_CC" = x; then
3704 CC=""
3705 else
3706 case $cross_compiling:$ac_tool_warned in
3707yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710ac_tool_warned=yes ;;
3711esac
3712 CC=$ac_ct_CC
3713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714else
3715 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003716fi
3717
Jack Jansendd19cf82001-12-06 22:36:17 +00003718if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 if test -n "$ac_tool_prefix"; then
3720 # 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 +00003721set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
3740 fi
3741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003758fi
3759if test -z "$CC"; then
3760 # Extract the first word of "cc", so it can be a program name with args.
3761set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003764if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003766else
3767 if test -n "$CC"; then
3768 ac_cv_prog_CC="$CC" # Let the user override the test.
3769else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3772for as_dir in $PATH
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3779 ac_prog_rejected=yes
3780 continue
3781 fi
3782 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $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 +00003784 break 2
3785 fi
3786done
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003789
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790if test $ac_prog_rejected = yes; then
3791 # We found a bogon in the path, so make sure we never use it.
3792 set dummy $ac_cv_prog_CC
3793 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003795 # We chose a different compiler from the bogus one.
3796 # However, it has the same basename, so the bogon will be chosen
3797 # first if we set CC to just the basename; use the full file name.
3798 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003799 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800 fi
3801fi
3802fi
3803fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003804CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003805if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3807$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003808else
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3810$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003811fi
3812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
3815if test -z "$CC"; then
3816 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 do
3819 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3820set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003839 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 test -n "$CC" && break
3857 done
3858fi
3859if test -z "$CC"; then
3860 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003862do
3863 # Extract the first word of "$ac_prog", so it can be a program name with args.
3864set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3866$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003867if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003869else
3870 if test -n "$ac_ct_CC"; then
3871 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3872else
3873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3874for as_dir in $PATH
3875do
3876 IFS=$as_save_IFS
3877 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 $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 +00003882 break 2
3883 fi
3884done
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889fi
3890ac_ct_CC=$ac_cv_prog_ac_ct_CC
3891if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3893$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003894else
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3896$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 test -n "$ac_ct_CC" && break
3901done
Michael W. Hudson54241132001-12-07 15:38:26 +00003902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 if test "x$ac_ct_CC" = x; then
3904 CC=""
3905 else
3906 case $cross_compiling:$ac_tool_warned in
3907yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003908{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3909$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910ac_tool_warned=yes ;;
3911esac
3912 CC=$ac_ct_CC
3913 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003914fi
3915
3916fi
3917
3918
Matthias Kloseb9621712010-04-24 17:59:49 +00003919test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003921as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003922See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003923
3924# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003925$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3926set X $ac_compile
3927ac_compiler=$2
3928for ac_option in --version -v -V -qversion; do
3929 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003934eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3935$as_echo "$ac_try_echo"; } >&5
3936 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003937 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 if test -s conftest.err; then
3939 sed '10a\
3940... rest of stderr output deleted ...
3941 10q' conftest.err >conftest.er1
3942 cat conftest.er1 >&5
3943 fi
3944 rm -f conftest.er1 conftest.err
3945 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3946 test $ac_status = 0; }
3947done
Martin v. Löwis11437992002-04-12 09:54:03 +00003948
Matthias Kloseb9621712010-04-24 17:59:49 +00003949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003950/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003951
Martin v. Löwis11437992002-04-12 09:54:03 +00003952int
3953main ()
3954{
3955
3956 ;
3957 return 0;
3958}
3959_ACEOF
3960ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003961ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003962# Try to create an executable without -o first, disregard a.out.
3963# It will help us diagnose broken compilers, and finding out an intuition
3964# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3966$as_echo_n "checking whether the C compiler works... " >&6; }
3967ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3968
3969# The possible output files:
3970ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972ac_rmfiles=
3973for ac_file in $ac_files
3974do
3975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3978 esac
3979done
3980rm -f $ac_rmfiles
3981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003983case "(($ac_try" in
3984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3985 *) ac_try_echo=$ac_try;;
3986esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003987eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3988$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3992 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3994# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3995# in a Makefile. We should not override ac_cv_exeext if it was cached,
3996# so that the user can short-circuit this test for compilers unknown to
3997# Autoconf.
3998for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003999do
4000 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 ;;
4004 [ab].out )
4005 # We found the default executable, but exeext='' is most
4006 # certainly right.
4007 break;;
4008 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 then :; else
4011 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4012 fi
4013 # We set ac_cv_exeext here because the later test for it is not
4014 # safe: cross compilers may not add the suffix if given an `-o'
4015 # argument, so we may need to know it at that point already.
4016 # Even if this section looks crufty: it has the advantage of
4017 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004018 break;;
4019 * )
4020 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 esac
4022done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004023test "$ac_cv_exeext" = no && ac_cv_exeext=
4024
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 ac_file=''
4027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004028if test -z "$ac_file"; then :
4029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4030$as_echo "no" >&6; }
4031$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Matthias Kloseb9621712010-04-24 17:59:49 +00004034{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4035$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004036as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004037See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004038else
4039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4040$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4043$as_echo_n "checking for C compiler default output file name... " >&6; }
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4045$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4051$as_echo_n "checking for suffix of executables... " >&6; }
4052if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004053case "(($ac_try" in
4054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4055 *) ac_try_echo=$ac_try;;
4056esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4058$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4062 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4064# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4065# work properly (i.e., refer to `conftest.exe'), while it won't with
4066# `rm'.
4067for ac_file in conftest.exe conftest conftest.*; do
4068 test -f "$ac_file" || continue
4069 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004071 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4072 break;;
4073 * ) break;;
4074 esac
4075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004076else
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004079as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004082rm -f conftest conftest$ac_cv_exeext
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4084$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004085
4086rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004087EXEEXT=$ac_cv_exeext
4088ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090/* end confdefs.h. */
4091#include <stdio.h>
4092int
4093main ()
4094{
4095FILE *f = fopen ("conftest.out", "w");
4096 return ferror (f) || fclose (f) != 0;
4097
4098 ;
4099 return 0;
4100}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004102ac_clean_files="$ac_clean_files conftest.out"
4103# Check that the compiler produces executables we can run. If not, either
4104# the compiler is broken, or we cross compile.
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4106$as_echo_n "checking whether we are cross compiling... " >&6; }
4107if test "$cross_compiling" != yes; then
4108 { { ac_try="$ac_link"
4109case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_link") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }
4119 if { ac_try='./conftest$ac_cv_exeext'
4120 { { case "(($ac_try" in
4121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4122 *) ac_try_echo=$ac_try;;
4123esac
4124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4125$as_echo "$ac_try_echo"; } >&5
4126 (eval "$ac_try") 2>&5
4127 ac_status=$?
4128 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4129 test $ac_status = 0; }; }; then
4130 cross_compiling=no
4131 else
4132 if test "$cross_compiling" = maybe; then
4133 cross_compiling=yes
4134 else
4135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004137as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004138If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004139See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 fi
4141 fi
4142fi
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4144$as_echo "$cross_compiling" >&6; }
4145
4146rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4147ac_clean_files=$ac_clean_files_save
4148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4149$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
4152else
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154/* end confdefs.h. */
4155
4156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
4164rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004165if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004166case "(($ac_try" in
4167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4168 *) ac_try_echo=$ac_try;;
4169esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004170eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4171$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004173 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004174 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4175 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 for ac_file in conftest.o conftest.obj conftest.*; do
4177 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4181 break;;
4182 esac
4183done
4184else
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004186sed 's/^/| /' conftest.$ac_ext >&5
4187
Matthias Kloseb9621712010-04-24 17:59:49 +00004188{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4189$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004190as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004191See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004193rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4196$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004197OBJEXT=$ac_cv_objext
4198ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4200$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004201if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004206
Martin v. Löwis11437992002-04-12 09:54:03 +00004207int
4208main ()
4209{
4210#ifndef __GNUC__
4211 choke me
4212#endif
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 ac_compiler_gnu=yes
4220else
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004224ac_cv_c_compiler_gnu=$ac_compiler_gnu
4225
4226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4228$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4229if test $ac_compiler_gnu = yes; then
4230 GCC=yes
4231else
4232 GCC=
4233fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004234ac_test_CFLAGS=${CFLAGS+set}
4235ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4237$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004238if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004240else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241 ac_save_c_werror_flag=$ac_c_werror_flag
4242 ac_c_werror_flag=yes
4243 ac_cv_prog_cc_g=no
4244 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004247
Martin v. Löwis11437992002-04-12 09:54:03 +00004248int
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 :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258else
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 CFLAGS=""
4260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261/* end confdefs.h. */
4262
4263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004271if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272
Matthias Kloseb9621712010-04-24 17:59:49 +00004273else
4274 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277/* end confdefs.h. */
4278
4279int
4280main ()
4281{
4282
4283 ;
4284 return 0;
4285}
4286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004287if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295 ac_c_werror_flag=$ac_save_c_werror_flag
4296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4298$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004300 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004301elif test $ac_cv_prog_cc_g = yes; then
4302 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004303 CFLAGS="-g -O2"
4304 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004305 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306 fi
4307else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004308 if test "$GCC" = yes; then
4309 CFLAGS="-O2"
4310 else
4311 CFLAGS=
4312 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4315$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004316if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004318else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004320ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* end confdefs.h. */
4323#include <stdarg.h>
4324#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004325struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004326/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4327struct buf { int x; };
4328FILE * (*rcsopen) (struct buf *, struct stat *, int);
4329static char *e (p, i)
4330 char **p;
4331 int i;
4332{
4333 return p[i];
4334}
4335static char *f (char * (*g) (char **, int), char **p, ...)
4336{
4337 char *s;
4338 va_list v;
4339 va_start (v,p);
4340 s = g (p, va_arg (v,int));
4341 va_end (v);
4342 return s;
4343}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004344
4345/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4346 function prototypes and stuff, but not '\xHH' hex character constants.
4347 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004349 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4350 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004352int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4355 inside strings and character constants. */
4356#define FOO(x) 'x'
4357int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4358
Skip Montanaro6dead952003-09-25 14:50:04 +00004359int test (int i, double x);
4360struct s1 {int (*f) (int a);};
4361struct s2 {int (*f) (double a);};
4362int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4363int argc;
4364char **argv;
4365int
4366main ()
4367{
4368return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4369 ;
4370 return 0;
4371}
4372_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4374 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004375do
4376 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004377 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380rm -f core conftest.err conftest.$ac_objext
4381 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004382done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004384CC=$ac_save_CC
4385
4386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387# AC_CACHE_VAL
4388case "x$ac_cv_prog_cc_c89" in
4389 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4391$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4394$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004395 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4398$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004399esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004400if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Matthias Kloseb9621712010-04-24 17:59:49 +00004402fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004403
Martin v. Löwis11437992002-04-12 09:54:03 +00004404ac_ext=c
4405ac_cpp='$CPP $CPPFLAGS'
4406ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4407ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4408ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004410
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
4412
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4414$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004417if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004419
4420 case $withval in
4421 no) with_cxx_main=no
4422 MAINCC='$(CC)';;
4423 yes) with_cxx_main=yes
4424 MAINCC='$(CXX)';;
4425 *) with_cxx_main=yes
4426 MAINCC=$withval
4427 if test -z "$CXX"
4428 then
4429 CXX=$withval
4430 fi;;
4431 esac
4432else
4433
4434 with_cxx_main=no
4435 MAINCC='$(CC)'
4436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437fi
4438
Matthias Kloseb9621712010-04-24 17:59:49 +00004439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4440$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004441
4442preset_cxx="$CXX"
4443if test -z "$CXX"
4444then
4445 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004446 gcc) if test -n "$ac_tool_prefix"; then
4447 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4448set dummy ${ac_tool_prefix}g++; ac_word=$2
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4450$as_echo_n "checking for $ac_word... " >&6; }
4451if ${ac_cv_path_CXX+:} false; then :
4452 $as_echo_n "(cached) " >&6
4453else
4454 case $CXX in
4455 [\\/]* | ?:[\\/]*)
4456 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4457 ;;
4458 *)
4459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4460for as_dir in notfound
4461do
4462 IFS=$as_save_IFS
4463 test -z "$as_dir" && as_dir=.
4464 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004466 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4468 break 2
4469 fi
4470done
4471 done
4472IFS=$as_save_IFS
4473
4474 ;;
4475esac
4476fi
4477CXX=$ac_cv_path_CXX
4478if test -n "$CXX"; then
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4480$as_echo "$CXX" >&6; }
4481else
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4483$as_echo "no" >&6; }
4484fi
4485
4486
4487fi
4488if test -z "$ac_cv_path_CXX"; then
4489 ac_pt_CXX=$CXX
4490 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004491set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004494if ${ac_cv_path_ac_pt_CXX+:} false; then :
4495 $as_echo_n "(cached) " >&6
4496else
4497 case $ac_pt_CXX in
4498 [\\/]* | ?:[\\/]*)
4499 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4500 ;;
4501 *)
4502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in notfound
4504do
4505 IFS=$as_save_IFS
4506 test -z "$as_dir" && as_dir=.
4507 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004509 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511 break 2
4512 fi
4513done
4514 done
4515IFS=$as_save_IFS
4516
4517 ;;
4518esac
4519fi
4520ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4521if test -n "$ac_pt_CXX"; then
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4523$as_echo "$ac_pt_CXX" >&6; }
4524else
4525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526$as_echo "no" >&6; }
4527fi
4528
4529 if test "x$ac_pt_CXX" = x; then
4530 CXX="g++"
4531 else
4532 case $cross_compiling:$ac_tool_warned in
4533yes:)
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4535$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4536ac_tool_warned=yes ;;
4537esac
4538 CXX=$ac_pt_CXX
4539 fi
4540else
4541 CXX="$ac_cv_path_CXX"
4542fi
4543 ;;
4544 cc) if test -n "$ac_tool_prefix"; then
4545 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4546set dummy ${ac_tool_prefix}c++; ac_word=$2
4547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4548$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004549if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551else
4552 case $CXX in
4553 [\\/]* | ?:[\\/]*)
4554 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4555 ;;
4556 *)
4557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4558for as_dir in notfound
4559do
4560 IFS=$as_save_IFS
4561 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004563 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004564 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566 break 2
4567 fi
4568done
Matthias Kloseb9621712010-04-24 17:59:49 +00004569 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004570IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004572 ;;
4573esac
4574fi
4575CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4578$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004579else
Matthias Kloseb9621712010-04-24 17:59:49 +00004580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4581$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004583
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004584
4585fi
4586if test -z "$ac_cv_path_CXX"; then
4587 ac_pt_CXX=$CXX
4588 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4591$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004592if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004593 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004595 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004597 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 +00004598 ;;
4599 *)
4600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4601for as_dir in notfound
4602do
4603 IFS=$as_save_IFS
4604 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004607 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609 break 2
4610 fi
4611done
Matthias Kloseb9621712010-04-24 17:59:49 +00004612 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004614
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615 ;;
4616esac
4617fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004618ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4619if test -n "$ac_pt_CXX"; then
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4621$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004622else
Matthias Kloseb9621712010-04-24 17:59:49 +00004623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4624$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004626
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 if test "x$ac_pt_CXX" = x; then
4628 CXX="c++"
4629 else
4630 case $cross_compiling:$ac_tool_warned in
4631yes:)
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4633$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4634ac_tool_warned=yes ;;
4635esac
4636 CXX=$ac_pt_CXX
4637 fi
4638else
4639 CXX="$ac_cv_path_CXX"
4640fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004641 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004642 clang|*/clang) if test -n "$ac_tool_prefix"; then
4643 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4644set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if ${ac_cv_path_CXX+:} false; then :
4648 $as_echo_n "(cached) " >&6
4649else
4650 case $CXX in
4651 [\\/]* | ?:[\\/]*)
4652 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4653 ;;
4654 *)
4655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4656for as_dir in notfound
4657do
4658 IFS=$as_save_IFS
4659 test -z "$as_dir" && as_dir=.
4660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004662 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4664 break 2
4665 fi
4666done
4667 done
4668IFS=$as_save_IFS
4669
Ned Deilycbfb9a52012-06-23 16:02:19 -07004670 ;;
4671esac
4672fi
4673CXX=$ac_cv_path_CXX
4674if test -n "$CXX"; then
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4676$as_echo "$CXX" >&6; }
4677else
4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
4680fi
4681
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004682
4683fi
4684if test -z "$ac_cv_path_CXX"; then
4685 ac_pt_CXX=$CXX
4686 # Extract the first word of "clang++", so it can be a program name with args.
4687set dummy clang++; ac_word=$2
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
4690if ${ac_cv_path_ac_pt_CXX+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692else
4693 case $ac_pt_CXX in
4694 [\\/]* | ?:[\\/]*)
4695 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4696 ;;
4697 *)
4698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4699for as_dir in notfound
4700do
4701 IFS=$as_save_IFS
4702 test -z "$as_dir" && as_dir=.
4703 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004705 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4707 break 2
4708 fi
4709done
4710 done
4711IFS=$as_save_IFS
4712
4713 ;;
4714esac
4715fi
4716ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4717if test -n "$ac_pt_CXX"; then
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4719$as_echo "$ac_pt_CXX" >&6; }
4720else
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
4723fi
4724
4725 if test "x$ac_pt_CXX" = x; then
4726 CXX="clang++"
4727 else
4728 case $cross_compiling:$ac_tool_warned in
4729yes:)
4730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4732ac_tool_warned=yes ;;
4733esac
4734 CXX=$ac_pt_CXX
4735 fi
4736else
4737 CXX="$ac_cv_path_CXX"
4738fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004739 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 esac
4741 if test "$CXX" = "notfound"
4742 then
4743 CXX=""
4744 fi
4745fi
4746if test -z "$CXX"
4747then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004748 if test -n "$ac_tool_prefix"; then
4749 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4750 do
4751 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4752set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004755if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757else
4758 if test -n "$CXX"; then
4759 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4760else
4761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4762for as_dir in $PATH
4763do
4764 IFS=$as_save_IFS
4765 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004766 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004767 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 break 2
4771 fi
4772done
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004774IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775
4776fi
4777fi
4778CXX=$ac_cv_prog_CXX
4779if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4781$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782else
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785fi
4786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788 test -n "$CXX" && break
4789 done
4790fi
4791if test -z "$CXX"; then
4792 ac_ct_CXX=$CXX
4793 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4794do
4795 # Extract the first word of "$ac_prog", so it can be a program name with args.
4796set dummy $ac_prog; ac_word=$2
4797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4798$as_echo_n "checking for $ac_word... " >&6; }
4799if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4800 $as_echo_n "(cached) " >&6
4801else
4802 if test -n "$ac_ct_CXX"; then
4803 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4804else
4805as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in $PATH
4807do
4808 IFS=$as_save_IFS
4809 test -z "$as_dir" && as_dir=.
4810 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 ac_cv_prog_ac_ct_CXX="$ac_prog"
4813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814 break 2
4815 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817 done
4818IFS=$as_save_IFS
4819
4820fi
4821fi
4822ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4823if test -n "$ac_ct_CXX"; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4825$as_echo "$ac_ct_CXX" >&6; }
4826else
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4828$as_echo "no" >&6; }
4829fi
4830
4831
4832 test -n "$ac_ct_CXX" && break
4833done
4834
4835 if test "x$ac_ct_CXX" = x; then
4836 CXX="notfound"
4837 else
4838 case $cross_compiling:$ac_tool_warned in
4839yes:)
4840{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4841$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4842ac_tool_warned=yes ;;
4843esac
4844 CXX=$ac_ct_CXX
4845 fi
4846fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
4848 if test "$CXX" = "notfound"
4849 then
4850 CXX=""
4851 fi
4852fi
4853if test "$preset_cxx" != "$CXX"
4854then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004855 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004856
4857 By default, distutils will build C++ extension modules with \"$CXX\".
4858 If this is not intended, then set CXX on the configure command line.
4859 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004860$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861
4862 By default, distutils will build C++ extension modules with \"$CXX\".
4863 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004864 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865fi
4866
4867
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4869$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4870save_LDFLAGS="$LDFLAGS"
4871LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004872
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4874/* end confdefs.h. */
4875
4876int
4877main ()
4878{
4879
4880 ;
4881 return 0;
4882}
4883_ACEOF
4884if ac_fn_c_try_link "$LINENO"; then :
4885 NO_AS_NEEDED="-Wl,--no-as-needed"
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4887$as_echo "yes" >&6; }
4888else
4889 NO_AS_NEEDED=""
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893rm -f core conftest.err conftest.$ac_objext \
4894 conftest$ac_exeext conftest.$ac_ext
4895LDFLAGS="$save_LDFLAGS"
4896
4897
4898
4899# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004900ac_ext=c
4901ac_cpp='$CPP $CPPFLAGS'
4902ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4903ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4904ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4906$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907# On Suns, sometimes $CPP names a directory.
4908if test -n "$CPP" && test -d "$CPP"; then
4909 CPP=
4910fi
4911if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004912 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004913 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004914else
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 # Double quotes because CPP needs to be expanded
4916 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4917 do
4918 ac_preproc_ok=false
4919for ac_c_preproc_warn_flag in '' yes
4920do
4921 # Use a header file that comes with gcc, so configuring glibc
4922 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004923 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4924 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004925 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004928/* end confdefs.h. */
4929#ifdef __STDC__
4930# include <limits.h>
4931#else
4932# include <assert.h>
4933#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004937
Matthias Kloseb9621712010-04-24 17:59:49 +00004938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # Broken: fails on valid input.
4940continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004941fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004942rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004944 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004948#include <ac_nonexistent.h>
4949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004950if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 # Broken: success on invalid input.
4952continue
4953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 # Passes both tests.
4955ac_preproc_ok=:
4956break
4957fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004959
4960done
4961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004963if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 break
4965fi
4966
4967 done
4968 ac_cv_prog_CPP=$CPP
4969
4970fi
4971 CPP=$ac_cv_prog_CPP
4972else
4973 ac_cv_prog_CPP=$CPP
4974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4976$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004977ac_preproc_ok=false
4978for ac_c_preproc_warn_flag in '' yes
4979do
4980 # Use a header file that comes with gcc, so configuring glibc
4981 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004982 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4983 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 # On the NeXT, cc -E runs the code through the compiler's parser,
4985 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004987/* end confdefs.h. */
4988#ifdef __STDC__
4989# include <limits.h>
4990#else
4991# include <assert.h>
4992#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004993 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004995if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004996
Matthias Kloseb9621712010-04-24 17:59:49 +00004997else
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 # Broken: fails on valid input.
4999continue
5000fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005001rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00005004 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00005005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005007#include <ac_nonexistent.h>
5008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005009if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005010 # Broken: success on invalid input.
5011continue
5012else
Martin v. Löwis11437992002-04-12 09:54:03 +00005013 # Passes both tests.
5014ac_preproc_ok=:
5015break
5016fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005017rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005018
5019done
5020# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005021rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005022if $ac_preproc_ok; then :
5023
Martin v. Löwis11437992002-04-12 09:54:03 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5026$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005027as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005028See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005029fi
5030
5031ac_ext=c
5032ac_cpp='$CPP $CPPFLAGS'
5033ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5034ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5035ac_compiler_gnu=$ac_cv_c_compiler_gnu
5036
5037
Matthias Kloseb9621712010-04-24 17:59:49 +00005038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5039$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005040if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005042else
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 # Loop through the user's path and test for each of PROGNAME-LIST
5046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 for ac_prog in grep ggrep; do
5052 for ac_exec_ext in '' $ac_executable_extensions; do
5053 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005054 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005055# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 # Check for GNU $ac_path_GREP
5057case `"$ac_path_GREP" --version 2>&1` in
5058*GNU*)
5059 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5060*)
5061 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 while :
5064 do
5065 cat "conftest.in" "conftest.in" >"conftest.tmp"
5066 mv "conftest.tmp" "conftest.in"
5067 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5070 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005071 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005072 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5073 # Best one so far, save it but keep looking for a better one
5074 ac_cv_path_GREP="$ac_path_GREP"
5075 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005076 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 # 10*(2^10) chars as input seems more than enough
5078 test $ac_count -gt 10 && break
5079 done
5080 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5081esac
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $ac_path_GREP_found && break 3
5084 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005085 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005089 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 +00005090 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091else
5092 ac_cv_path_GREP=$GREP
5093fi
5094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5097$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098 GREP="$ac_cv_path_GREP"
5099
5100
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5102$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005103if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105else
5106 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5107 then ac_cv_path_EGREP="$GREP -E"
5108 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 # Loop through the user's path and test for each of PROGNAME-LIST
5112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005113for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5114do
5115 IFS=$as_save_IFS
5116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005117 for ac_prog in egrep; do
5118 for ac_exec_ext in '' $ac_executable_extensions; do
5119 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005120 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005121# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005122 # Check for GNU $ac_path_EGREP
5123case `"$ac_path_EGREP" --version 2>&1` in
5124*GNU*)
5125 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5126*)
5127 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005129 while :
5130 do
5131 cat "conftest.in" "conftest.in" >"conftest.tmp"
5132 mv "conftest.tmp" "conftest.in"
5133 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5136 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005138 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5139 # Best one so far, save it but keep looking for a better one
5140 ac_cv_path_EGREP="$ac_path_EGREP"
5141 ac_path_EGREP_max=$ac_count
5142 fi
5143 # 10*(2^10) chars as input seems more than enough
5144 test $ac_count -gt 10 && break
5145 done
5146 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5147esac
5148
Matthias Kloseb9621712010-04-24 17:59:49 +00005149 $ac_path_EGREP_found && break 3
5150 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005151 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005155 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 +00005156 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157else
5158 ac_cv_path_EGREP=$EGREP
5159fi
5160
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005161 fi
5162fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5164$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005165 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005166
5167
Matthias Kloseb9621712010-04-24 17:59:49 +00005168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5169$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005170if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005171 $as_echo_n "(cached) " >&6
5172else
5173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005174/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005175#include <stdlib.h>
5176#include <stdarg.h>
5177#include <string.h>
5178#include <float.h>
5179
5180int
5181main ()
5182{
5183
5184 ;
5185 return 0;
5186}
5187_ACEOF
5188if ac_fn_c_try_compile "$LINENO"; then :
5189 ac_cv_header_stdc=yes
5190else
5191 ac_cv_header_stdc=no
5192fi
5193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5194
5195if test $ac_cv_header_stdc = yes; then
5196 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5198/* end confdefs.h. */
5199#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005200
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005201_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005202if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005203 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005204
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005205else
Matthias Kloseb9621712010-04-24 17:59:49 +00005206 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005208rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005209
Matthias Kloseb9621712010-04-24 17:59:49 +00005210fi
5211
5212if test $ac_cv_header_stdc = yes; then
5213 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5215/* end confdefs.h. */
5216#include <stdlib.h>
5217
5218_ACEOF
5219if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5220 $EGREP "free" >/dev/null 2>&1; then :
5221
5222else
5223 ac_cv_header_stdc=no
5224fi
5225rm -f conftest*
5226
5227fi
5228
5229if test $ac_cv_header_stdc = yes; then
5230 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5231 if test "$cross_compiling" = yes; then :
5232 :
5233else
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235/* end confdefs.h. */
5236#include <ctype.h>
5237#include <stdlib.h>
5238#if ((' ' & 0x0FF) == 0x020)
5239# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5240# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5241#else
5242# define ISLOWER(c) \
5243 (('a' <= (c) && (c) <= 'i') \
5244 || ('j' <= (c) && (c) <= 'r') \
5245 || ('s' <= (c) && (c) <= 'z'))
5246# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5247#endif
5248
5249#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5250int
5251main ()
5252{
5253 int i;
5254 for (i = 0; i < 256; i++)
5255 if (XOR (islower (i), ISLOWER (i))
5256 || toupper (i) != TOUPPER (i))
5257 return 2;
5258 return 0;
5259}
5260_ACEOF
5261if ac_fn_c_try_run "$LINENO"; then :
5262
5263else
5264 ac_cv_header_stdc=no
5265fi
5266rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5267 conftest.$ac_objext conftest.beam conftest.$ac_ext
5268fi
5269
5270fi
5271fi
5272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5273$as_echo "$ac_cv_header_stdc" >&6; }
5274if test $ac_cv_header_stdc = yes; then
5275
5276$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5277
5278fi
5279
5280# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5281for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5282 inttypes.h stdint.h unistd.h
5283do :
5284 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5285ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5286"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005287if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005288 cat >>confdefs.h <<_ACEOF
5289#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5290_ACEOF
5291
5292fi
5293
5294done
5295
5296
5297
5298 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 +02005299if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005300 MINIX=yes
5301else
5302 MINIX=
5303fi
5304
5305
5306 if test "$MINIX" = yes; then
5307
5308$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5309
5310
5311$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5312
5313
5314$as_echo "#define _MINIX 1" >>confdefs.h
5315
5316 fi
5317
5318
5319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5320$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005321if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005322 $as_echo_n "(cached) " >&6
5323else
5324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h. */
5326
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005327# define __EXTENSIONS__ 1
5328 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005329int
5330main ()
5331{
5332
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337if ac_fn_c_try_compile "$LINENO"; then :
5338 ac_cv_safe_to_define___extensions__=yes
5339else
5340 ac_cv_safe_to_define___extensions__=no
5341fi
5342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5343fi
5344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5345$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5346 test $ac_cv_safe_to_define___extensions__ = yes &&
5347 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5348
5349 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5350
5351 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5352
5353 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5354
5355 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5356
5357
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005359# Check for unsupported systems
5360case $ac_sys_system/$ac_sys_release in
5361atheos*|Linux*/1*)
5362 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5363 echo See README for details.
5364 exit 1;;
5365esac
5366
5367
Matthias Kloseb9621712010-04-24 17:59:49 +00005368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5369$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370
5371# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005372if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373 withval=$with_suffix;
5374 case $withval in
5375 no) EXEEXT=;;
5376 yes) EXEEXT=.exe;;
5377 *) EXEEXT=$withval;;
5378 esac
5379fi
5380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5382$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384# Test whether we're running on a non-case-sensitive system, in which
5385# case we give a warning if no ext is given
5386
Matthias Kloseb9621712010-04-24 17:59:49 +00005387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5388$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005389if test ! -d CaseSensitiveTestDir; then
5390mkdir CaseSensitiveTestDir
5391fi
5392
5393if test -d casesensitivetestdir
5394then
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5396$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 BUILDEXEEXT=.exe
5398else
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5400$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401 BUILDEXEEXT=$EXEEXT
5402fi
5403rmdir CaseSensitiveTestDir
5404
5405case $MACHDEP in
5406bsdos*)
5407 case $CC in
5408 gcc) CC="$CC -D_HAVE_BSDI";;
5409 esac;;
5410esac
5411
5412case $ac_sys_system in
5413hp*|HP*)
5414 case $CC in
5415 cc|*/cc) CC="$CC -Ae";;
5416 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005417esac
5418
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005419MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5420
5421
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422
5423
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5425$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426if test -z "$LIBRARY"
5427then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005428 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5431$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433# LDLIBRARY is the name of the library to link against (as opposed to the
5434# name of the library into which to insert object files). BLDLIBRARY is also
5435# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5436# is blank as the main program is not linked directly against LDLIBRARY.
5437# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5438# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5439# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5440# DLLLIBRARY is the shared (i.e., DLL) library.
5441#
5442# RUNSHARED is used to run shared python without installed libraries
5443#
5444# INSTSONAME is the name of the shared library that will be use to install
5445# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005446#
5447# LDVERSION is the shared library version number, normally the Python version
5448# with the ABI build flags appended.
5449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
5451
5452
5453
5454
5455
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005456
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457LDLIBRARY="$LIBRARY"
5458BLDLIBRARY='$(LDLIBRARY)'
5459INSTSONAME='$(LDLIBRARY)'
5460DLLLIBRARY=''
5461LDLIBRARYDIR=''
5462RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005463LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
5465# LINKCC is the command that links the python executable -- default is $(CC).
5466# If CXX is set, and if it is needed to link a main function that was
5467# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5468# python might then depend on the C++ runtime
5469# This is altered for AIX in order to build the export list before
5470# linking.
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5473$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474if test -z "$LINKCC"
5475then
5476 LINKCC='$(PURIFY) $(MAINCC)'
5477 case $ac_sys_system in
5478 AIX*)
5479 exp_extra="\"\""
5480 if test $ac_sys_release -ge 5 -o \
5481 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5482 exp_extra="."
5483 fi
5484 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005485 QNX*)
5486 # qcc must be used because the other compilers do not
5487 # support -N.
5488 LINKCC=qcc;;
5489 esac
5490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5492$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
5494# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5495# make sure we default having it set to "no": this is used by
5496# distutils.unixccompiler to know if it should add --enable-new-dtags
5497# to linker command lines, and failing to detect GNU ld simply results
5498# in the same bahaviour as before.
5499
Matthias Kloseb9621712010-04-24 17:59:49 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5501$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005502ac_prog=ld
5503if test "$GCC" = yes; then
5504 ac_prog=`$CC -print-prog-name=ld`
5505fi
5506case `"$ac_prog" -V 2>&1 < /dev/null` in
5507 *GNU*)
5508 GNULD=yes;;
5509 *)
5510 GNULD=no;;
5511esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5513$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005514
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5516$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005517if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005518 $as_echo_n "(cached) " >&6
5519else
5520 ac_cv_c_inline=no
5521for ac_kw in inline __inline__ __inline; do
5522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5523/* end confdefs.h. */
5524#ifndef __cplusplus
5525typedef int foo_t;
5526static $ac_kw foo_t static_foo () {return 0; }
5527$ac_kw foo_t foo () {return 0; }
5528#endif
5529
5530_ACEOF
5531if ac_fn_c_try_compile "$LINENO"; then :
5532 ac_cv_c_inline=$ac_kw
5533fi
5534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 test "$ac_cv_c_inline" != no && break
5536done
5537
5538fi
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5540$as_echo "$ac_cv_c_inline" >&6; }
5541
5542case $ac_cv_c_inline in
5543 inline | yes) ;;
5544 *)
5545 case $ac_cv_c_inline in
5546 no) ac_val=;;
5547 *) ac_val=$ac_cv_c_inline;;
5548 esac
5549 cat >>confdefs.h <<_ACEOF
5550#ifndef __cplusplus
5551#define inline $ac_val
5552#endif
5553_ACEOF
5554 ;;
5555esac
5556
5557if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005558
5559$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005560
5561
5562fi
5563
5564
Matthias Kloseb9621712010-04-24 17:59:49 +00005565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5566$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005568if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569 enableval=$enable_shared;
5570fi
5571
5572
5573if test -z "$enable_shared"
5574then
5575 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005576 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005577 enable_shared="yes";;
5578 *)
5579 enable_shared="no";;
5580 esac
5581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5583$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005584
Matthias Kloseb9621712010-04-24 17:59:49 +00005585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5586$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005588if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589 enableval=$enable_profiling;
5590fi
5591
5592if test "x$enable_profiling" = xyes; then
5593 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005594 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596/* end confdefs.h. */
5597int main() { return 0; }
5598_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005599if ac_fn_c_try_link "$LINENO"; then :
5600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005602 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005603fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005604rm -f core conftest.err conftest.$ac_objext \
5605 conftest$ac_exeext conftest.$ac_ext
5606 CC="$ac_save_cc"
5607else
5608 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5611$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612
doko@ubuntu.comba015832012-06-30 16:52:05 +02005613if test "x$enable_profiling" = xyes; then
5614 BASECFLAGS="-pg $BASECFLAGS"
5615 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616fi
5617
Matthias Kloseb9621712010-04-24 17:59:49 +00005618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5619$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5622# library that we build, but we do not want to link against it (we
5623# will find it with a -framework option). For this reason there is an
5624# extra variable BLDLIBRARY against which Python and the extension
5625# modules are linked, BLDLIBRARY. This is normally the same as
5626# LDLIBRARY, but empty for MacOSX framework builds.
5627if test "$enable_framework"
5628then
5629 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005630 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 BLDLIBRARY=''
5632else
5633 BLDLIBRARY='$(LDLIBRARY)'
5634fi
5635
5636# Other platforms follow
5637if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005638 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639
Matthias Kloseb9621712010-04-24 17:59:49 +00005640$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642 case $ac_sys_system in
5643 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).dll.a'
5645 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646 ;;
5647 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005648 LDLIBRARY='libpython$(LDVERSION).so'
5649 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005650 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651 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 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005657 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005658 LDLIBRARY='libpython$(LDVERSION).so'
5659 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005660 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005662 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005663 then
5664 PY3LIBRARY=libpython3.so
5665 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ;;
5667 hp*|HP*)
5668 case `uname -m` in
5669 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005670 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 ;;
5672 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005673 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674 ;;
5675 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005676 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005677 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005680 LDLIBRARY='libpython$(LDVERSION).dylib'
5681 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005682 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005684 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005685 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005686 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005687 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688
5689 esac
5690else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005691 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 case $ac_sys_system in
5693 CYGWIN*)
5694 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005695 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 ;;
5697 esac
5698fi
5699
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005700if test "$cross_compiling" = yes; then
5701 RUNSHARED=
5702fi
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5705$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707if test -n "$ac_tool_prefix"; then
5708 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5709set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5711$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005712if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714else
5715 if test -n "$RANLIB"; then
5716 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5717else
5718as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719for as_dir in $PATH
5720do
5721 IFS=$as_save_IFS
5722 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727 break 2
5728 fi
5729done
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731IFS=$as_save_IFS
5732
5733fi
5734fi
5735RANLIB=$ac_cv_prog_RANLIB
5736if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5738$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739else
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
5743
5744
5745fi
5746if test -z "$ac_cv_prog_RANLIB"; then
5747 ac_ct_RANLIB=$RANLIB
5748 # Extract the first word of "ranlib", so it can be a program name with args.
5749set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005752if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754else
5755 if test -n "$ac_ct_RANLIB"; then
5756 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5757else
5758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5759for as_dir in $PATH
5760do
5761 IFS=$as_save_IFS
5762 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 break 2
5768 fi
5769done
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771IFS=$as_save_IFS
5772
5773fi
5774fi
5775ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5776if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5778$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779else
Matthias Kloseb9621712010-04-24 17:59:49 +00005780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782fi
5783
5784 if test "x$ac_ct_RANLIB" = x; then
5785 RANLIB=":"
5786 else
5787 case $cross_compiling:$ac_tool_warned in
5788yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791ac_tool_warned=yes ;;
5792esac
5793 RANLIB=$ac_ct_RANLIB
5794 fi
5795else
5796 RANLIB="$ac_cv_prog_RANLIB"
5797fi
5798
5799
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005800if test -n "$ac_tool_prefix"; then
5801 for ac_prog in ar aal
5802 do
5803 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5804set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005807if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809else
5810 if test -n "$AR"; then
5811 ac_cv_prog_AR="$AR" # Let the user override the test.
5812else
5813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822 break 2
5823 fi
5824done
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826IFS=$as_save_IFS
5827
5828fi
5829fi
5830AR=$ac_cv_prog_AR
5831if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5833$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834else
Matthias Kloseb9621712010-04-24 17:59:49 +00005835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
5838
5839
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005840 test -n "$AR" && break
5841 done
5842fi
5843if test -z "$AR"; then
5844 ac_ct_AR=$AR
5845 for ac_prog in ar aal
5846do
5847 # Extract the first word of "$ac_prog", so it can be a program name with args.
5848set dummy $ac_prog; ac_word=$2
5849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5850$as_echo_n "checking for $ac_word... " >&6; }
5851if ${ac_cv_prog_ac_ct_AR+:} false; then :
5852 $as_echo_n "(cached) " >&6
5853else
5854 if test -n "$ac_ct_AR"; then
5855 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5856else
5857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5858for as_dir in $PATH
5859do
5860 IFS=$as_save_IFS
5861 test -z "$as_dir" && as_dir=.
5862 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005864 ac_cv_prog_ac_ct_AR="$ac_prog"
5865 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5866 break 2
5867 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005869 done
5870IFS=$as_save_IFS
5871
5872fi
5873fi
5874ac_ct_AR=$ac_cv_prog_ac_ct_AR
5875if test -n "$ac_ct_AR"; then
5876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5877$as_echo "$ac_ct_AR" >&6; }
5878else
5879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5880$as_echo "no" >&6; }
5881fi
5882
5883
5884 test -n "$ac_ct_AR" && break
5885done
5886
5887 if test "x$ac_ct_AR" = x; then
5888 AR="ar"
5889 else
5890 case $cross_compiling:$ac_tool_warned in
5891yes:)
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5894ac_tool_warned=yes ;;
5895esac
5896 AR=$ac_ct_AR
5897 fi
5898fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899
5900
5901# tweak ARFLAGS only if the user didn't set it on the command line
5902
5903if test -z "$ARFLAGS"
5904then
5905 ARFLAGS="rc"
5906fi
5907
doko@ubuntu.com58844492012-06-30 18:25:32 +02005908if test -n "$ac_tool_prefix"; then
5909 for ac_prog in readelf
5910 do
5911 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5912set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_prog_READELF+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917else
5918 if test -n "$READELF"; then
5919 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5920else
5921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924 IFS=$as_save_IFS
5925 test -z "$as_dir" && as_dir=.
5926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005928 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930 break 2
5931 fi
5932done
5933 done
5934IFS=$as_save_IFS
5935
5936fi
5937fi
5938READELF=$ac_cv_prog_READELF
5939if test -n "$READELF"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5941$as_echo "$READELF" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948 test -n "$READELF" && break
5949 done
5950fi
5951if test -z "$READELF"; then
5952 ac_ct_READELF=$READELF
5953 for ac_prog in readelf
5954do
5955 # Extract the first word of "$ac_prog", so it can be a program name with args.
5956set dummy $ac_prog; ac_word=$2
5957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5958$as_echo_n "checking for $ac_word... " >&6; }
5959if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5960 $as_echo_n "(cached) " >&6
5961else
5962 if test -n "$ac_ct_READELF"; then
5963 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5964else
5965as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5966for as_dir in $PATH
5967do
5968 IFS=$as_save_IFS
5969 test -z "$as_dir" && as_dir=.
5970 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005972 ac_cv_prog_ac_ct_READELF="$ac_prog"
5973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5974 break 2
5975 fi
5976done
5977 done
5978IFS=$as_save_IFS
5979
5980fi
5981fi
5982ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5983if test -n "$ac_ct_READELF"; then
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5985$as_echo "$ac_ct_READELF" >&6; }
5986else
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
5989fi
5990
5991
5992 test -n "$ac_ct_READELF" && break
5993done
5994
5995 if test "x$ac_ct_READELF" = x; then
5996 READELF=":"
5997 else
5998 case $cross_compiling:$ac_tool_warned in
5999yes:)
6000{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6001$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6002ac_tool_warned=yes ;;
6003esac
6004 READELF=$ac_ct_READELF
6005 fi
6006fi
6007
6008if test "$cross_compiling" = yes; then
6009 case "$READELF" in
6010 readelf|:)
6011 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6012 ;;
6013 esac
6014fi
6015
6016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017
Matthias Klosec4c48422012-10-21 23:05:35 +02006018for ac_prog in python$PACKAGE_VERSION python3 python
6019do
6020 # Extract the first word of "$ac_prog", so it can be a program name with args.
6021set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6023$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006024if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo_n "(cached) " >&6
6026else
Matthias Klosec4c48422012-10-21 23:05:35 +02006027 if test -n "$PYTHON"; then
6028 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029else
6030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033 IFS=$as_save_IFS
6034 test -z "$as_dir" && as_dir=.
6035 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006037 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6039 break 2
6040 fi
6041done
6042 done
6043IFS=$as_save_IFS
6044
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006045fi
6046fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006047PYTHON=$ac_cv_prog_PYTHON
6048if test -n "$PYTHON"; then
6049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6050$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006051else
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054fi
6055
6056
Matthias Klosec4c48422012-10-21 23:05:35 +02006057 test -n "$PYTHON" && break
6058done
6059test -n "$PYTHON" || PYTHON="not-found"
6060
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006061if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006062 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6063else
6064 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006065fi
6066
6067
Kushal Das02d23a22014-04-15 23:50:06 +05306068for ac_prog in python$PACKAGE_VERSION python3 python
6069do
6070 # Extract the first word of "$ac_prog", so it can be a program name with args.
6071set dummy $ac_prog; ac_word=$2
6072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6073$as_echo_n "checking for $ac_word... " >&6; }
6074if ${ac_cv_prog_PYTHON+:} false; then :
6075 $as_echo_n "(cached) " >&6
6076else
6077 if test -n "$PYTHON"; then
6078 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6079else
6080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
6085 for ac_exec_ext in '' $ac_executable_extensions; do
6086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6087 ac_cv_prog_PYTHON="$ac_prog"
6088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6089 break 2
6090 fi
6091done
6092 done
6093IFS=$as_save_IFS
6094
6095fi
6096fi
6097PYTHON=$ac_cv_prog_PYTHON
6098if test -n "$PYTHON"; then
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6100$as_echo "$PYTHON" >&6; }
6101else
6102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6103$as_echo "no" >&6; }
6104fi
6105
6106
6107 test -n "$PYTHON" && break
6108done
6109test -n "$PYTHON" || PYTHON="not-found"
6110
6111if test "$PYTHON" = not-found; then
6112 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6113else
6114 OPCODEHGEN="$PYTHON"
6115fi
6116
6117
6118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119case $MACHDEP in
6120bsdos*|hp*|HP*)
6121 # install -d does not work on BSDI or HP-UX
6122 if test -z "$INSTALL"
6123 then
6124 INSTALL="${srcdir}/install-sh -c"
6125 fi
6126esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127# Find a good install program. We prefer a C program (faster),
6128# so one script is as good as another. But avoid the broken or
6129# incompatible versions:
6130# SysV /etc/install, /usr/sbin/install
6131# SunOS /usr/etc/install
6132# IRIX /sbin/install
6133# AIX /bin/install
6134# AmigaOS /C/install, which installs bootblocks on floppy discs
6135# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6136# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6137# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6138# OS/2's system install, which has a completely different semantic
6139# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006140# Reject install programs that cannot install multiple files.
6141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6142$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006144if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146else
6147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6148for as_dir in $PATH
6149do
6150 IFS=$as_save_IFS
6151 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 # Account for people who put trailing slashes in PATH elements.
6153case $as_dir/ in #((
6154 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 /usr/ucb/* ) ;;
6158 *)
6159 # OSF1 and SCO ODT 3.0 have their own names for install.
6160 # Don't use installbsd from OSF since it installs stuff as root
6161 # by default.
6162 for ac_prog in ginstall scoinst install; do
6163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006164 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165 if test $ac_prog = install &&
6166 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6167 # AIX install. It has an incompatible calling convention.
6168 :
6169 elif test $ac_prog = install &&
6170 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6171 # program-specific install script used by HP pwplus--don't use.
6172 :
6173 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006174 rm -rf conftest.one conftest.two conftest.dir
6175 echo one > conftest.one
6176 echo two > conftest.two
6177 mkdir conftest.dir
6178 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6179 test -s conftest.one && test -s conftest.two &&
6180 test -s conftest.dir/conftest.one &&
6181 test -s conftest.dir/conftest.two
6182 then
6183 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6184 break 3
6185 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186 fi
6187 fi
6188 done
6189 done
6190 ;;
6191esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006192
6193 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194IFS=$as_save_IFS
6195
Matthias Kloseb9621712010-04-24 17:59:49 +00006196rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006197
6198fi
6199 if test "${ac_cv_path_install+set}" = set; then
6200 INSTALL=$ac_cv_path_install
6201 else
6202 # As a last resort, use the slow shell script. Don't cache a
6203 # value for INSTALL within a source directory, because that will
6204 # break other packages using the cache if that directory is
6205 # removed, or if the value is a relative name.
6206 INSTALL=$ac_install_sh
6207 fi
6208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6210$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
6212# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6213# It thinks the first close brace ends the variable substitution.
6214test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6215
6216test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6217
6218test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6219
Matthias Klose93a0ef12012-03-15 18:08:34 +01006220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6221$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6222if test -z "$MKDIR_P"; then
6223 if ${ac_cv_path_mkdir+:} false; then :
6224 $as_echo_n "(cached) " >&6
6225else
6226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6227for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6228do
6229 IFS=$as_save_IFS
6230 test -z "$as_dir" && as_dir=.
6231 for ac_prog in mkdir gmkdir; do
6232 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006233 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006234 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6235 'mkdir (GNU coreutils) '* | \
6236 'mkdir (coreutils) '* | \
6237 'mkdir (fileutils) '4.1*)
6238 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6239 break 3;;
6240 esac
6241 done
6242 done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247
6248 test -d ./--version && rmdir ./--version
6249 if test "${ac_cv_path_mkdir+set}" = set; then
6250 MKDIR_P="$ac_cv_path_mkdir -p"
6251 else
6252 # As a last resort, use the slow shell script. Don't cache a
6253 # value for MKDIR_P within a source directory, because that will
6254 # break other packages using the cache if that directory is
6255 # removed, or if the value is a relative name.
6256 MKDIR_P="$ac_install_sh -d"
6257 fi
6258fi
6259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6260$as_echo "$MKDIR_P" >&6; }
6261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006262
6263# Not every filesystem supports hard links
6264
6265if test -z "$LN" ; then
6266 case $ac_sys_system in
6267 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 *) LN=ln;;
6269 esac
6270fi
6271
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006272# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006273
6274ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006275
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6278$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279
6280# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006281if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006282 withval=$with_pydebug;
6283if test "$withval" != no
6284then
6285
Matthias Kloseb9621712010-04-24 17:59:49 +00006286$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
Matthias Kloseb9621712010-04-24 17:59:49 +00006288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6289$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006291 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006292else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6293$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294fi
6295else
Matthias Kloseb9621712010-04-24 17:59:49 +00006296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6297$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298fi
6299
6300
6301# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6302# merged with this chunk of code?
6303
6304# Optimizer/debugger flags
6305# ------------------------
6306# (The following bit of code is complicated enough - please keep things
6307# indented properly. Just pretend you're editing Python code. ;-)
6308
6309# There are two parallel sets of case statements below, one that checks to
6310# see if OPT was set and one that does BASECFLAGS setting based upon
6311# compiler and platform. BASECFLAGS tweaks need to be made even if the
6312# user set OPT.
6313
6314# tweak OPT based on compiler and platform, only if the user didn't set
6315# it on the command line
6316
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006317if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318then
6319 case $GCC in
6320 yes)
6321 if test "$CC" != 'g++' ; then
6322 STRICT_PROTO="-Wstrict-prototypes"
6323 fi
6324 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6325 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6326 WRAP="-fwrapv"
6327 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006328
6329 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006330 case $CC in
6331 *clang*) WRAP="-fwrapv"
6332 ;;
6333 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335 case $ac_cv_prog_cc_g in
6336 yes)
6337 if test "$Py_DEBUG" = 'true' ; then
6338 # Optimization messes up debuggers, so turn it off for
6339 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006340 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6341 OPT="-g -Og -Wall $STRICT_PROTO"
6342 else
6343 OPT="-g -O0 -Wall $STRICT_PROTO"
6344 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345 else
6346 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6347 fi
6348 ;;
6349 *)
6350 OPT="-O3 -Wall $STRICT_PROTO"
6351 ;;
6352 esac
6353 case $ac_sys_system in
6354 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6355 ;;
6356 esac
6357 ;;
6358
6359 *)
6360 OPT="-O"
6361 ;;
6362 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363fi
6364
6365
6366
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368# The -arch flags for universal builds on OSX
6369UNIVERSAL_ARCH_FLAGS=
6370
6371
6372# tweak BASECFLAGS based on compiler and platform
6373case $GCC in
6374yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006375 # Python doesn't violate C99 aliasing rules, but older versions of
6376 # GCC produce warnings for legal Python code. Enable
6377 # -fno-strict-aliasing on versions of GCC that support but produce
6378 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6380$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381 ac_save_cc="$CC"
6382 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006383 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006384 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006385 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006386else
Matthias Kloseb9621712010-04-24 17:59:49 +00006387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006389
Matthias Kloseb159a552010-04-25 21:00:44 +00006390
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006391int
6392main ()
6393{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006394
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006395 ;
6396 return 0;
6397}
Matthias Kloseb159a552010-04-25 21:00:44 +00006398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006400if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006401
6402 CC="$ac_save_cc -fstrict-aliasing"
6403 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006405/* end confdefs.h. */
6406
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006407 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006408int
6409main ()
6410{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006411double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006412 ;
6413 return 0;
6414}
Matthias Kloseb159a552010-04-25 21:00:44 +00006415
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006417if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006418
6419 ac_cv_no_strict_aliasing=no
6420
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421else
Matthias Kloseb159a552010-04-25 21:00:44 +00006422
6423 ac_cv_no_strict_aliasing=yes
6424
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006425fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006427
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006428else
Matthias Kloseb159a552010-04-25 21:00:44 +00006429
6430 ac_cv_no_strict_aliasing=no
6431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006434fi
6435
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006436 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6439$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006440 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441 then
6442 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6443 fi
6444
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6446$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6447 ac_save_cc="$CC"
6448 CC="$CC -Wunused-result -Werror"
6449 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006450 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006451 $as_echo_n "(cached) " >&6
6452else
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454/* end confdefs.h. */
6455
6456
6457int
6458main ()
6459{
6460
6461 ;
6462 return 0;
6463}
6464
6465_ACEOF
6466if ac_fn_c_try_compile "$LINENO"; then :
6467
6468 ac_cv_disable_unused_result_warning=yes
6469
6470else
6471
6472 ac_cv_disable_unused_result_warning=no
6473
6474fi
6475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6476fi
6477
6478 CFLAGS="$save_CFLAGS"
6479 CC="$ac_save_cc"
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6481$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6482
6483 if test $ac_cv_disable_unused_result_warning = yes
6484 then
6485 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6486 fi
6487
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6489$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6490 ac_save_cc="$CC"
6491 CC="$CC -Werror=declaration-after-statement"
6492 save_CFLAGS="$CFLAGS"
6493 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6494 $as_echo_n "(cached) " >&6
6495else
6496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6497/* end confdefs.h. */
6498
6499
6500int
6501main ()
6502{
6503
6504 ;
6505 return 0;
6506}
6507
6508_ACEOF
6509if ac_fn_c_try_compile "$LINENO"; then :
6510
6511 ac_cv_declaration_after_statement_warning=yes
6512
6513else
6514
6515 ac_cv_declaration_after_statement_warning=no
6516
6517fi
6518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519fi
6520
6521 CFLAGS="$save_CFLAGS"
6522 CC="$ac_save_cc"
6523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6524$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6525
6526 if test $ac_cv_declaration_after_statement_warning = yes
6527 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006528 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006529 fi
6530
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6532$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6533 ac_save_cc="$CC"
6534 CC="$CC -Wsign-compare"
6535 save_CFLAGS="$CFLAGS"
6536 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6537 $as_echo_n "(cached) " >&6
6538else
6539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6540/* end confdefs.h. */
6541
6542
6543int
6544main ()
6545{
6546
6547 ;
6548 return 0;
6549}
6550
6551_ACEOF
6552if ac_fn_c_try_compile "$LINENO"; then :
6553
6554 ac_cv_enable_sign_compare_warning=yes
6555
6556else
6557
6558 ac_cv_enable_sign_compare_warning=no
6559
6560fi
6561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6562fi
6563
6564 CFLAGS="$save_CFLAGS"
6565 CC="$ac_save_cc"
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6567$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6568
6569 if test $ac_cv_enable_sign_compare_warning = yes
6570 then
6571 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6572 fi
6573
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6575$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6576 ac_save_cc="$CC"
6577 CC="$CC -Wunreachable-code"
6578 save_CFLAGS="$CFLAGS"
6579 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6580 $as_echo_n "(cached) " >&6
6581else
6582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6583/* end confdefs.h. */
6584
6585
6586int
6587main ()
6588{
6589
6590 ;
6591 return 0;
6592}
6593
6594_ACEOF
6595if ac_fn_c_try_compile "$LINENO"; then :
6596
6597 ac_cv_enable_unreachable_code_warning=yes
6598
6599else
6600
6601 ac_cv_enable_unreachable_code_warning=no
6602
6603fi
6604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605fi
6606
6607 CFLAGS="$save_CFLAGS"
6608 CC="$ac_save_cc"
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6610$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6611
6612 # Don't enable unreachable code warning in debug mode, since it usually
6613 # results in non-standard code paths.
6614 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6615 then
6616 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6617 fi
6618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6620 # support. Without this, treatment of subnormals doesn't follow
6621 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006622 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623 alpha*)
6624 BASECFLAGS="$BASECFLAGS -mieee"
6625 ;;
6626 esac
6627
6628 case $ac_sys_system in
6629 SCO_SV*)
6630 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6631 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006632
6633 # is there any other compiler on Darwin besides gcc?
6634 Darwin*)
6635 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6636 # used to be here, but non-Apple gcc doesn't accept them.
6637 if test "${CC}" = gcc
6638 then
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006640$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006641 case "${UNIVERSALSDK}" in
6642 */MacOSX10.4u.sdk)
6643 # Build using 10.4 SDK, force usage of gcc when the
6644 # compiler is gcc, otherwise the user will get very
6645 # confusing error messages when building on OSX 10.6
6646 CC=gcc-4.0
6647 CPP=cpp-4.0
6648 ;;
6649 esac
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006651$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653
Ned Deily87adb6e2013-10-18 21:09:56 -07006654 if test "${enable_universalsdk}"
6655 then
6656 case "$UNIVERSAL_ARCHS" in
6657 32-bit)
6658 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6659 LIPO_32BIT_FLAGS=""
6660 ARCH_RUN_32BIT=""
6661 ;;
6662 64-bit)
6663 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6664 LIPO_32BIT_FLAGS=""
6665 ARCH_RUN_32BIT="true"
6666 ;;
6667 all)
6668 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6669 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6670 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6671 ;;
6672 intel)
6673 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6674 LIPO_32BIT_FLAGS="-extract i386"
6675 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6676 ;;
6677 intel-32)
6678 UNIVERSAL_ARCH_FLAGS="-arch i386"
6679 LIPO_32BIT_FLAGS=""
6680 ARCH_RUN_32BIT=""
6681 ;;
6682 3-way)
6683 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6684 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6685 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6686 ;;
6687 *)
6688 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6689 ;;
6690 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691
Ned Deily87adb6e2013-10-18 21:09:56 -07006692 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6693 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6694 if test "${UNIVERSALSDK}" != "/"
6695 then
6696 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6697 fi
6698 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699
Ned Deily87adb6e2013-10-18 21:09:56 -07006700 # Calculate an appropriate deployment target for this build:
6701 # The deployment target value is used explicitly to enable certain
6702 # features are enabled (such as builtin libedit support for readline)
6703 # through the use of Apple's Availabiliy Macros and is used as a
6704 # component of the string returned by distutils.get_platform().
6705 #
6706 # Use the value from:
6707 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6708 # 2. the operating system version of the build machine if >= 10.6
6709 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6710 # below to pick either 10.3, 10.4, or 10.5 as the target.
6711 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712
Ned Deily87adb6e2013-10-18 21:09:56 -07006713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6714$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006715 cur_target_major=`sw_vers -productVersion | \
6716 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6717 cur_target_minor=`sw_vers -productVersion | \
6718 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6719 cur_target="${cur_target_major}.${cur_target_minor}"
6720 if test ${cur_target_major} -eq 10 && \
6721 test ${cur_target_minor} -ge 3 && \
6722 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006723 then
Ned Deily36820b62014-06-25 13:44:22 -07006724 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006725 cur_target=10.3
6726 if test ${enable_universalsdk}
6727 then
6728 case "$UNIVERSAL_ARCHS" in
6729 all|3-way|intel|64-bit)
6730 # These configurations were first supported in 10.5
6731 cur_target='10.5'
6732 ;;
6733 esac
6734 else
6735 if test `/usr/bin/arch` = "i386"
6736 then
6737 # 10.4 was the first release to support Intel archs
6738 cur_target="10.4"
6739 fi
6740 fi
6741 fi
6742 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006743
Ned Deily87adb6e2013-10-18 21:09:56 -07006744 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6745 # environment with a value that is the same as what we'll use
6746 # in the Makefile to ensure that we'll get the same compiler
6747 # environment during configure and build time.
6748 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6749 export MACOSX_DEPLOYMENT_TARGET
6750 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6752$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006753
Ned Deily87adb6e2013-10-18 21:09:56 -07006754 # end of Darwin* tests
6755 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756 esac
6757 ;;
6758
6759*)
6760 case $ac_sys_system in
6761 OpenUNIX*|UnixWare*)
6762 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6763 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 SCO_SV*)
6765 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6766 ;;
6767 esac
6768 ;;
6769esac
6770
6771if test "$Py_DEBUG" = 'true'; then
6772 :
6773else
6774 OPT="-DNDEBUG $OPT"
6775fi
6776
6777if test "$ac_arch_flags"
6778then
6779 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6780fi
6781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782# On some compilers, pthreads are available without further options
6783# (e.g. MacOS X). On some of these systems, the compiler will not
6784# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6785# So we have to see first whether pthreads are available without
6786# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6788$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006789if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793 ac_cv_pthread_is_default=no
6794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
6797
Stefan Krah7dba5942012-11-22 22:49:11 +01006798#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799#include <pthread.h>
6800
6801void* routine(void* p){return NULL;}
6802
6803int main(){
6804 pthread_t p;
6805 if(pthread_create(&p,NULL,routine,NULL)!=0)
6806 return 1;
6807 (void)pthread_detach(p);
6808 return 0;
6809}
6810
6811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813
6814 ac_cv_pthread_is_default=yes
6815 ac_cv_kthread=no
6816 ac_cv_pthread=no
6817
6818else
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823fi
6824
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
6827
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6829$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830
6831
6832if test $ac_cv_pthread_is_default = yes
6833then
6834 ac_cv_kpthread=no
6835else
6836# -Kpthread, if available, provides the right #defines
6837# and linker options to make pthread_create available
6838# Some compilers won't report that they do not support -Kpthread,
6839# so we need to run a program to see whether it really made the
6840# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6842$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006843if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006844 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845else
6846 ac_save_cc="$CC"
6847CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 ac_cv_kpthread=no
6850else
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853
Stefan Krah7dba5942012-11-22 22:49:11 +01006854#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855#include <pthread.h>
6856
6857void* routine(void* p){return NULL;}
6858
6859int main(){
6860 pthread_t p;
6861 if(pthread_create(&p,NULL,routine,NULL)!=0)
6862 return 1;
6863 (void)pthread_detach(p);
6864 return 0;
6865}
6866
6867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 ac_cv_kpthread=yes
6870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875fi
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877CC="$ac_save_cc"
6878fi
6879
Matthias Kloseb9621712010-04-24 17:59:49 +00006880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6881$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006882fi
6883
6884if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6885then
6886# -Kthread, if available, provides the right #defines
6887# and linker options to make pthread_create available
6888# Some compilers won't report that they do not support -Kthread,
6889# so we need to run a program to see whether it really made the
6890# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6892$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006893if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895else
6896 ac_save_cc="$CC"
6897CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006898if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899 ac_cv_kthread=no
6900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902/* end confdefs.h. */
6903
Stefan Krah7dba5942012-11-22 22:49:11 +01006904#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905#include <pthread.h>
6906
6907void* routine(void* p){return NULL;}
6908
6909int main(){
6910 pthread_t p;
6911 if(pthread_create(&p,NULL,routine,NULL)!=0)
6912 return 1;
6913 (void)pthread_detach(p);
6914 return 0;
6915}
6916
6917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006918if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919 ac_cv_kthread=yes
6920else
Matthias Kloseb9621712010-04-24 17:59:49 +00006921 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925fi
6926
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927CC="$ac_save_cc"
6928fi
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6931$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932fi
6933
6934if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6935then
6936# -pthread, if available, provides the right #defines
6937# and linker options to make pthread_create available
6938# Some compilers won't report that they do not support -pthread,
6939# so we need to run a program to see whether it really made the
6940# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6942$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006943if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945else
6946 ac_save_cc="$CC"
6947CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006948if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949 ac_cv_pthread=no
6950else
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952/* end confdefs.h. */
6953
Stefan Krah7dba5942012-11-22 22:49:11 +01006954#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006955#include <pthread.h>
6956
6957void* routine(void* p){return NULL;}
6958
6959int main(){
6960 pthread_t p;
6961 if(pthread_create(&p,NULL,routine,NULL)!=0)
6962 return 1;
6963 (void)pthread_detach(p);
6964 return 0;
6965}
6966
6967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006968if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969 ac_cv_pthread=yes
6970else
Matthias Kloseb9621712010-04-24 17:59:49 +00006971 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6974 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975fi
6976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977CC="$ac_save_cc"
6978fi
6979
Matthias Kloseb9621712010-04-24 17:59:49 +00006980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6981$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982fi
6983
6984# If we have set a CC compiler flag for thread support then
6985# check if it works for CXX, too.
6986ac_cv_cxx_thread=no
6987if test ! -z "$CXX"
6988then
Matthias Kloseb9621712010-04-24 17:59:49 +00006989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6990$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991ac_save_cxx="$CXX"
6992
6993if test "$ac_cv_kpthread" = "yes"
6994then
6995 CXX="$CXX -Kpthread"
6996 ac_cv_cxx_thread=yes
6997elif test "$ac_cv_kthread" = "yes"
6998then
6999 CXX="$CXX -Kthread"
7000 ac_cv_cxx_thread=yes
7001elif test "$ac_cv_pthread" = "yes"
7002then
7003 CXX="$CXX -pthread"
7004 ac_cv_cxx_thread=yes
7005fi
7006
7007if test $ac_cv_cxx_thread = yes
7008then
7009 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7010 $CXX -c conftest.$ac_ext 2>&5
7011 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7012 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7013 then
7014 ac_cv_cxx_thread=yes
7015 else
7016 ac_cv_cxx_thread=no
7017 fi
7018 rm -fr conftest*
7019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7021$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022fi
7023CXX="$ac_save_cxx"
7024
7025
7026# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7028$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007029if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007030 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031else
Matthias Kloseb9621712010-04-24 17:59:49 +00007032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033/* end confdefs.h. */
7034#include <stdlib.h>
7035#include <stdarg.h>
7036#include <string.h>
7037#include <float.h>
7038
7039int
7040main ()
7041{
7042
7043 ;
7044 return 0;
7045}
7046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007047if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007048 ac_cv_header_stdc=yes
7049else
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007051fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7053
7054if test $ac_cv_header_stdc = yes; then
7055 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057/* end confdefs.h. */
7058#include <string.h>
7059
7060_ACEOF
7061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 $EGREP "memchr" >/dev/null 2>&1; then :
7063
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064else
7065 ac_cv_header_stdc=no
7066fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007067rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007068
7069fi
7070
7071if test $ac_cv_header_stdc = yes; then
7072 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007074/* end confdefs.h. */
7075#include <stdlib.h>
7076
7077_ACEOF
7078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007079 $EGREP "free" >/dev/null 2>&1; then :
7080
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081else
7082 ac_cv_header_stdc=no
7083fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007084rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007085
7086fi
7087
7088if test $ac_cv_header_stdc = yes; then
7089 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007090 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007091 :
7092else
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007094/* end confdefs.h. */
7095#include <ctype.h>
7096#include <stdlib.h>
7097#if ((' ' & 0x0FF) == 0x020)
7098# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7099# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7100#else
7101# define ISLOWER(c) \
7102 (('a' <= (c) && (c) <= 'i') \
7103 || ('j' <= (c) && (c) <= 'r') \
7104 || ('s' <= (c) && (c) <= 'z'))
7105# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7106#endif
7107
7108#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7109int
7110main ()
7111{
7112 int i;
7113 for (i = 0; i < 256; i++)
7114 if (XOR (islower (i), ISLOWER (i))
7115 || toupper (i) != TOUPPER (i))
7116 return 2;
7117 return 0;
7118}
7119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007120if ac_fn_c_try_run "$LINENO"; then :
7121
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122else
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007127fi
7128
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007129fi
7130fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7132$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133if test $ac_cv_header_stdc = yes; then
7134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136
7137fi
7138
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007139for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007140fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007141ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007142sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007143unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007144poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007145sys/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 +01007146sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007147sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007148sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007149sys/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 -07007150libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007151bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7152sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007153do :
7154 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7155ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007156if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007157 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007158#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007159_ACEOF
7160
7161fi
7162
Guido van Rossum627b2d71993-12-24 10:39:16 +00007163done
7164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007165ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007166for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7169$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007170if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007171 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007172else
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007174/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007175#include <sys/types.h>
7176#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007177
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
7181if ((DIR *) 0)
7182return 0;
7183 ;
7184 return 0;
7185}
7186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007194eval ac_res=\$$as_ac_Header
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7196$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007199#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007200_ACEOF
7201
7202ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007203fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007205done
7206# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7207if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7209$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007210if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007212else
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007217/* Override any GCC internal prototype to avoid an error.
7218 Use char because int might match the return type of a GCC
7219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007220#ifdef __cplusplus
7221extern "C"
7222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007223char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007224int
7225main ()
7226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007228 ;
7229 return 0;
7230}
7231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007232for ac_lib in '' dir; do
7233 if test -z "$ac_lib"; then
7234 ac_res="none required"
7235 else
7236 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007238 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007240 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007242rm -f core conftest.err conftest.$ac_objext \
7243 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007244 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007245 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007247done
Victor Stinnere0be4232011-10-25 13:06:09 +02007248if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007249
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007250else
7251 ac_cv_search_opendir=no
7252fi
7253rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007254LIBS=$ac_func_search_save_LIBS
7255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7257$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007258ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007259if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007260 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007263
Michael W. Hudson54241132001-12-07 15:38:26 +00007264else
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7266$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007267if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007269else
7270 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007274/* Override any GCC internal prototype to avoid an error.
7275 Use char because int might match the return type of a GCC
7276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007277#ifdef __cplusplus
7278extern "C"
7279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007280char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007281int
7282main ()
7283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007284return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007285 ;
7286 return 0;
7287}
7288_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007289for ac_lib in '' x; do
7290 if test -z "$ac_lib"; then
7291 ac_res="none required"
7292 else
7293 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007294 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007295 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007296 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007297 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007299rm -f core conftest.err conftest.$ac_objext \
7300 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007301 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007302 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007304done
Victor Stinnere0be4232011-10-25 13:06:09 +02007305if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007307else
7308 ac_cv_search_opendir=no
7309fi
7310rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007311LIBS=$ac_func_search_save_LIBS
7312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7314$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007315ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007317 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007319fi
7320
7321fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007322
Matthias Kloseb9621712010-04-24 17:59:49 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7324$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007325if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007326 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007327else
Matthias Kloseb9621712010-04-24 17:59:49 +00007328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007329/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007330#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007331int
7332main ()
7333{
7334return makedev(0, 0);
7335 ;
7336 return 0;
7337}
7338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007340 ac_cv_header_sys_types_h_makedev=yes
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344rm -f core conftest.err conftest.$ac_objext \
7345 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007346
7347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7349$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007350
7351if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007352ac_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 +02007353if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007356
7357fi
7358
7359
7360
7361 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007362 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 +02007363if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007364
Matthias Kloseb9621712010-04-24 17:59:49 +00007365$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007366
7367fi
7368
7369
7370 fi
7371fi
7372
Michael W. Hudson54241132001-12-07 15:38:26 +00007373
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007374# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7375for ac_header in net/if.h
7376do :
7377 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7378#ifdef STDC_HEADERS
7379# include <stdlib.h>
7380# include <stddef.h>
7381#else
7382# ifdef HAVE_STDLIB_H
7383# include <stdlib.h>
7384# endif
7385#endif
7386#ifdef HAVE_SYS_SOCKET_H
7387# include <sys/socket.h>
7388#endif
7389
7390"
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007392 cat >>confdefs.h <<_ACEOF
7393#define HAVE_NET_IF_H 1
7394_ACEOF
7395
7396fi
7397
7398done
7399
7400
Martin v. Löwis11017b12006-01-14 18:12:57 +00007401# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007402for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007403do :
7404 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 +00007405#ifdef HAVE_ASM_TYPES_H
7406#include <asm/types.h>
7407#endif
7408#ifdef HAVE_SYS_SOCKET_H
7409#include <sys/socket.h>
7410#endif
7411
Matthias Kloseb9621712010-04-24 17:59:49 +00007412"
Victor Stinnere0be4232011-10-25 13:06:09 +02007413if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007415#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007416_ACEOF
7417
7418fi
7419
7420done
7421
7422
Charles-François Natali47413c12011-10-06 19:47:44 +02007423# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007424for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007425do :
7426 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7427ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7428#ifdef HAVE_SYS_SOCKET_H
7429#include <sys/socket.h>
7430#endif
7431
7432"
7433if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7434 cat >>confdefs.h <<_ACEOF
7435#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7436_ACEOF
7437
7438fi
7439
7440done
7441
7442
Guido van Rossum627b2d71993-12-24 10:39:16 +00007443# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007444was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7446$as_echo_n "checking for clock_t in time.h... " >&6; }
7447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007448/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007450
7451_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007453 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007454 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007455else
Martin v. Löwis11437992002-04-12 09:54:03 +00007456
7457
Matthias Kloseb9621712010-04-24 17:59:49 +00007458$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007459
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007460
Guido van Rossum627b2d71993-12-24 10:39:16 +00007461fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007462rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7465$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007466
Matthias Kloseb9621712010-04-24 17:59:49 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7468$as_echo_n "checking for makedev... " >&6; }
7469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007470/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007471
Jesus Cea740f53a2010-04-28 11:35:30 +00007472#if defined(MAJOR_IN_MKDEV)
7473#include <sys/mkdev.h>
7474#elif defined(MAJOR_IN_SYSMACROS)
7475#include <sys/sysmacros.h>
7476#else
7477#include <sys/types.h>
7478#endif
7479
Neal Norwitz11690112002-07-30 01:08:28 +00007480int
7481main ()
7482{
Jesus Cea740f53a2010-04-28 11:35:30 +00007483
7484 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007485 ;
7486 return 0;
7487}
Matthias Kloseb159a552010-04-25 21:00:44 +00007488
Neal Norwitz11690112002-07-30 01:08:28 +00007489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007490if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007491 ac_cv_has_makedev=yes
7492else
Matthias Kloseb9621712010-04-24 17:59:49 +00007493 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007495rm -f core conftest.err conftest.$ac_objext \
7496 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7498$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007499if test "$ac_cv_has_makedev" = "yes"; then
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007502
7503fi
7504
Christian Heimes985ecdc2013-11-20 11:46:18 +01007505# byte swapping
7506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7507$as_echo_n "checking for le64toh... " >&6; }
7508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7509/* end confdefs.h. */
7510
7511#ifdef HAVE_ENDIAN_H
7512#include <endian.h>
7513#elif defined(HAVE_SYS_ENDIAN_H)
7514#include <sys/endian.h>
7515#endif
7516
7517int
7518main ()
7519{
7520
7521 le64toh(1)
7522 ;
7523 return 0;
7524}
7525
7526_ACEOF
7527if ac_fn_c_try_link "$LINENO"; then :
7528 ac_cv_has_le64toh=yes
7529else
7530 ac_cv_has_le64toh=no
7531fi
7532rm -f core conftest.err conftest.$ac_objext \
7533 conftest$ac_exeext conftest.$ac_ext
7534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7535$as_echo "$ac_cv_has_le64toh" >&6; }
7536if test "$ac_cv_has_le64toh" = "yes"; then
7537
7538$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7539
7540fi
7541
Martin v. Löwis399a6892002-10-04 10:22:02 +00007542# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7543# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7544# defined, but the compiler does not support pragma redefine_extname,
7545# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7546# structures (such as rlimit64) without declaring them. As a
7547# work-around, disable LFS on such configurations
7548
7549use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7551$as_echo_n "checking Solaris LFS bug... " >&6; }
7552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007553/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007554
7555#define _LARGEFILE_SOURCE 1
7556#define _FILE_OFFSET_BITS 64
7557#include <sys/resource.h>
7558
Martin v. Löwis399a6892002-10-04 10:22:02 +00007559int
7560main ()
7561{
7562struct rlimit foo;
7563 ;
7564 return 0;
7565}
7566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007568 sol_lfs_bug=no
7569else
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7574$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007575if test "$sol_lfs_bug" = "yes"; then
7576 use_lfs=no
7577fi
7578
7579if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007580# Two defines needed to enable largefile support on various platforms
7581# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007582case $ac_sys_system/$ac_sys_release in
7583AIX*)
7584
7585$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7586
7587 ;;
7588esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007589
Matthias Kloseb9621712010-04-24 17:59:49 +00007590$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007591
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007594
Martin v. Löwis399a6892002-10-04 10:22:02 +00007595fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007596
Guido van Rossum84e7b241996-08-19 21:59:00 +00007597# Add some code to confdefs.h so that the test for off_t works on SCO
7598cat >> confdefs.h <<\EOF
7599#if defined(SCO_DS)
7600#undef _OFF_T
7601#endif
7602EOF
7603
Guido van Rossumef2255b2000-03-10 22:30:29 +00007604# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007605ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007607
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608else
Martin v. Löwis11437992002-04-12 09:54:03 +00007609
7610cat >>confdefs.h <<_ACEOF
7611#define mode_t int
7612_ACEOF
7613
7614fi
7615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007617if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007618
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007619else
Martin v. Löwis11437992002-04-12 09:54:03 +00007620
7621cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007623_ACEOF
7624
7625fi
7626
Matthias Kloseb9621712010-04-24 17:59:49 +00007627ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007628if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007630else
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
7632cat >>confdefs.h <<_ACEOF
7633#define pid_t int
7634_ACEOF
7635
7636fi
7637
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007640#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007641_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007644if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007645
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646else
Martin v. Löwis11437992002-04-12 09:54:03 +00007647
7648cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007650_ACEOF
7651
7652fi
7653
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7655$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007656if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007660/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007661#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007662
7663_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666 ac_cv_type_uid_t=yes
7667else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668 ac_cv_type_uid_t=no
7669fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007670rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7674$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007675if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007676
Matthias Kloseb9621712010-04-24 17:59:49 +00007677$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007678
7679
Matthias Kloseb9621712010-04-24 17:59:49 +00007680$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007681
7682fi
7683
Mark Dickinson983bc162012-12-02 12:11:38 +00007684
7685# There are two separate checks for each of the exact-width integer types we
7686# need. First we check whether the type is available using the usual
7687# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7688# and <stdint.h> where available). We then also use the special type checks of
7689# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7690# directly, #define's uint32_t to be a suitable type.
7691
7692ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7693if test "x$ac_cv_type_uint32_t" = xyes; then :
7694
7695$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7696
7697fi
7698
Matthias Kloseb9621712010-04-24 17:59:49 +00007699ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7700case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007701 no|yes) ;; #(
7702 *)
7703
Matthias Kloseb9621712010-04-24 17:59:49 +00007704$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007705
7706
7707cat >>confdefs.h <<_ACEOF
7708#define uint32_t $ac_cv_c_uint32_t
7709_ACEOF
7710;;
7711 esac
7712
Mark Dickinson983bc162012-12-02 12:11:38 +00007713
7714ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7715if test "x$ac_cv_type_uint64_t" = xyes; then :
7716
7717$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7718
7719fi
7720
Matthias Kloseb9621712010-04-24 17:59:49 +00007721ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7722case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007723 no|yes) ;; #(
7724 *)
7725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007727
7728
7729cat >>confdefs.h <<_ACEOF
7730#define uint64_t $ac_cv_c_uint64_t
7731_ACEOF
7732;;
7733 esac
7734
Mark Dickinson983bc162012-12-02 12:11:38 +00007735
7736ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7737if test "x$ac_cv_type_int32_t" = xyes; then :
7738
7739$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7740
7741fi
7742
Matthias Kloseb9621712010-04-24 17:59:49 +00007743ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7744case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007745 no|yes) ;; #(
7746 *)
7747
7748cat >>confdefs.h <<_ACEOF
7749#define int32_t $ac_cv_c_int32_t
7750_ACEOF
7751;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007752esac
7753
Mark Dickinson983bc162012-12-02 12:11:38 +00007754
7755ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7756if test "x$ac_cv_type_int64_t" = xyes; then :
7757
7758$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7759
7760fi
7761
Matthias Kloseb9621712010-04-24 17:59:49 +00007762ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7763case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007764 no|yes) ;; #(
7765 *)
7766
7767cat >>confdefs.h <<_ACEOF
7768#define int64_t $ac_cv_c_int64_t
7769_ACEOF
7770;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007771esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007772
Mark Dickinson983bc162012-12-02 12:11:38 +00007773
Matthias Kloseb9621712010-04-24 17:59:49 +00007774ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007775if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007778
7779fi
7780
Stefan Krah1919b7e2012-03-21 18:25:23 +01007781ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7782if test "x$ac_cv_type___uint128_t" = xyes; then :
7783
7784$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7785
7786fi
7787
Jack Jansendd19cf82001-12-06 22:36:17 +00007788
Michael W. Hudson54241132001-12-07 15:38:26 +00007789# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007790# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007791# The cast to long int works around a bug in the HP C Compiler
7792# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7793# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7794# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7796$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007797if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007799else
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 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 +00007801
Martin v. Löwis11437992002-04-12 09:54:03 +00007802else
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if test "$ac_cv_type_int" = yes; then
7804 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7805$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007806as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007807See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007808 else
7809 ac_cv_sizeof_int=0
7810 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7815$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816
7817
7818
Martin v. Löwis11437992002-04-12 09:54:03 +00007819cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007820#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007821_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007822
7823
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824# The cast to long int works around a bug in the HP C Compiler
7825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7829$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007830if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 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 +00007834
Martin v. Löwis11437992002-04-12 09:54:03 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 if test "$ac_cv_type_long" = yes; then
7837 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007839as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007840See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007841 else
7842 ac_cv_sizeof_long=0
7843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845
Martin v. Löwis11437992002-04-12 09:54:03 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7848$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007849
7850
7851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007853#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007854_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007855
7856
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007857# The cast to long int works around a bug in the HP C Compiler
7858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7860# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7862$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007865else
Matthias Kloseb9621712010-04-24 17:59:49 +00007866 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 +00007867
Martin v. Löwis11437992002-04-12 09:54:03 +00007868else
Matthias Kloseb9621712010-04-24 17:59:49 +00007869 if test "$ac_cv_type_void_p" = yes; then
7870 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007872as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007873See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874 else
7875 ac_cv_sizeof_void_p=0
7876 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878
Martin v. Löwis11437992002-04-12 09:54:03 +00007879fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7881$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882
7883
7884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007886#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007887_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007888
7889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007890# The cast to long int works around a bug in the HP C Compiler
7891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7895$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007896if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 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 +00007900
Martin v. Löwis11437992002-04-12 09:54:03 +00007901else
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 if test "$ac_cv_type_short" = yes; then
7903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7904$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007905as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007906See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007907 else
7908 ac_cv_sizeof_short=0
7909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007911
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7914$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007915
7916
7917
Martin v. Löwis11437992002-04-12 09:54:03 +00007918cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007919#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007920_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007921
7922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923# The cast to long int works around a bug in the HP C Compiler
7924# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7925# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7926# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7928$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007929if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 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 +00007933
Martin v. Löwis11437992002-04-12 09:54:03 +00007934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 if test "$ac_cv_type_float" = yes; then
7936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007938as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007939See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940 else
7941 ac_cv_sizeof_float=0
7942 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007944
Martin v. Löwis11437992002-04-12 09:54:03 +00007945fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7947$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948
7949
7950
Martin v. Löwis11437992002-04-12 09:54:03 +00007951cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007952#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007953_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007954
7955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7961$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 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 +00007966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_double" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 else
7974 ac_cv_sizeof_double=0
7975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7980$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981
7982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007985#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007987
7988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989# The cast to long int works around a bug in the HP C Compiler
7990# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7991# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7992# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7994$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007995if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007997else
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 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 +00007999
Martin v. Löwis11437992002-04-12 09:54:03 +00008000else
Matthias Kloseb9621712010-04-24 17:59:49 +00008001 if test "$ac_cv_type_fpos_t" = yes; then
8002 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008004as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008005See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006 else
8007 ac_cv_sizeof_fpos_t=0
8008 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8013$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014
8015
8016
Martin v. Löwis11437992002-04-12 09:54:03 +00008017cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008018#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008019_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008020
Michael W. Hudson54241132001-12-07 15:38:26 +00008021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008022# The cast to long int works around a bug in the HP C Compiler
8023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8025# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8027$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 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 +00008032
Martin v. Löwis18e16552006-02-15 17:27:45 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 if test "$ac_cv_type_size_t" = yes; then
8035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008037as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008038See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039 else
8040 ac_cv_sizeof_size_t=0
8041 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043
Martin v. Löwis18e16552006-02-15 17:27:45 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8046$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047
8048
8049
Martin v. Löwis18e16552006-02-15 17:27:45 +00008050cat >>confdefs.h <<_ACEOF
8051#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8052_ACEOF
8053
8054
Christian Heimes400adb02008-02-01 08:12:03 +00008055# The cast to long int works around a bug in the HP C Compiler
8056# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8057# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8058# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8060$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008061if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008062 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008063else
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 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 +00008065
Christian Heimes400adb02008-02-01 08:12:03 +00008066else
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 if test "$ac_cv_type_pid_t" = yes; then
8068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8069$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008070as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008071See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008072 else
8073 ac_cv_sizeof_pid_t=0
8074 fi
8075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008076
Christian Heimes400adb02008-02-01 08:12:03 +00008077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8079$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008080
8081
8082
8083cat >>confdefs.h <<_ACEOF
8084#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8085_ACEOF
8086
8087
Michael W. Hudson54241132001-12-07 15:38:26 +00008088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8090$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008091have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008092cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008093/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008098long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008099 ;
8100 return 0;
8101}
8102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008104
8105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008107
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008108 have_long_long=yes
8109
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8113$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008114if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115# The cast to long int works around a bug in the HP C Compiler
8116# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8117# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8118# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8120$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008123else
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 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 +00008125
Martin v. Löwis11437992002-04-12 09:54:03 +00008126else
Matthias Kloseb9621712010-04-24 17:59:49 +00008127 if test "$ac_cv_type_long_long" = yes; then
8128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008130as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008131See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008132 else
8133 ac_cv_sizeof_long_long=0
8134 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008136
Martin v. Löwis11437992002-04-12 09:54:03 +00008137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8139$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008140
8141
8142
Martin v. Löwis11437992002-04-12 09:54:03 +00008143cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008144#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008145_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008146
Michael W. Hudson54241132001-12-07 15:38:26 +00008147
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008148fi
8149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8151$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008152have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008154/* end confdefs.h. */
8155
8156int
8157main ()
8158{
8159long double x; x = (long double)0;
8160 ;
8161 return 0;
8162}
8163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008164if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008165
8166
Matthias Kloseb9621712010-04-24 17:59:49 +00008167$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008168
8169 have_long_double=yes
8170
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008171fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8174$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008175if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008176# The cast to long int works around a bug in the HP C Compiler
8177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8179# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8181$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008182if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008184else
Matthias Kloseb9621712010-04-24 17:59:49 +00008185 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 +00008186
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008187else
Matthias Kloseb9621712010-04-24 17:59:49 +00008188 if test "$ac_cv_type_long_double" = yes; then
8189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008191as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008192See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008193 else
8194 ac_cv_sizeof_long_double=0
8195 fi
8196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008197
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8200$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008201
8202
8203
8204cat >>confdefs.h <<_ACEOF
8205#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8206_ACEOF
8207
8208
8209fi
8210
8211
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8213$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008214have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008216/* end confdefs.h. */
8217
8218int
8219main ()
8220{
8221_Bool x; x = (_Bool)0;
8222 ;
8223 return 0;
8224}
8225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008226if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008230
8231 have_c99_bool=yes
8232
Thomas Woutersb2137042007-02-01 18:02:27 +00008233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8236$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008237if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238# The cast to long int works around a bug in the HP C Compiler
8239# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8240# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8241# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8243$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008244if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 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 +00008248
Thomas Woutersb2137042007-02-01 18:02:27 +00008249else
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 if test "$ac_cv_type__Bool" = yes; then
8251 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008253as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008254See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008255 else
8256 ac_cv_sizeof__Bool=0
8257 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259
Thomas Woutersb2137042007-02-01 18:02:27 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8262$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263
8264
8265
Thomas Woutersb2137042007-02-01 18:02:27 +00008266cat >>confdefs.h <<_ACEOF
8267#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8268_ACEOF
8269
8270
8271fi
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008274 #include <stdint.h>
8275 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008276 #ifdef HAVE_INTTYPES_H
8277 #include <inttypes.h>
8278 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008279"
Victor Stinnere0be4232011-10-25 13:06:09 +02008280if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008281
8282cat >>confdefs.h <<_ACEOF
8283#define HAVE_UINTPTR_T 1
8284_ACEOF
8285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286# The cast to long int works around a bug in the HP C Compiler
8287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8289# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8291$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008292if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008294else
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 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 +00008296
Martin v. Löwis11437992002-04-12 09:54:03 +00008297else
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 if test "$ac_cv_type_uintptr_t" = yes; then
8299 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008301as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008302See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303 else
8304 ac_cv_sizeof_uintptr_t=0
8305 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008306fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008307
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8310$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311
8312
8313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008315#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008316_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008317
Michael W. Hudson54241132001-12-07 15:38:26 +00008318
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008319fi
8320
Thomas Wouters89f507f2006-12-13 04:49:30 +00008321
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322# The cast to long int works around a bug in the HP C Compiler
8323# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8324# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8325# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8327$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008328if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008330else
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008332#ifdef HAVE_SYS_TYPES_H
8333#include <sys/types.h>
8334#endif
8335
Matthias Kloseb9621712010-04-24 17:59:49 +00008336"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008337
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008338else
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 if test "$ac_cv_type_off_t" = yes; then
8340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008342as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008343See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008344 else
8345 ac_cv_sizeof_off_t=0
8346 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8351$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008352
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008353
8354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008356#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008357_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008358
Michael W. Hudson54241132001-12-07 15:38:26 +00008359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8362$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008363if test "$have_long_long" = yes
8364then
8365if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008366 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008369
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8371$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8374$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008375fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008376else
Matthias Kloseb9621712010-04-24 17:59:49 +00008377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8378$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008379fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381# The cast to long int works around a bug in the HP C Compiler
8382# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8383# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8384# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8386$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008387if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008391#ifdef HAVE_SYS_TYPES_H
8392#include <sys/types.h>
8393#endif
8394#ifdef HAVE_TIME_H
8395#include <time.h>
8396#endif
8397
Matthias Kloseb9621712010-04-24 17:59:49 +00008398"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008400else
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 if test "$ac_cv_type_time_t" = yes; then
8402 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008405See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008406 else
8407 ac_cv_sizeof_time_t=0
8408 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008410
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8413$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008414
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008415
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008418#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008419_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008420
Michael W. Hudson54241132001-12-07 15:38:26 +00008421
8422
Trent Mick635f6fb2000-08-23 21:33:05 +00008423# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008424ac_save_cc="$CC"
8425if test "$ac_cv_kpthread" = "yes"
8426then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008427elif test "$ac_cv_kthread" = "yes"
8428then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008429elif test "$ac_cv_pthread" = "yes"
8430then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008431fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8434$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008435have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008437/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008438
8439 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008440int
8441main ()
8442{
Guido van Rossum12580492000-09-24 16:47:19 +00008443pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008444 ;
8445 return 0;
8446}
Matthias Kloseb159a552010-04-25 21:00:44 +00008447
Martin v. Löwis11437992002-04-12 09:54:03 +00008448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008449if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008450 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8454$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008455if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8459# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8461$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008462if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008463 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008464else
Matthias Kloseb9621712010-04-24 17:59:49 +00008465 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008466#ifdef HAVE_PTHREAD_H
8467#include <pthread.h>
8468#endif
8469
Matthias Kloseb9621712010-04-24 17:59:49 +00008470"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008471
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008472else
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 if test "$ac_cv_type_pthread_t" = yes; then
8474 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8475$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008476as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008477See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008478 else
8479 ac_cv_sizeof_pthread_t=0
8480 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482
Trent Mick635f6fb2000-08-23 21:33:05 +00008483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8485$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008486
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008487
8488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008490#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008491_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008493
Trent Mick635f6fb2000-08-23 21:33:05 +00008494fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008495CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008496
Michael W. Hudson54241132001-12-07 15:38:26 +00008497
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008499 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008500 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8501 ;;
8502 Darwin/*)
8503 OTHER_LIBTOOL_OPT=""
8504 ;;
8505esac
8506
8507
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008508
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008509case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008510 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008511 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8512 if test "${enable_universalsdk}"; then
8513 :
8514 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008515 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008516 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008517 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008518 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008519 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008520 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008521 if test ${gcc_version} '<' 4.0
8522 then
8523 LIBTOOL_CRUFT="-lcc_dynamic"
8524 else
8525 LIBTOOL_CRUFT=""
8526 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008527 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008528 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008531/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008532
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008533 #include <unistd.h>
8534 int main(int argc, char*argv[])
8535 {
8536 if (sizeof(long) == 4) {
8537 return 0;
8538 } else {
8539 return 1;
8540 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008541 }
8542
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008544if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008545 ac_osx_32bit=yes
8546else
Matthias Kloseb9621712010-04-24 17:59:49 +00008547 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008551fi
8552
8553
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008554 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008555 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008556 i386)
8557 MACOSX_DEFAULT_ARCH="i386"
8558 ;;
8559 ppc)
8560 MACOSX_DEFAULT_ARCH="ppc"
8561 ;;
8562 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008564 ;;
8565 esac
8566 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008567 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008568 i386)
8569 MACOSX_DEFAULT_ARCH="x86_64"
8570 ;;
8571 ppc)
8572 MACOSX_DEFAULT_ARCH="ppc64"
8573 ;;
8574 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008575 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008576 ;;
8577 esac
8578
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008579 fi
8580
8581 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008582 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008583 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008584esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8586$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008587if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008588then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008589 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008590 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008591 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8596$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008597 if test $enable_shared = "yes"
8598 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008599 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 +00008600 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008601else
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8603$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008604fi
8605
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8607$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008608case $ac_sys_system/$ac_sys_release in
8609 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008610
Matthias Kloseb9621712010-04-24 17:59:49 +00008611$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008612
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8614$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008615 ;;
8616 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8618$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008619 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008620esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008621
Guido van Rossum0a516c91994-09-12 10:58:40 +00008622# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
8625
8626
8627
Benjamin Peterson99f03762010-04-11 22:15:28 +00008628
Thomas Wouters477c8d52006-05-27 19:21:47 +00008629
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008630# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8631# -- usually .so, .sl on HP-UX, .dll on Cygwin
8632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8633$as_echo_n "checking the extension of shared libraries... " >&6; }
8634if test -z "$SHLIB_SUFFIX"; then
8635 case $ac_sys_system in
8636 hp*|HP*)
8637 case `uname -m` in
8638 ia64) SHLIB_SUFFIX=.so;;
8639 *) SHLIB_SUFFIX=.sl;;
8640 esac
8641 ;;
8642 CYGWIN*) SHLIB_SUFFIX=.dll;;
8643 *) SHLIB_SUFFIX=.so;;
8644 esac
8645fi
8646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8647$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008648
Guido van Rossum0a516c91994-09-12 10:58:40 +00008649# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008650# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008651# (Shared libraries in this instance are shared modules to be loaded into
8652# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8654$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008655if test -z "$LDSHARED"
8656then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008657 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008658 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008659 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008660 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008661 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008662 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008663 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008665 if test "$GCC" = "yes" ; then
8666 LDSHARED='$(CC) -shared'
8667 LDCXXSHARED='$(CXX) -shared'
8668 else
8669 LDSHARED='$(CC) -G'
8670 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008671 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008672 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008673 if test "$GCC" = "yes" ; then
8674 LDSHARED='$(CC) -shared'
8675 LDCXXSHARED='$(CXX) -shared'
8676 else
8677 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008678 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008679 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008680 LDSHARED='$(CC) -bundle'
8681 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008682 if test "$enable_framework" ; then
8683 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008684 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8685 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008686 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008687 else
8688 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008689 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008690 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008691 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008692 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008693 LDSHARED='$(CC) -bundle'
8694 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008695 if test "$enable_framework" ; then
8696 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008697 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8698 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008699 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008700 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008701 # No framework, use the Python app as bundle-loader
8702 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008703 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008704 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008705 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008706 Darwin/*)
8707 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8708 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008709
Ned Deily36820b62014-06-25 13:44:22 -07008710 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8711 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8712 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8713 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8714 if test ${dep_target_major} -eq 10 && \
8715 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008716 then
Ned Deily36820b62014-06-25 13:44:22 -07008717 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008718 LDSHARED='$(CC) -bundle'
8719 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008720 if test "$enable_framework" ; then
8721 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008722 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8723 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008724 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008725 else
8726 # No framework, use the Python app as bundle-loader
8727 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8728 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008729 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008730 fi
Ned Deily36820b62014-06-25 13:44:22 -07008731 else
8732 # building for OS X 10.3 and later
8733 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8734 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8735 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008736 fi
8737 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008738 Linux*|GNU*|QNX*)
8739 LDSHARED='$(CC) -shared'
8740 LDCXXSHARED='$(CXX) -shared';;
8741 BSD/OS*/4*)
8742 LDSHARED="gcc -shared"
8743 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008744 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008745 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008746 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008747 LDSHARED='$(CC) -shared'
8748 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008749 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008750 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008751 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008752 OpenBSD*)
8753 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8754 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008755 LDSHARED='$(CC) -shared $(CCSHARED)'
8756 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008757 else
8758 case `uname -r` in
8759 [01].* | 2.[0-7] | 2.[0-7].*)
8760 LDSHARED="ld -Bshareable ${LDFLAGS}"
8761 ;;
8762 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008763 LDSHARED='$(CC) -shared $(CCSHARED)'
8764 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008765 ;;
8766 esac
8767 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008768 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008769 LDSHARED='$(CC) -shared'
8770 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008771 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008772 if test "$GCC" = "yes" ; then
8773 LDSHARED='$(CC) -shared'
8774 LDCXXSHARED='$(CXX) -shared'
8775 else
8776 LDSHARED='$(CC) -G'
8777 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008778 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008779 SCO_SV*)
8780 LDSHARED='$(CC) -Wl,-G,-Bexport'
8781 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8782 CYGWIN*)
8783 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8784 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785 *) LDSHARED="ld";;
8786 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8789$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008790LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008791BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008792# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008793# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8795$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008796if test -z "$CCSHARED"
8797then
Guido van Rossum07397971997-04-29 21:49:50 +00008798 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008799 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008800 then CCSHARED="-fPIC";
8801 elif test `uname -p` = sparc;
8802 then CCSHARED="-xcode=pic32";
8803 else CCSHARED="-Kpic";
8804 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008805 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008806 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008807 else CCSHARED="+z";
8808 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008809 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008810 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008811 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008812 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008813 if test "$GCC" = "yes"
8814 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008815 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008816 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008817 SCO_SV*)
8818 if test "$GCC" = "yes"
8819 then CCSHARED="-fPIC"
8820 else CCSHARED="-Kpic -belf"
8821 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008822 IRIX*/6*) case $CC in
8823 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008824 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008825 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008826 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8829$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008830# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008831# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8833$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008834if test -z "$LINKFORSHARED"
8835then
Guido van Rossum07397971997-04-29 21:49:50 +00008836 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008837 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008838 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008839 LINKFORSHARED="-Wl,-E -Wl,+s";;
8840# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008841 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008842 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008843 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008845 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008846
8847 # Issue #18075: the default maximum stack size (8MBytes) is too
8848 # small for the default recursion limit. Increase the stack size
8849 # to ensure that tests don't crash
8850 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8851
Jack Jansene578a632001-08-15 01:27:14 +00008852 if test "$enable_framework"
8853 then
Jack Jansenda49e192005-01-07 13:08:22 +00008854 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008855 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008856 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008857 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008858 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008859 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008860 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008861 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8862 then
8863 LINKFORSHARED="-Wl,--export-dynamic"
8864 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008865 SunOS/5*) case $CC in
8866 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008867 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008868 then
8869 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008870 fi;;
8871 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008872 CYGWIN*)
8873 if test $enable_shared = "no"
8874 then
8875 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8876 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008877 QNX*)
8878 # -Wl,-E causes the symbols to be added to the dynamic
8879 # symbol table so that they can be found when a module
8880 # is loaded. -N 2048K causes the stack size to be set
8881 # to 2048 kilobytes so that the stack doesn't overflow
8882 # when running test_compile.py.
8883 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008884 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8887$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008888
Michael W. Hudson54241132001-12-07 15:38:26 +00008889
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8892$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008893if test ! "$LIBRARY" = "$LDLIBRARY"
8894then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008895 case $ac_sys_system in
8896 CYGWIN*)
8897 # Cygwin needs CCSHARED when building extension DLLs
8898 # but not when building the interpreter DLL.
8899 CFLAGSFORSHARED='';;
8900 *)
8901 CFLAGSFORSHARED='$(CCSHARED)'
8902 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8905$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008906
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008907# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8908# library (with --enable-shared).
8909# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008910# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8911# if it is not required, since it creates a dependency of the shared library
8912# to LIBS. This, in turn, means that applications linking the shared libpython
8913# don't need to link LIBS explicitly. The default should be only changed
8914# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008915
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8917$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008918case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008919 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008920 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008921esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8923$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008924
8925
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8928$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008929if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008930 $as_echo_n "(cached) " >&6
8931else
8932 ac_check_lib_save_LIBS=$LIBS
8933LIBS="-lsendfile $LIBS"
8934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8935/* end confdefs.h. */
8936
8937/* Override any GCC internal prototype to avoid an error.
8938 Use char because int might match the return type of a GCC
8939 builtin and then its argument prototype would still apply. */
8940#ifdef __cplusplus
8941extern "C"
8942#endif
8943char sendfile ();
8944int
8945main ()
8946{
8947return sendfile ();
8948 ;
8949 return 0;
8950}
8951_ACEOF
8952if ac_fn_c_try_link "$LINENO"; then :
8953 ac_cv_lib_sendfile_sendfile=yes
8954else
8955 ac_cv_lib_sendfile_sendfile=no
8956fi
8957rm -f core conftest.err conftest.$ac_objext \
8958 conftest$ac_exeext conftest.$ac_ext
8959LIBS=$ac_check_lib_save_LIBS
8960fi
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8962$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008963if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008964 cat >>confdefs.h <<_ACEOF
8965#define HAVE_LIBSENDFILE 1
8966_ACEOF
8967
8968 LIBS="-lsendfile $LIBS"
8969
8970fi
8971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8973$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008974if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008976else
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008978LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008982/* Override any GCC internal prototype to avoid an error.
8983 Use char because int might match the return type of a GCC
8984 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#ifdef __cplusplus
8986extern "C"
8987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008988char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008989int
8990main ()
8991{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008992return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008993 ;
8994 return 0;
8995}
8996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008999else
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009002rm -f core conftest.err conftest.$ac_objext \
9003 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009004LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9007$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009008if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 cat >>confdefs.h <<_ACEOF
9010#define HAVE_LIBDL 1
9011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009012
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009013 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009014
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009015fi
9016 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9018$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009019if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009020 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009021else
Martin v. Löwis11437992002-04-12 09:54:03 +00009022 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009023LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027/* Override any GCC internal prototype to avoid an error.
9028 Use char because int might match the return type of a GCC
9029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009030#ifdef __cplusplus
9031extern "C"
9032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009033char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009034int
9035main ()
9036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009038 ;
9039 return 0;
9040}
9041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009044else
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047rm -f core conftest.err conftest.$ac_objext \
9048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009049LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009050fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9052$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009053if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 cat >>confdefs.h <<_ACEOF
9055#define HAVE_LIBDLD 1
9056_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009057
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009058 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009060fi
9061 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9063$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9064if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9065 $as_echo_n "(cached) " >&6
9066else
9067 ac_check_lib_save_LIBS=$LIBS
9068LIBS="-lcrypto $LIBS"
9069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070/* end confdefs.h. */
9071
9072/* Override any GCC internal prototype to avoid an error.
9073 Use char because int might match the return type of a GCC
9074 builtin and then its argument prototype would still apply. */
9075#ifdef __cplusplus
9076extern "C"
9077#endif
9078char RAND_egd ();
9079int
9080main ()
9081{
9082return RAND_egd ();
9083 ;
9084 return 0;
9085}
9086_ACEOF
9087if ac_fn_c_try_link "$LINENO"; then :
9088 ac_cv_lib_crypto_RAND_egd=yes
9089else
9090 ac_cv_lib_crypto_RAND_egd=no
9091fi
9092rm -f core conftest.err conftest.$ac_objext \
9093 conftest$ac_exeext conftest.$ac_ext
9094LIBS=$ac_check_lib_save_LIBS
9095fi
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9097$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9098if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9099
9100$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9101
9102fi
9103
Martin v. Löwis519adae2003-09-20 10:47:47 +00009104
Georg Brandlb1441c72009-01-03 22:33:39 +00009105# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009106if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9108$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009109if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009110 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009111else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009112 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116/* Override any GCC internal prototype to avoid an error.
9117 Use char because int might match the return type of a GCC
9118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009119#ifdef __cplusplus
9120extern "C"
9121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009122char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009123int
9124main ()
9125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009126return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009127 ;
9128 return 0;
9129}
9130_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131for ac_lib in '' pthread rt posix4; do
9132 if test -z "$ac_lib"; then
9133 ac_res="none required"
9134 else
9135 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009138 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009141rm -f core conftest.err conftest.$ac_objext \
9142 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009143 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146done
Victor Stinnere0be4232011-10-25 13:06:09 +02009147if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009148
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009149else
9150 ac_cv_search_sem_init=no
9151fi
9152rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009153LIBS=$ac_func_search_save_LIBS
9154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9156$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009157ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009158if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009159 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009160
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009161fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009162 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009163 # posix4 on Solaris 2.6
9164 # pthread (first!) on Linux
9165fi
9166
Martin v. Löwis19d17342003-06-14 21:03:05 +00009167# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9169$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009170if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009171 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009172else
9173 ac_check_lib_save_LIBS=$LIBS
9174LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009177
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178/* Override any GCC internal prototype to avoid an error.
9179 Use char because int might match the return type of a GCC
9180 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009181#ifdef __cplusplus
9182extern "C"
9183#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009184char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009185int
9186main ()
9187{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009189 ;
9190 return 0;
9191}
9192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009193if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009194 ac_cv_lib_intl_textdomain=yes
9195else
Matthias Kloseb9621712010-04-24 17:59:49 +00009196 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198rm -f core conftest.err conftest.$ac_objext \
9199 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009200LIBS=$ac_check_lib_save_LIBS
9201fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9203$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009204if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009205
Matthias Kloseb9621712010-04-24 17:59:49 +00009206$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009207
Brett Cannonc6d936e2009-06-07 20:09:53 +00009208 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009209fi
9210
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009211
9212# checks for system dependent C++ extensions support
9213case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009214 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9215$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009217/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009218
Georg Brandl59e87bd2011-02-15 19:48:59 +00009219 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009220int
9221main ()
9222{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009223loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ;
9225 return 0;
9226}
Matthias Kloseb159a552010-04-25 21:00:44 +00009227
Martin v. Löwis11437992002-04-12 09:54:03 +00009228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009230
Matthias Kloseb159a552010-04-25 21:00:44 +00009231
Matthias Kloseb9621712010-04-24 17:59:49 +00009232$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Matthias Kloseb159a552010-04-25 21:00:44 +00009234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009235$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009236
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009237else
Matthias Kloseb159a552010-04-25 21:00:44 +00009238
9239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009240$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009241
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243rm -f core conftest.err conftest.$ac_objext \
9244 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009245 *) ;;
9246esac
9247
Christian Heimes985ecdc2013-11-20 11:46:18 +01009248# check for systems that require aligned memory access
9249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9250$as_echo_n "checking aligned memory access is required... " >&6; }
9251if test "$cross_compiling" = yes; then :
9252 aligned_required=yes
9253else
9254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9255/* end confdefs.h. */
9256
9257int main()
9258{
9259 char s[16];
9260 int i, *p1, *p2;
9261 for (i=0; i < 16; i++)
9262 s[i] = i;
9263 p1 = (int*)(s+1);
9264 p2 = (int*)(s+2);
9265 if (*p1 == *p2)
9266 return 1;
9267 return 0;
9268}
9269
9270_ACEOF
9271if ac_fn_c_try_run "$LINENO"; then :
9272 aligned_required=no
9273else
9274 aligned_required=yes
9275fi
9276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9277 conftest.$ac_objext conftest.beam conftest.$ac_ext
9278fi
9279
9280
9281if test "$aligned_required" = yes ; then
9282
9283$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9284
9285fi
9286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9287$as_echo "$aligned_required" >&6; }
9288
9289
9290# str, bytes and memoryview hash algorithm
9291
9292
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9294$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9295
9296# Check whether --with-hash_algorithm was given.
9297if test "${with_hash_algorithm+set}" = set; then :
9298 withval=$with_hash_algorithm;
9299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9300$as_echo "$withval" >&6; }
9301case "$withval" in
9302 siphash24)
9303 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9304
9305 ;;
9306 fnv)
9307 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9308
9309 ;;
9310 *)
9311 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9312 ;;
9313esac
9314
9315else
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9317$as_echo "default" >&6; }
9318fi
9319
9320
Charles-François Natalid30b0222014-05-08 23:08:51 +01009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9322$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9323
9324# Check whether --with-address_sanitizer was given.
9325if test "${with_address_sanitizer+set}" = set; then :
9326 withval=$with_address_sanitizer;
9327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9328$as_echo "$withval" >&6; }
9329BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9330LDFLAGS="-fsanitize=address $LDFLAGS"
9331
9332else
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9334$as_echo "no" >&6; }
9335fi
9336
9337
Guido van Rossum70c7f481998-03-26 18:44:10 +00009338# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9340$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009341if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009343else
Martin v. Löwis11437992002-04-12 09:54:03 +00009344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009345LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349/* Override any GCC internal prototype to avoid an error.
9350 Use char because int might match the return type of a GCC
9351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352#ifdef __cplusplus
9353extern "C"
9354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009355char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009356int
9357main ()
9358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ;
9361 return 0;
9362}
9363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009366else
Matthias Kloseb9621712010-04-24 17:59:49 +00009367 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009369rm -f core conftest.err conftest.$ac_objext \
9370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9374$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009375if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009376 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009377fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009378 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9380$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009383else
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009385LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009388
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009389/* Override any GCC internal prototype to avoid an error.
9390 Use char because int might match the return type of a GCC
9391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392#ifdef __cplusplus
9393extern "C"
9394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009395char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009396int
9397main ()
9398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ;
9401 return 0;
9402}
9403_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009404if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009406else
Matthias Kloseb9621712010-04-24 17:59:49 +00009407 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009409rm -f core conftest.err conftest.$ac_objext \
9410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009411LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9414$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009415if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009416 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009417fi
9418 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009419
Matthias Kloseb9621712010-04-24 17:59:49 +00009420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9421$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009423# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009424if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009425 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9427$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009428LIBS="$withval $LIBS"
9429
9430else
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9432$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433fi
9434
Guido van Rossum7f43da71994-08-01 12:15:30 +00009435
Victor Stinner8291b5e2015-03-20 16:03:14 +01009436
9437
9438
9439
9440
9441
9442
9443if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9444 if test -n "$ac_tool_prefix"; then
9445 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9446set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_PKG_CONFIG+:} false; then :
9450 $as_echo_n "(cached) " >&6
9451else
9452 case $PKG_CONFIG in
9453 [\\/]* | ?:[\\/]*)
9454 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9455 ;;
9456 *)
9457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460 IFS=$as_save_IFS
9461 test -z "$as_dir" && as_dir=.
9462 for ac_exec_ext in '' $ac_executable_extensions; do
9463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466 break 2
9467 fi
9468done
9469 done
9470IFS=$as_save_IFS
9471
9472 ;;
9473esac
9474fi
9475PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9476if test -n "$PKG_CONFIG"; then
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9478$as_echo "$PKG_CONFIG" >&6; }
9479else
9480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485fi
9486if test -z "$ac_cv_path_PKG_CONFIG"; then
9487 ac_pt_PKG_CONFIG=$PKG_CONFIG
9488 # Extract the first word of "pkg-config", so it can be a program name with args.
9489set dummy pkg-config; ac_word=$2
9490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9491$as_echo_n "checking for $ac_word... " >&6; }
9492if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9493 $as_echo_n "(cached) " >&6
9494else
9495 case $ac_pt_PKG_CONFIG in
9496 [\\/]* | ?:[\\/]*)
9497 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9498 ;;
9499 *)
9500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9501for as_dir in $PATH
9502do
9503 IFS=$as_save_IFS
9504 test -z "$as_dir" && as_dir=.
9505 for ac_exec_ext in '' $ac_executable_extensions; do
9506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9507 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9509 break 2
9510 fi
9511done
9512 done
9513IFS=$as_save_IFS
9514
9515 ;;
9516esac
9517fi
9518ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9519if test -n "$ac_pt_PKG_CONFIG"; then
9520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9521$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9522else
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9524$as_echo "no" >&6; }
9525fi
9526
9527 if test "x$ac_pt_PKG_CONFIG" = x; then
9528 PKG_CONFIG=""
9529 else
9530 case $cross_compiling:$ac_tool_warned in
9531yes:)
9532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9534ac_tool_warned=yes ;;
9535esac
9536 PKG_CONFIG=$ac_pt_PKG_CONFIG
9537 fi
9538else
9539 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9540fi
9541
9542fi
9543if test -n "$PKG_CONFIG"; then
9544 _pkg_min_version=0.9.0
9545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9546$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9547 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9549$as_echo "yes" >&6; }
9550 else
9551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9552$as_echo "no" >&6; }
9553 PKG_CONFIG=""
9554 fi
9555fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009556
9557# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9559$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009560
9561# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009563 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009564else
9565 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009566fi
9567
9568
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9570$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009571
9572# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9574$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009575
9576# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009577if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009578 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009579else
9580 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009581fi
9582
9583
9584if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009585 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9586else
9587 LIBFFI_INCLUDEDIR=""
9588fi
9589
9590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9592$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009593
Stefan Krah60187b52012-03-23 19:06:27 +01009594# Check for use of the system libmpdec library
9595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9596$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9597
9598# Check whether --with-system_libmpdec was given.
9599if test "${with_system_libmpdec+set}" = set; then :
9600 withval=$with_system_libmpdec;
9601else
9602 with_system_libmpdec="no"
9603fi
9604
9605
9606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9607$as_echo "$with_system_libmpdec" >&6; }
9608
Benjamin Peterson076ed002010-10-31 17:11:02 +00009609# Check for support for loadable sqlite extensions
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9611$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9612# Check whether --enable-loadable-sqlite-extensions was given.
9613if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9614 enableval=$enable_loadable_sqlite_extensions;
9615else
9616 enable_loadable_sqlite_extensions="no"
9617fi
9618
9619
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9621$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9622
Ned Deilyd819b932013-09-06 01:07:05 -07009623# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9624
9625
9626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9627$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9628
9629# Check whether --with-tcltk-includes was given.
9630if test "${with_tcltk_includes+set}" = set; then :
9631 withval=$with_tcltk_includes;
9632else
9633 with_tcltk_includes="default"
9634fi
9635
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9637$as_echo "$with_tcltk_includes" >&6; }
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9639$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9640
9641# Check whether --with-tcltk-libs was given.
9642if test "${with_tcltk_libs+set}" = set; then :
9643 withval=$with_tcltk_libs;
9644else
9645 with_tcltk_libs="default"
9646fi
9647
9648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9649$as_echo "$with_tcltk_libs" >&6; }
9650if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9651then
9652 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9653 then
9654 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9655 fi
9656 TCLTK_INCLUDES=""
9657 TCLTK_LIBS=""
9658else
9659 TCLTK_INCLUDES="$with_tcltk_includes"
9660 TCLTK_LIBS="$with_tcltk_libs"
9661fi
9662
Matthias Klose55708cc2009-04-30 08:06:49 +00009663# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9665$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009666
9667# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009668if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009669 withval=$with_dbmliborder;
9670if test x$with_dbmliborder = xyes
9671then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009672as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009673else
9674 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9675 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9676 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009677 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009678 fi
9679 done
9680fi
9681fi
9682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9684$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009685
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009686# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009687
9688
Matthias Kloseb9621712010-04-24 17:59:49 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9690$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009694 withval=$with_signal_module;
9695fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009696
9697
9698if test -z "$with_signal_module"
9699then with_signal_module="yes"
9700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9702$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009703
9704if test "${with_signal_module}" = "yes"; then
9705 USE_SIGNAL_MODULE=""
9706 SIGNAL_OBJS=""
9707else
9708 USE_SIGNAL_MODULE="#"
9709 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9710fi
9711
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009712# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009713
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009714USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009716
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
9718# Templates for things AC_DEFINEd more than once.
9719# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009720
9721
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Matthias Kloseb9621712010-04-24 17:59:49 +00009723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9724$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009727if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 withval=$with_threads;
9729fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009730
9731
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009732# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009735if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736 withval=$with_thread; with_threads=$with_thread
9737fi
9738
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009739
9740if test -z "$with_threads"
9741then with_threads="yes"
9742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9744$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009745
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009746
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009747if test "$with_threads" = "no"
9748then
9749 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009750elif test "$ac_cv_pthread_is_default" = yes
9751then
Matthias Kloseb9621712010-04-24 17:59:49 +00009752 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009753
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009754 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009756
9757 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009759elif test "$ac_cv_kpthread" = "yes"
9760then
9761 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009762 if test "$ac_cv_cxx_thread" = "yes"; then
9763 CXX="$CXX -Kpthread"
9764 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009765 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009766
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009767 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009769elif test "$ac_cv_kthread" = "yes"
9770then
9771 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009772 if test "$ac_cv_cxx_thread" = "yes"; then
9773 CXX="$CXX -Kthread"
9774 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009775 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009776
9777 posix_threads=yes
9778 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779elif test "$ac_cv_pthread" = "yes"
9780then
9781 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009782 if test "$ac_cv_cxx_thread" = "yes"; then
9783 CXX="$CXX -pthread"
9784 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786
9787 posix_threads=yes
9788 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009789else
9790 if test ! -z "$with_threads" -a -d "$with_threads"
9791 then LDFLAGS="$LDFLAGS -L$with_threads"
9792 fi
9793 if test ! -z "$withval" -a -d "$withval"
9794 then LDFLAGS="$LDFLAGS -L$withval"
9795 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009796
9797 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009798 # define _POSIX_THREADS in unistd.h. Some apparently don't
9799 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9801$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009804
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009805#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009806#ifdef _POSIX_THREADS
9807yes
9808#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009809
9810_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009813 unistd_defines_pthreads=yes
9814else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009815 unistd_defines_pthreads=no
9816fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009817rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009818
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9820$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009823
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009824 # Just looking for pthread_create in libpthread is not enough:
9825 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9826 # So we really have to include pthread.h, and then link.
9827 _libs=$LIBS
9828 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9830$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009832/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009833
9834#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009835#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009836
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009837void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009841
9842pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ;
9844 return 0;
9845}
9846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009848
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9850$as_echo "yes" >&6; }
9851 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009852
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009853 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009854 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009855else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009857 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009859if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009861
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009862 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009863 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009864else
Guido van Rossumad678af1998-10-02 14:42:15 +00009865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9867$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009868if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009870else
Martin v. Löwis11437992002-04-12 09:54:03 +00009871 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009872LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876/* Override any GCC internal prototype to avoid an error.
9877 Use char because int might match the return type of a GCC
9878 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009879#ifdef __cplusplus
9880extern "C"
9881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009882char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883int
9884main ()
9885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ;
9888 return 0;
9889}
9890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009893else
Matthias Kloseb9621712010-04-24 17:59:49 +00009894 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896rm -f core conftest.err conftest.$ac_objext \
9897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009898LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9901$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009902if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009904
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009905 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009906 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009907 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009908else
Greg Steinadf63d62000-07-05 10:38:09 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9911$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009912if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009914else
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009916LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920/* Override any GCC internal prototype to avoid an error.
9921 Use char because int might match the return type of a GCC
9922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009923#ifdef __cplusplus
9924extern "C"
9925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009926char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ;
9932 return 0;
9933}
9934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009937else
Matthias Kloseb9621712010-04-24 17:59:49 +00009938 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009940rm -f core conftest.err conftest.$ac_objext \
9941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9945$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009946if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009947 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009948
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009949 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009950 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009951 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009952else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009953
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9955$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009956if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009958else
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009960LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964/* Override any GCC internal prototype to avoid an error.
9965 Use char because int might match the return type of a GCC
9966 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009967#ifdef __cplusplus
9968extern "C"
9969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009970char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009971int
9972main ()
9973{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009974return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ;
9976 return 0;
9977}
9978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009979if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009980 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009981else
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009984rm -f core conftest.err conftest.$ac_objext \
9985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009986LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9989$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009990if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009992
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009993 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009994 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009995 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009996else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009997
Matthias Kloseb9621712010-04-24 17:59:49 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9999$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010000if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010002else
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010004LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008/* Override any GCC internal prototype to avoid an error.
10009 Use char because int might match the return type of a GCC
10010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010011#ifdef __cplusplus
10012extern "C"
10013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010014char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010015int
10016main ()
10017{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ;
10020 return 0;
10021}
10022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010025else
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010027fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010028rm -f core conftest.err conftest.$ac_objext \
10029 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010030LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10033$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010034if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010037 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010038 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010039 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010040else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010041
Martin v. Löwis130fb172001-07-19 11:00:41 +000010042 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010043fi
10044
Guido van Rossum627b2d71993-12-24 10:39:16 +000010045
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010046fi
10047
Guido van Rossum0be3e491997-05-22 20:33:33 +000010048fi
10049
Guido van Rossum49545951997-12-02 19:28:29 +000010050fi
10051
Guido van Rossumb93a8621998-05-07 13:27:32 +000010052fi
10053
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010055rm -f core conftest.err conftest.$ac_objext \
10056 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10059$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010060if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010061 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010062else
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010064LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010068/* Override any GCC internal prototype to avoid an error.
10069 Use char because int might match the return type of a GCC
10070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010071#ifdef __cplusplus
10072extern "C"
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010075int
10076main ()
10077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 ;
10080 return 0;
10081}
10082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010085else
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010088rm -f core conftest.err conftest.$ac_objext \
10089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10093$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010094if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010096
Martin v. Löwis130fb172001-07-19 11:00:41 +000010097 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010098 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010099 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010100fi
10101
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010102
Neal Norwitza978ab02002-11-02 16:58:05 +000010103 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10105$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010106if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010107 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010110LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114/* Override any GCC internal prototype to avoid an error.
10115 Use char because int might match the return type of a GCC
10116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010117#ifdef __cplusplus
10118extern "C"
10119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010120char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010121int
10122main ()
10123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ;
10126 return 0;
10127}
10128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010130 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010131else
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134rm -f core conftest.err conftest.$ac_objext \
10135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010136LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10139$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010140if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010142
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010143 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010144 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010145 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010146fi
10147
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010148 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010149fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010150
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010151if test "$posix_threads" = "yes"; then
10152 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010153
Matthias Kloseb9621712010-04-24 17:59:49 +000010154$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155
10156 fi
10157
10158 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10159 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010160 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010161$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010162
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010163 ;;
10164 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010165$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010166
10167 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010168 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010169$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010170
10171 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010172 esac
10173
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10175$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010176 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010180 ac_cv_pthread_system_supported=no
10181else
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010184
10185 #include <stdio.h>
10186 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010187 void *foo(void *parm) {
10188 return NULL;
10189 }
10190 main() {
10191 pthread_attr_t attr;
10192 pthread_t id;
10193 if (pthread_attr_init(&attr)) exit(-1);
10194 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10195 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10196 exit(0);
10197 }
10198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010199if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010200 ac_cv_pthread_system_supported=yes
10201else
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010206fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208
Guido van Rossum627b2d71993-12-24 10:39:16 +000010209fi
10210
Matthias Kloseb9621712010-04-24 17:59:49 +000010211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10212$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010213 if test "$ac_cv_pthread_system_supported" = "yes"; then
10214
Matthias Kloseb9621712010-04-24 17:59:49 +000010215$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010216
10217 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 for ac_func in pthread_sigmask
10219do :
10220 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010223#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010224_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010225 case $ac_sys_system in
10226 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010227
Matthias Kloseb9621712010-04-24 17:59:49 +000010228$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010229
10230 ;;
10231 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010232fi
10233done
10234
Christian Heimesf77b4b22013-08-21 13:26:05 +020010235 for ac_func in pthread_atfork
10236do :
10237 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10238if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10239 cat >>confdefs.h <<_ACEOF
10240#define HAVE_PTHREAD_ATFORK 1
10241_ACEOF
10242
10243fi
10244done
10245
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010246fi
10247
10248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10252$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010254if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010259 ipv6=no
10260 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010261 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10262$as_echo "yes" >&6; }
10263 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264
10265 ipv6=yes
10266 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268else
Martin v. Löwis11437992002-04-12 09:54:03 +000010269
Matthias Kloseb9621712010-04-24 17:59:49 +000010270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010271/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272 /* AF_INET6 available check */
10273#include <sys/types.h>
10274#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010275int
10276main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010278int domain = AF_INET6;
10279 ;
10280 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281}
Martin v. Löwis11437992002-04-12 09:54:03 +000010282_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010283if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10286$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010288
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010289else
Matthias Kloseb159a552010-04-25 21:00:44 +000010290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10292$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010294
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010295fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010297
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010298if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10300$as_echo_n "checking if RFC2553 API is available... " >&6; }
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010303
10304 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010305#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010306int
10307main ()
10308{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010309struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010310 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ;
10312 return 0;
10313}
Matthias Kloseb159a552010-04-25 21:00:44 +000010314
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010317
10318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010320 ipv6=yes
10321
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010322else
Matthias Kloseb159a552010-04-25 21:00:44 +000010323
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010325$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010326 ipv6=no
10327
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010330fi
10331
10332if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010334
10335fi
10336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337fi
10338
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010339
10340ipv6type=unknown
10341ipv6lib=none
10342ipv6trylibc=no
10343
10344if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10346$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010347 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10348 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010349 case $i in
10350 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010354#include <netinet/in.h>
10355#ifdef IPV6_INRIA_VERSION
10356yes
10357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010361 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010362fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010363rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010364
10365 ;;
10366 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010369
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010370#include <netinet/in.h>
10371#ifdef __KAME__
10372yes
10373#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010374_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010377 ipv6type=$i;
10378 ipv6lib=inet6
10379 ipv6libdir=/usr/local/v6/lib
10380 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010381fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010382rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010383
10384 ;;
10385 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010387/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010388
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389#include <features.h>
10390#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10391yes
10392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010393_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010396 ipv6type=$i;
10397 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010398fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010399rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010400
10401 ;;
10402 linux-inet6)
10403 if test -d /usr/inet6; then
10404 ipv6type=$i
10405 ipv6lib=inet6
10406 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010407 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010408 fi
10409 ;;
10410 solaris)
10411 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010412 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010413 ipv6type=$i
10414 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010415 fi
10416 fi
10417 ;;
10418 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010421
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010422#include <sys/param.h>
10423#ifdef _TOSHIBA_INET6
10424yes
10425#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010426_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010428 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010429 ipv6type=$i;
10430 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010431 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010432fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010433rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010434
10435 ;;
10436 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010439
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010440#include </usr/local/v6/include/sys/v6config.h>
10441#ifdef __V6D__
10442yes
10443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010444_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010447 ipv6type=$i;
10448 ipv6lib=v6;
10449 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010450 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010452rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010453
10454 ;;
10455 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010458
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010459#include <sys/param.h>
10460#ifdef _ZETA_MINAMI_INET6
10461yes
10462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010463_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010464if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010465 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010466 ipv6type=$i;
10467 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010468 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010469fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010470rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010471
10472 ;;
10473 esac
10474 if test "$ipv6type" != "unknown"; then
10475 break
10476 fi
10477 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10479$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010480fi
10481
10482if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10483 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10484 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10485 echo "using lib$ipv6lib"
10486 else
10487 if test $ipv6trylibc = "yes"; then
10488 echo "using libc"
10489 else
10490 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10491 echo "You need to fetch lib$ipv6lib.a from appropriate"
10492 echo 'ipv6 kit and compile beforehand.'
10493 exit 1
10494 fi
10495 fi
10496fi
10497
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10499$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010501/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010502
10503 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010504int
10505main ()
10506{
10507FSIORefNum fRef = 0
10508 ;
10509 return 0;
10510}
Matthias Kloseb159a552010-04-25 21:00:44 +000010511
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010514
Matthias Kloseb159a552010-04-25 21:00:44 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010517
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10519$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010520
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010521else
Matthias Kloseb159a552010-04-25 21:00:44 +000010522
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010525
10526fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10528
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010529# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10531$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535 withval=$with_doc_strings;
10536fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010537
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010538
10539if test -z "$with_doc_strings"
10540then with_doc_strings="yes"
10541fi
10542if test "$with_doc_strings" != "no"
10543then
10544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010546
10547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10549$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010550
Antoine Pitrou042b1282010-08-13 21:15:58 +000010551# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10553$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010556if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010558if test "$withval" != no
10559then
10560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10564$as_echo "yes" >&6; }
10565else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010567fi
10568else
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10570$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571fi
10572
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010573
10574# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10576$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580 withval=$with_pymalloc;
10581fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010582
Neil Schemenauera35c6882001-02-27 04:45:05 +000010583
Neil Schemenauer16c22972002-03-22 15:34:49 +000010584if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010585then
10586 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010587fi
10588if test "$with_pymalloc" != "no"
10589then
Martin v. Löwis11437992002-04-12 09:54:03 +000010590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010592
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010593 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10596$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010597
Benjamin Peterson05159c42009-12-03 03:01:27 +000010598# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10600$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010601
10602# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010603if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010604 withval=$with_valgrind;
10605else
10606 with_valgrind=no
10607fi
10608
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10610$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010611if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 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 +020010613if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010616
10617else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010618 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010619
10620fi
10621
10622
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010623 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010624fi
10625
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010626# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010627
Guido van Rossum98935bf2001-09-05 19:13:16 +000010628DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010629
Guido van Rossume97ee181999-12-20 21:27:22 +000010630# the dlopen() function means we might want to use dynload_shlib.o. some
10631# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010632for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010633do :
10634 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010635if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010637#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010639
Guido van Rossume97ee181999-12-20 21:27:22 +000010640fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010641done
Guido van Rossume97ee181999-12-20 21:27:22 +000010642
Michael W. Hudson54241132001-12-07 15:38:26 +000010643
Guido van Rossume97ee181999-12-20 21:27:22 +000010644# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10645# loading of modules.
10646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10648$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010649if test -z "$DYNLOADFILE"
10650then
10651 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010652 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10653 if test "$ac_cv_func_dlopen" = yes
10654 then DYNLOADFILE="dynload_shlib.o"
10655 else DYNLOADFILE="dynload_aix.o"
10656 fi
10657 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010658 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010659 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10660 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010661 *)
10662 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10663 # out any dynamic loading
10664 if test "$ac_cv_func_dlopen" = yes
10665 then DYNLOADFILE="dynload_shlib.o"
10666 else DYNLOADFILE="dynload_stub.o"
10667 fi
10668 ;;
10669 esac
10670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10672$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010673if test "$DYNLOADFILE" != "dynload_stub.o"
10674then
Martin v. Löwis11437992002-04-12 09:54:03 +000010675
Matthias Kloseb9621712010-04-24 17:59:49 +000010676$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010677
10678fi
10679
Neil Schemenauer4e425612001-06-19 15:44:15 +000010680# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10681
Michael W. Hudson54241132001-12-07 15:38:26 +000010682
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10684$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010685if test -z "$MACHDEP_OBJS"
10686then
Jack Jansene578a632001-08-15 01:27:14 +000010687 MACHDEP_OBJS=$extra_machdep_objs
10688else
10689 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010690fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010691if test -z "$MACHDEP_OBJS"; then
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10693$as_echo "none" >&6; }
10694else
10695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10696$as_echo "$MACHDEP_OBJS" >&6; }
10697fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010698
Guido van Rossum627b2d71993-12-24 10:39:16 +000010699# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010700for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010701 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010702 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010703 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010704 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010705 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010706 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010707 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10708 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010709 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010710 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010711 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010712 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010713 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010714 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010715 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10716 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010717 sigaction sigaltstack siginterrupt sigpending sigrelse \
10718 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010719 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010720 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010721 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010722do :
10723 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10724ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010725if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010727#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010728_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010729
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010730fi
10731done
10732
Michael W. Hudson54241132001-12-07 15:38:26 +000010733
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010734ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10735 #include <dirent.h>
10736"
10737if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10738
10739$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10740
10741fi
10742
10743
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010744# For some functions, having a definition is not sufficient, since
10745# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10747$as_echo_n "checking for chroot... " >&6; }
10748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010750#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010751int
10752main ()
10753{
10754void *x=chroot
10755 ;
10756 return 0;
10757}
10758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010760
Matthias Kloseb9621712010-04-24 17:59:49 +000010761$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010762
Matthias Kloseb159a552010-04-25 21:00:44 +000010763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010764$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010765else
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010768
10769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10772$as_echo_n "checking for link... " >&6; }
10773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010774/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010775#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010776int
10777main ()
10778{
10779void *x=link
10780 ;
10781 return 0;
10782}
10783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010787
Matthias Kloseb159a552010-04-25 21:00:44 +000010788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010793
10794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10797$as_echo_n "checking for symlink... " >&6; }
10798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010800#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010801int
10802main ()
10803{
10804void *x=symlink
10805 ;
10806 return 0;
10807}
10808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010809if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010810
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010812
Matthias Kloseb159a552010-04-25 21:00:44 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010814$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010815else
Matthias Kloseb9621712010-04-24 17:59:49 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10817$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010818
10819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10822$as_echo_n "checking for fchdir... " >&6; }
10823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010824/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010825#include <unistd.h>
10826int
10827main ()
10828{
10829void *x=fchdir
10830 ;
10831 return 0;
10832}
10833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010834if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010835
Matthias Kloseb9621712010-04-24 17:59:49 +000010836$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010837
Matthias Kloseb159a552010-04-25 21:00:44 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010839$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010840else
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10842$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010843
10844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10847$as_echo_n "checking for fsync... " >&6; }
10848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010849/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010850#include <unistd.h>
10851int
10852main ()
10853{
10854void *x=fsync
10855 ;
10856 return 0;
10857}
10858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010862
Matthias Kloseb159a552010-04-25 21:00:44 +000010863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010864$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10867$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010868
10869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10872$as_echo_n "checking for fdatasync... " >&6; }
10873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010875#include <unistd.h>
10876int
10877main ()
10878{
10879void *x=fdatasync
10880 ;
10881 return 0;
10882}
10883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010887
Matthias Kloseb159a552010-04-25 21:00:44 +000010888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010889$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010893
10894fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10897$as_echo_n "checking for epoll... " >&6; }
10898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010899/* end confdefs.h. */
10900#include <sys/epoll.h>
10901int
10902main ()
10903{
10904void *x=epoll_create
10905 ;
10906 return 0;
10907}
10908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010909if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010912
Matthias Kloseb159a552010-04-25 21:00:44 +000010913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010914$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010915else
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010918
10919fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10922$as_echo_n "checking for epoll_create1... " >&6; }
10923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10924/* end confdefs.h. */
10925#include <sys/epoll.h>
10926int
10927main ()
10928{
10929void *x=epoll_create1
10930 ;
10931 return 0;
10932}
10933_ACEOF
10934if ac_fn_c_try_compile "$LINENO"; then :
10935
10936$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10937
10938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10939$as_echo "yes" >&6; }
10940else
10941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10942$as_echo "no" >&6; }
10943
10944fi
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10947$as_echo_n "checking for kqueue... " >&6; }
10948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010949/* end confdefs.h. */
10950
10951#include <sys/types.h>
10952#include <sys/event.h>
10953
10954int
10955main ()
10956{
10957int x=kqueue()
10958 ;
10959 return 0;
10960}
10961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010963
Matthias Kloseb9621712010-04-24 17:59:49 +000010964$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010965
Matthias Kloseb159a552010-04-25 21:00:44 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010967$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010971
10972fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10975$as_echo_n "checking for prlimit... " >&6; }
10976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978
10979#include <sys/time.h>
10980#include <sys/resource.h>
10981
10982int
10983main ()
10984{
10985void *x=prlimit
10986 ;
10987 return 0;
10988}
10989_ACEOF
10990if ac_fn_c_try_compile "$LINENO"; then :
10991
10992$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10993
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10995$as_echo "yes" >&6; }
10996else
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10998$as_echo "no" >&6; }
10999
11000fi
11001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11002
Martin v. Löwisd5843682002-11-21 20:41:28 +000011003# On some systems (eg. FreeBSD 5), we would find a definition of the
11004# functions ctermid_r, setgroups in the library, but no prototype
11005# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11006# address to avoid compiler warnings and potential miscompilations
11007# because of the missing prototypes.
11008
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11010$as_echo_n "checking for ctermid_r... " >&6; }
11011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011013
Martin v. Löwisd5843682002-11-21 20:41:28 +000011014#include <stdio.h>
11015
Martin v. Löwisd5843682002-11-21 20:41:28 +000011016int
11017main ()
11018{
11019void* p = ctermid_r
11020 ;
11021 return 0;
11022}
11023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011027
Matthias Kloseb159a552010-04-25 21:00:44 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011029$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011030else
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011033
11034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11036
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11038$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011039if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011040 $as_echo_n "(cached) " >&6
11041else
11042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011043/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011044#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011045int
11046main ()
11047{
11048void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011049
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011055 ac_cv_flock_decl=yes
11056else
11057 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011058
11059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011061
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011062fi
11063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11064$as_echo "$ac_cv_flock_decl" >&6; }
11065if test "x${ac_cv_flock_decl}" = xyes; then
11066 for ac_func in flock
11067do :
11068 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011069if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011070 cat >>confdefs.h <<_ACEOF
11071#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011072_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011073
Antoine Pitroua3000072010-09-07 14:52:42 +000011074else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011076$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011077if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011078 $as_echo_n "(cached) " >&6
11079else
11080 ac_check_lib_save_LIBS=$LIBS
11081LIBS="-lbsd $LIBS"
11082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11083/* end confdefs.h. */
11084
11085/* Override any GCC internal prototype to avoid an error.
11086 Use char because int might match the return type of a GCC
11087 builtin and then its argument prototype would still apply. */
11088#ifdef __cplusplus
11089extern "C"
11090#endif
11091char flock ();
11092int
11093main ()
11094{
11095return flock ();
11096 ;
11097 return 0;
11098}
11099_ACEOF
11100if ac_fn_c_try_link "$LINENO"; then :
11101 ac_cv_lib_bsd_flock=yes
11102else
11103 ac_cv_lib_bsd_flock=no
11104fi
11105rm -f core conftest.err conftest.$ac_objext \
11106 conftest$ac_exeext conftest.$ac_ext
11107LIBS=$ac_check_lib_save_LIBS
11108fi
11109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11110$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011111if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011112 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011113
11114
11115$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11116
11117
11118fi
11119
11120
11121fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011122done
11123
Antoine Pitroua3000072010-09-07 14:52:42 +000011124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011125
Matthias Kloseb9621712010-04-24 17:59:49 +000011126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11127$as_echo_n "checking for getpagesize... " >&6; }
11128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011129/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011130
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011131#include <unistd.h>
11132
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011133int
11134main ()
11135{
11136void* p = getpagesize
11137 ;
11138 return 0;
11139}
11140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011142
Matthias Kloseb9621712010-04-24 17:59:49 +000011143$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011144
Matthias Kloseb159a552010-04-25 21:00:44 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011150
11151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011153
Victor Stinner984890f2011-11-24 13:53:38 +010011154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11155$as_echo_n "checking for broken unsetenv... " >&6; }
11156cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11157/* end confdefs.h. */
11158
11159#include <stdlib.h>
11160
11161int
11162main ()
11163{
11164int res = unsetenv("DUMMY")
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169if ac_fn_c_try_compile "$LINENO"; then :
11170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11171$as_echo "no" >&6; }
11172else
11173
11174$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11175
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11177$as_echo "yes" >&6; }
11178
11179fi
11180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11181
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011182for ac_prog in true
11183do
11184 # Extract the first word of "$ac_prog", so it can be a program name with args.
11185set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11187$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011188if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011190else
11191 if test -n "$TRUE"; then
11192 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11193else
11194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197 IFS=$as_save_IFS
11198 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011199 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011201 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011202 $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 +000011203 break 2
11204 fi
11205done
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011208
11209fi
11210fi
11211TRUE=$ac_cv_prog_TRUE
11212if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11214$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011215else
Matthias Kloseb9621712010-04-24 17:59:49 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011218fi
11219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011220
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011221 test -n "$TRUE" && break
11222done
11223test -n "$TRUE" || TRUE="/bin/true"
11224
11225
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11227$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011228if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011230else
11231 ac_check_lib_save_LIBS=$LIBS
11232LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011236/* Override any GCC internal prototype to avoid an error.
11237 Use char because int might match the return type of a GCC
11238 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011239#ifdef __cplusplus
11240extern "C"
11241#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011242char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011243int
11244main ()
11245{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011246return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011247 ;
11248 return 0;
11249}
11250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011252 ac_cv_lib_c_inet_aton=yes
11253else
Matthias Kloseb9621712010-04-24 17:59:49 +000011254 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011256rm -f core conftest.err conftest.$ac_objext \
11257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011258LIBS=$ac_check_lib_save_LIBS
11259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11261$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011262if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011263 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011264else
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11266$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011267if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011269else
11270 ac_check_lib_save_LIBS=$LIBS
11271LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275/* Override any GCC internal prototype to avoid an error.
11276 Use char because int might match the return type of a GCC
11277 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011278#ifdef __cplusplus
11279extern "C"
11280#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011281char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011282int
11283main ()
11284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011285return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011286 ;
11287 return 0;
11288}
11289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011291 ac_cv_lib_resolv_inet_aton=yes
11292else
Matthias Kloseb9621712010-04-24 17:59:49 +000011293 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011295rm -f core conftest.err conftest.$ac_objext \
11296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011297LIBS=$ac_check_lib_save_LIBS
11298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11300$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011301if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011302 cat >>confdefs.h <<_ACEOF
11303#define HAVE_LIBRESOLV 1
11304_ACEOF
11305
11306 LIBS="-lresolv $LIBS"
11307
11308fi
11309
11310
11311fi
11312
11313
Christian Heimesd0764e22007-12-04 15:00:33 +000011314# On Tru64, chflags seems to be present, but calling it will
11315# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11317$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011318if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011320else
Matthias Kloseb9621712010-04-24 17:59:49 +000011321 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011322 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011323else
Matthias Kloseb9621712010-04-24 17:59:49 +000011324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011325/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011326
Christian Heimesd0764e22007-12-04 15:00:33 +000011327#include <sys/stat.h>
11328#include <unistd.h>
11329int main(int argc, char*argv[])
11330{
11331 if(chflags(argv[0], 0) != 0)
11332 return 1;
11333 return 0;
11334}
Ned Deily3eb67d52011-06-28 00:00:28 -070011335
Christian Heimesd0764e22007-12-04 15:00:33 +000011336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011338 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011344fi
11345
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011346
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11349$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011350if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011352if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011353 ac_cv_have_chflags="yes"
11354else
11355 ac_cv_have_chflags="no"
11356fi
11357
11358fi
11359if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011360
Matthias Kloseb9621712010-04-24 17:59:49 +000011361$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011362
11363fi
11364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11366$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011367if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011369else
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011371 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011372else
Matthias Kloseb9621712010-04-24 17:59:49 +000011373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011374/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011375
Christian Heimesd0764e22007-12-04 15:00:33 +000011376#include <sys/stat.h>
11377#include <unistd.h>
11378int main(int argc, char*argv[])
11379{
11380 if(lchflags(argv[0], 0) != 0)
11381 return 1;
11382 return 0;
11383}
Ned Deily3eb67d52011-06-28 00:00:28 -070011384
Christian Heimesd0764e22007-12-04 15:00:33 +000011385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011386if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011387 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011388else
Matthias Kloseb9621712010-04-24 17:59:49 +000011389 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011391rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11392 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011393fi
11394
11395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11398$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011399if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011400 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011401if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011402 ac_cv_have_lchflags="yes"
11403else
11404 ac_cv_have_lchflags="no"
11405fi
11406
11407fi
11408if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011409
Matthias Kloseb9621712010-04-24 17:59:49 +000011410$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011411
11412fi
11413
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011414case $ac_sys_system/$ac_sys_release in
11415Darwin/*)
11416 _CUR_CFLAGS="${CFLAGS}"
11417 _CUR_LDFLAGS="${LDFLAGS}"
11418 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11419 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11420 ;;
11421esac
11422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11424$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011427else
11428 ac_check_lib_save_LIBS=$LIBS
11429LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011431/* end confdefs.h. */
11432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011433/* Override any GCC internal prototype to avoid an error.
11434 Use char because int might match the return type of a GCC
11435 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011436#ifdef __cplusplus
11437extern "C"
11438#endif
11439char inflateCopy ();
11440int
11441main ()
11442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011444 ;
11445 return 0;
11446}
11447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011448if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011449 ac_cv_lib_z_inflateCopy=yes
11450else
Matthias Kloseb9621712010-04-24 17:59:49 +000011451 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011453rm -f core conftest.err conftest.$ac_objext \
11454 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011455LIBS=$ac_check_lib_save_LIBS
11456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11458$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011459if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011462
11463fi
11464
11465
11466case $ac_sys_system/$ac_sys_release in
11467Darwin/*)
11468 CFLAGS="${_CUR_CFLAGS}"
11469 LDFLAGS="${_CUR_LDFLAGS}"
11470 ;;
11471esac
11472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11474$as_echo_n "checking for hstrerror... " >&6; }
11475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011477
Martin v. Löwise9416172003-05-03 10:12:45 +000011478#include <netdb.h>
11479
Martin v. Löwise9416172003-05-03 10:12:45 +000011480int
11481main ()
11482{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011483void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011491
Matthias Kloseb159a552010-04-25 21:00:44 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011493$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011494else
Matthias Kloseb9621712010-04-24 17:59:49 +000011495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011497
11498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011499rm -f core conftest.err conftest.$ac_objext \
11500 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011501
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11503$as_echo_n "checking for inet_aton... " >&6; }
11504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011505/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011506
Martin v. Löwis86d66262006-02-17 08:40:11 +000011507#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011508#include <sys/socket.h>
11509#include <netinet/in.h>
11510#include <arpa/inet.h>
11511
Martin v. Löwise9416172003-05-03 10:12:45 +000011512int
11513main ()
11514{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011515void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011516 ;
11517 return 0;
11518}
11519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011520if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011523
Matthias Kloseb159a552010-04-25 21:00:44 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011525$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011526else
Matthias Kloseb9621712010-04-24 17:59:49 +000011527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011529
11530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011531rm -f core conftest.err conftest.$ac_objext \
11532 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11535$as_echo_n "checking for inet_pton... " >&6; }
11536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011538
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011539#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011540#include <sys/socket.h>
11541#include <netinet/in.h>
11542#include <arpa/inet.h>
11543
Martin v. Löwise9416172003-05-03 10:12:45 +000011544int
11545main ()
11546{
11547void* p = inet_pton
11548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011555
Matthias Kloseb159a552010-04-25 21:00:44 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011561
11562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011564
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011565# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11567$as_echo_n "checking for setgroups... " >&6; }
11568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011569/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011571#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011572#ifdef HAVE_GRP_H
11573#include <grp.h>
11574#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011575
Martin v. Löwisd5843682002-11-21 20:41:28 +000011576int
11577main ()
11578{
11579void* p = setgroups
11580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011587
Matthias Kloseb159a552010-04-25 21:00:44 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011593
11594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011596
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011597# check for openpty and forkpty
11598
11599for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011600do :
11601 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011602if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011603 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011604#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011605_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011606
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011607else
Matthias Kloseb9621712010-04-24 17:59:49 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11609$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011610if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011611 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011612else
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011614LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011618/* Override any GCC internal prototype to avoid an error.
11619 Use char because int might match the return type of a GCC
11620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011621#ifdef __cplusplus
11622extern "C"
11623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011624char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011625int
11626main ()
11627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011629 ;
11630 return 0;
11631}
11632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011635else
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011638rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011640LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11643$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011644if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011646 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11649$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011650if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011652else
11653 ac_check_lib_save_LIBS=$LIBS
11654LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011656/* end confdefs.h. */
11657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658/* Override any GCC internal prototype to avoid an error.
11659 Use char because int might match the return type of a GCC
11660 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011661#ifdef __cplusplus
11662extern "C"
11663#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011664char openpty ();
11665int
11666main ()
11667{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011673if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011674 ac_cv_lib_bsd_openpty=yes
11675else
Matthias Kloseb9621712010-04-24 17:59:49 +000011676 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011678rm -f core conftest.err conftest.$ac_objext \
11679 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011680LIBS=$ac_check_lib_save_LIBS
11681fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11683$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011684if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011686 LIBS="$LIBS -lbsd"
11687fi
11688
11689
11690fi
11691
Fred Drake8cef4cf2000-06-28 16:40:38 +000011692
11693fi
11694done
11695
11696for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011697do :
11698 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011699if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011701#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011702_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011703
Fred Drake8cef4cf2000-06-28 16:40:38 +000011704else
Matthias Kloseb9621712010-04-24 17:59:49 +000011705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11706$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011707if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011708 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011709else
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011711LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715/* Override any GCC internal prototype to avoid an error.
11716 Use char because int might match the return type of a GCC
11717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011718#ifdef __cplusplus
11719extern "C"
11720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011721char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011722int
11723main ()
11724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011725return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011726 ;
11727 return 0;
11728}
11729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011735rm -f core conftest.err conftest.$ac_objext \
11736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011737LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11740$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011741if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011743 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11746$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011747if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011749else
11750 ac_check_lib_save_LIBS=$LIBS
11751LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011753/* end confdefs.h. */
11754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755/* Override any GCC internal prototype to avoid an error.
11756 Use char because int might match the return type of a GCC
11757 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011758#ifdef __cplusplus
11759extern "C"
11760#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011761char forkpty ();
11762int
11763main ()
11764{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011765return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011766 ;
11767 return 0;
11768}
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011771 ac_cv_lib_bsd_forkpty=yes
11772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011775rm -f core conftest.err conftest.$ac_objext \
11776 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011777LIBS=$ac_check_lib_save_LIBS
11778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11780$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011783 LIBS="$LIBS -lbsd"
11784fi
11785
11786
11787fi
11788
Fred Drake8cef4cf2000-06-28 16:40:38 +000011789
11790fi
11791done
11792
Jack Jansendd19cf82001-12-06 22:36:17 +000011793
Christian Heimesb186d002008-03-18 15:15:01 +000011794# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011795for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011796do :
11797 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011801_ACEOF
11802
11803fi
11804done
11805
11806
Michael W. Hudson54241132001-12-07 15:38:26 +000011807# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011808for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011809do :
11810 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11811ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011812if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011815_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011816
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011817fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011818done
11819
Michael W. Hudson54241132001-12-07 15:38:26 +000011820
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011821ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011823 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011824
Martin v. Löwis1142de32002-03-29 16:28:31 +000011825else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011827 *" dup2.$ac_objext "* ) ;;
11828 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011829 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011830esac
11831
Martin v. Löwis1142de32002-03-29 16:28:31 +000011832fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011833
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011834ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011836 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11837
11838else
11839 case " $LIBOBJS " in
11840 *" strdup.$ac_objext "* ) ;;
11841 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11842 ;;
11843esac
11844
11845fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011846
11847
11848for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011849do :
11850 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011856/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011858int
11859main ()
11860{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 ;
11863 return 0;
11864}
11865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011867
Matthias Kloseb9621712010-04-24 17:59:49 +000011868$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011869
Guido van Rossum627b2d71993-12-24 10:39:16 +000011870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011872
Guido van Rossum627b2d71993-12-24 10:39:16 +000011873fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011874done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011875
Jack Jansen150753c2003-03-29 22:07:47 +000011876for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011877do :
11878 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011879if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011880 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011881#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011885#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011886int
11887main ()
11888{
11889setpgrp(0,0);
11890 ;
11891 return 0;
11892}
11893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011895
Matthias Kloseb9621712010-04-24 17:59:49 +000011896$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011897
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011900
11901fi
11902done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011903
Thomas Wouters3a584202000-08-05 23:28:51 +000011904for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011905do :
11906 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011907if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011908 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011909#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011912/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011914int
11915main ()
11916{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011917gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ;
11919 return 0;
11920}
11921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011922if ac_fn_c_try_compile "$LINENO"; then :
11923
Guido van Rossum627b2d71993-12-24 10:39:16 +000011924else
Skip Montanaro6dead952003-09-25 14:50:04 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011927
Martin v. Löwis11437992002-04-12 09:54:03 +000011928
Guido van Rossum627b2d71993-12-24 10:39:16 +000011929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011931
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011932fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011933done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934
Michael W. Hudson54241132001-12-07 15:38:26 +000011935
Victor Stinnere0be4232011-10-25 13:06:09 +020011936for ac_func in clock_gettime
11937do :
11938 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11939if test "x$ac_cv_func_clock_gettime" = xyes; then :
11940 cat >>confdefs.h <<_ACEOF
11941#define HAVE_CLOCK_GETTIME 1
11942_ACEOF
11943
11944else
11945
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11947$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11948if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11949 $as_echo_n "(cached) " >&6
11950else
11951 ac_check_lib_save_LIBS=$LIBS
11952LIBS="-lrt $LIBS"
11953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954/* end confdefs.h. */
11955
11956/* Override any GCC internal prototype to avoid an error.
11957 Use char because int might match the return type of a GCC
11958 builtin and then its argument prototype would still apply. */
11959#ifdef __cplusplus
11960extern "C"
11961#endif
11962char clock_gettime ();
11963int
11964main ()
11965{
11966return clock_gettime ();
11967 ;
11968 return 0;
11969}
11970_ACEOF
11971if ac_fn_c_try_link "$LINENO"; then :
11972 ac_cv_lib_rt_clock_gettime=yes
11973else
11974 ac_cv_lib_rt_clock_gettime=no
11975fi
11976rm -f core conftest.err conftest.$ac_objext \
11977 conftest$ac_exeext conftest.$ac_ext
11978LIBS=$ac_check_lib_save_LIBS
11979fi
11980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11981$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11982if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11983
Victor Stinner7efb8332014-08-29 15:41:08 +020011984 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020011985 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11986
11987
11988$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11989
11990
11991fi
11992
11993
11994fi
11995done
11996
11997
11998for ac_func in clock_getres
11999do :
12000 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12001if test "x$ac_cv_func_clock_getres" = xyes; then :
12002 cat >>confdefs.h <<_ACEOF
12003#define HAVE_CLOCK_GETRES 1
12004_ACEOF
12005
12006else
12007
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12009$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12010if ${ac_cv_lib_rt_clock_getres+:} false; then :
12011 $as_echo_n "(cached) " >&6
12012else
12013 ac_check_lib_save_LIBS=$LIBS
12014LIBS="-lrt $LIBS"
12015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12016/* end confdefs.h. */
12017
12018/* Override any GCC internal prototype to avoid an error.
12019 Use char because int might match the return type of a GCC
12020 builtin and then its argument prototype would still apply. */
12021#ifdef __cplusplus
12022extern "C"
12023#endif
12024char clock_getres ();
12025int
12026main ()
12027{
12028return clock_getres ();
12029 ;
12030 return 0;
12031}
12032_ACEOF
12033if ac_fn_c_try_link "$LINENO"; then :
12034 ac_cv_lib_rt_clock_getres=yes
12035else
12036 ac_cv_lib_rt_clock_getres=no
12037fi
12038rm -f core conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext conftest.$ac_ext
12040LIBS=$ac_check_lib_save_LIBS
12041fi
12042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12043$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12044if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12045
12046 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12047
12048
12049fi
12050
12051
12052fi
12053done
12054
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12057$as_echo_n "checking for major... " >&6; }
12058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012059/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012060
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012061#if defined(MAJOR_IN_MKDEV)
12062#include <sys/mkdev.h>
12063#elif defined(MAJOR_IN_SYSMACROS)
12064#include <sys/sysmacros.h>
12065#else
12066#include <sys/types.h>
12067#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012068
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012069int
12070main ()
12071{
12072
12073 makedev(major(0),minor(0));
12074
12075 ;
12076 return 0;
12077}
12078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012079if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012080
12081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012086
12087else
Skip Montanaro6dead952003-09-25 14:50:04 +000012088
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012091
12092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093rm -f core conftest.err conftest.$ac_objext \
12094 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012095
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012096# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012097# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12099$as_echo_n "checking for getaddrinfo... " >&6; }
12100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012101/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012102
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012103#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012104#include <sys/socket.h>
12105#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012106#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107
Martin v. Löwis11437992002-04-12 09:54:03 +000012108int
12109main ()
12110{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012111getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012112 ;
12113 return 0;
12114}
12115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012117 have_getaddrinfo=yes
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core conftest.err conftest.$ac_objext \
12122 conftest$ac_exeext conftest.$ac_ext
12123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12124$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012125if test $have_getaddrinfo = yes
12126then
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12128$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012129 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012133
12134if test "${enable_ipv6+set}" = set; then
12135 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12136else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012137 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012138fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012139else
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012141/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012142
Stefan Krah19c21392012-11-22 23:47:32 +010012143#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012144#include <sys/types.h>
12145#include <netdb.h>
12146#include <string.h>
12147#include <sys/socket.h>
12148#include <netinet/in.h>
12149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012151{
12152 int passive, gaierr, inet4 = 0, inet6 = 0;
12153 struct addrinfo hints, *ai, *aitop;
12154 char straddr[INET6_ADDRSTRLEN], strport[16];
12155
12156 for (passive = 0; passive <= 1; passive++) {
12157 memset(&hints, 0, sizeof(hints));
12158 hints.ai_family = AF_UNSPEC;
12159 hints.ai_flags = passive ? AI_PASSIVE : 0;
12160 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012161 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012162 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12163 (void)gai_strerror(gaierr);
12164 goto bad;
12165 }
12166 for (ai = aitop; ai; ai = ai->ai_next) {
12167 if (ai->ai_addr == NULL ||
12168 ai->ai_addrlen == 0 ||
12169 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12170 straddr, sizeof(straddr), strport, sizeof(strport),
12171 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12172 goto bad;
12173 }
12174 switch (ai->ai_family) {
12175 case AF_INET:
12176 if (strcmp(strport, "54321") != 0) {
12177 goto bad;
12178 }
12179 if (passive) {
12180 if (strcmp(straddr, "0.0.0.0") != 0) {
12181 goto bad;
12182 }
12183 } else {
12184 if (strcmp(straddr, "127.0.0.1") != 0) {
12185 goto bad;
12186 }
12187 }
12188 inet4++;
12189 break;
12190 case AF_INET6:
12191 if (strcmp(strport, "54321") != 0) {
12192 goto bad;
12193 }
12194 if (passive) {
12195 if (strcmp(straddr, "::") != 0) {
12196 goto bad;
12197 }
12198 } else {
12199 if (strcmp(straddr, "::1") != 0) {
12200 goto bad;
12201 }
12202 }
12203 inet6++;
12204 break;
12205 case AF_UNSPEC:
12206 goto bad;
12207 break;
12208 default:
12209 /* another family support? */
12210 break;
12211 }
12212 }
12213 }
12214
12215 if (!(inet4 == 0 || inet4 == 2))
12216 goto bad;
12217 if (!(inet6 == 0 || inet6 == 2))
12218 goto bad;
12219
12220 if (aitop)
12221 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012222 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012223
12224 bad:
12225 if (aitop)
12226 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012227 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012228}
12229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012232 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012240fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012241
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012243
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12245$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12246
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012247if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012248then
12249 if test $ipv6 = yes
12250 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012251 echo 'Fatal: You must get working getaddrinfo() function.'
12252 echo ' or you can specify "--disable-ipv6"'.
12253 exit 1
12254 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012255else
Martin v. Löwis11437992002-04-12 09:54:03 +000012256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012258
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012259fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012260
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012261for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012262do :
12263 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012264if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012267_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012268
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269fi
12270done
12271
Michael W. Hudson54241132001-12-07 15:38:26 +000012272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12275$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012276if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012277 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278else
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281#include <sys/types.h>
12282#include <sys/time.h>
12283#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
12288if ((struct tm *) 0)
12289return 0;
12290 ;
12291 return 0;
12292}
12293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012295 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012296else
Matthias Kloseb9621712010-04-24 17:59:49 +000012297 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12302$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012303if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306
12307fi
12308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12310$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012311if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012312 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313else
Matthias Kloseb9621712010-04-24 17:59:49 +000012314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316#include <sys/types.h>
12317#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
Martin v. Löwis11437992002-04-12 09:54:03 +000012319int
12320main ()
12321{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322struct tm tm;
12323 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330 ac_cv_struct_tm=time.h
12331else
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12337$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012338if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012341
12342fi
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344ac_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 +000012345#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347"
Victor Stinnere0be4232011-10-25 13:06:09 +020012348if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012349
12350cat >>confdefs.h <<_ACEOF
12351#define HAVE_STRUCT_TM_TM_ZONE 1
12352_ACEOF
12353
12354
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12358
Matthias Kloseb9621712010-04-24 17:59:49 +000012359$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360
12361else
Matthias Kloseb9621712010-04-24 17:59:49 +000012362 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12363"
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012368fi
12369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372_ACEOF
12373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12375$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012376if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012380/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012381#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012382#if !HAVE_DECL_TZNAME
12383extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012384#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
Martin v. Löwis11437992002-04-12 09:54:03 +000012386int
12387main ()
12388{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 ;
12391 return 0;
12392}
12393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012395 ac_cv_var_tzname=yes
12396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399rm -f core conftest.err conftest.$ac_objext \
12400 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12403$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012404 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012408 fi
12409fi
12410
Matthias Kloseb9621712010-04-24 17:59:49 +000012411ac_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 +020012412if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
12414cat >>confdefs.h <<_ACEOF
12415#define HAVE_STRUCT_STAT_ST_RDEV 1
12416_ACEOF
12417
12418
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012419fi
12420
Matthias Kloseb9621712010-04-24 17:59:49 +000012421ac_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 +020012422if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424cat >>confdefs.h <<_ACEOF
12425#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12426_ACEOF
12427
12428
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012429fi
12430
Matthias Kloseb9621712010-04-24 17:59:49 +000012431ac_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 +020012432if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012433
12434cat >>confdefs.h <<_ACEOF
12435#define HAVE_STRUCT_STAT_ST_FLAGS 1
12436_ACEOF
12437
12438
12439fi
12440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441ac_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 +020012442if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012443
12444cat >>confdefs.h <<_ACEOF
12445#define HAVE_STRUCT_STAT_ST_GEN 1
12446_ACEOF
12447
12448
12449fi
12450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451ac_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 +020012452if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012453
12454cat >>confdefs.h <<_ACEOF
12455#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12456_ACEOF
12457
12458
12459fi
12460
Matthias Kloseb9621712010-04-24 17:59:49 +000012461ac_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 +020012462if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464cat >>confdefs.h <<_ACEOF
12465#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12466_ACEOF
12467
12468
Matthias Kloseb9621712010-04-24 17:59:49 +000012469$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012470
12471else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012473 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012474 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12475 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012476esac
12477
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012478fi
12479
Michael W. Hudson54241132001-12-07 15:38:26 +000012480
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Matthias Kloseb9621712010-04-24 17:59:49 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12483$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012484if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486else
Matthias Kloseb159a552010-04-25 21:00:44 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012490#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500 ac_cv_header_time_altzone=yes
12501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012506fi
12507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12509$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Matthias Kloseb9621712010-04-24 17:59:49 +000012512$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012513
12514fi
12515
Guido van Rossumda88dad1995-01-26 00:46:29 +000012516was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12518$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012520/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012521
12522#include <sys/types.h>
12523#include <sys/select.h>
12524#include <sys/time.h>
12525
Martin v. Löwis11437992002-04-12 09:54:03 +000012526int
12527main ()
12528{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529;
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 ;
12531 return 0;
12532}
12533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
12536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012538
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012539 was_it_defined=yes
12540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12544$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12547$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550else
Matthias Kloseb9621712010-04-24 17:59:49 +000012551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012552/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012553#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012554int
12555main ()
12556{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012557struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563 ac_cv_struct_addrinfo=yes
12564else
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12568fi
12569
Matthias Kloseb9621712010-04-24 17:59:49 +000012570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12571$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012575
12576fi
12577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12579$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012580if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012582else
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012584/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012585
12586# include <sys/types.h>
12587# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012588int
12589main ()
12590{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012591struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012592 ;
12593 return 0;
12594}
12595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597 ac_cv_struct_sockaddr_storage=yes
12598else
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12602fi
12603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12605$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012606if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
Matthias Kloseb9621712010-04-24 17:59:49 +000012608$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012609
12610fi
12611
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12615$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012616if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012618else
Matthias Kloseb9621712010-04-24 17:59:49 +000012619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012622int
12623main ()
12624{
12625static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012626test_array [0] = 0;
12627return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012628
12629 ;
12630 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012631}
Martin v. Löwis11437992002-04-12 09:54:03 +000012632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012634 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12641$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012642if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012643 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644
12645fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012646
Matthias Kloseb9621712010-04-24 17:59:49 +000012647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12648$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012649if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012651else
Matthias Kloseb9621712010-04-24 17:59:49 +000012652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654
Martin v. Löwis11437992002-04-12 09:54:03 +000012655int
12656main ()
12657{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012660 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012662 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664 char const *const *pcpcc;
12665 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666 /* NEC SVR4.0.2 mips cc rejects this. */
12667 struct point {int x, y;};
12668 static struct point const zero = {0,0};
12669 /* AIX XL C 1.02.0.0 rejects this.
12670 It does not let you subtract one const X* pointer from another in
12671 an arm of an if-expression whose if-part is not a constant
12672 expression */
12673 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012676 ++pcpcc;
12677 ppc = (char**) pcpcc;
12678 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012679 { /* SCO 3.2v4 cc rejects this sort of thing. */
12680 char tx;
12681 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012682 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012686 }
12687 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12688 int x[] = {25, 17};
12689 const int *foo = &x[0];
12690 ++foo;
12691 }
12692 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12693 typedef const int *iptr;
12694 iptr p = 0;
12695 ++p;
12696 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012697 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012698 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012699 struct s { int j; const int *ap[3]; } bx;
12700 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012701 }
12702 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12703 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012707#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ;
12710 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012711}
Martin v. Löwis11437992002-04-12 09:54:03 +000012712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012713if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714 ac_cv_c_const=yes
12715else
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12721$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012723
Matthias Kloseb9621712010-04-24 17:59:49 +000012724$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725
12726fi
12727
Michael W. Hudson54241132001-12-07 15:38:26 +000012728
Guido van Rossumda88dad1995-01-26 00:46:29 +000012729works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12731$as_echo_n "checking for working volatile... " >&6; }
12732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012733/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012734
Martin v. Löwis11437992002-04-12 09:54:03 +000012735int
12736main ()
12737{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012744 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012745else
Skip Montanaro6dead952003-09-25 14:50:04 +000012746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012748
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012749
Guido van Rossum627b2d71993-12-24 10:39:16 +000012750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12753$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012754
Guido van Rossumda88dad1995-01-26 00:46:29 +000012755works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12757$as_echo_n "checking for working signed char... " >&6; }
12758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012759/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012760
Martin v. Löwis11437992002-04-12 09:54:03 +000012761int
12762main ()
12763{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012765 ;
12766 return 0;
12767}
12768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012769if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012770 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012771else
Skip Montanaro6dead952003-09-25 14:50:04 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012774
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012775
Guido van Rossum7f43da71994-08-01 12:15:30 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12779$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012780
Guido van Rossumda88dad1995-01-26 00:46:29 +000012781have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12783$as_echo_n "checking for prototypes... " >&6; }
12784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012785/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012786int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012787int
12788main ()
12789{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ;
12792 return 0;
12793}
12794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Matthias Kloseb159a552010-04-25 21:00:44 +000012799 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +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: $have_prototypes" >&5
12803$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804
Guido van Rossumda88dad1995-01-26 00:46:29 +000012805works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12807$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012809/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012810
12811#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012812int foo(int x, ...) {
12813 va_list va;
12814 va_start(va, x);
12815 va_arg(va, int);
12816 va_arg(va, char *);
12817 va_arg(va, double);
12818 return 0;
12819}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012820
Martin v. Löwis11437992002-04-12 09:54:03 +000012821int
12822main ()
12823{
Guido van Rossum90eea071996-08-30 20:58:57 +000012824return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 ;
12826 return 0;
12827}
12828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012829if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012830
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012834 works=yes
12835
Guido van Rossum627b2d71993-12-24 10:39:16 +000012836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12839$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840
Martin v. Löwisd6320502004-08-12 13:45:08 +000012841# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12843$as_echo_n "checking for socketpair... " >&6; }
12844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012845/* end confdefs.h. */
12846
12847#include <sys/types.h>
12848#include <sys/socket.h>
12849
12850int
12851main ()
12852{
12853void *x=socketpair
12854 ;
12855 return 0;
12856}
12857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012858if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012861
Matthias Kloseb159a552010-04-25 21:00:44 +000012862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012863$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012864else
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012867
12868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012870
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012871# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12873$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012875/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012876#include <sys/types.h>
12877#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012878int
12879main ()
12880{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881struct sockaddr x;
12882x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012883 ;
12884 return 0;
12885}
12886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887if ac_fn_c_try_compile "$LINENO"; then :
12888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12889$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012892
12893else
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12895$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012896
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899
Guido van Rossumda88dad1995-01-26 00:46:29 +000012900va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12902$as_echo_n "checking whether va_list is an array... " >&6; }
12903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012904/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905
12906#ifdef HAVE_STDARG_PROTOTYPES
12907#include <stdarg.h>
12908#else
12909#include <varargs.h>
12910#endif
12911
Martin v. Löwis11437992002-04-12 09:54:03 +000012912int
12913main ()
12914{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 ;
12917 return 0;
12918}
12919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012920if ac_fn_c_try_compile "$LINENO"; then :
12921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012922else
Skip Montanaro6dead952003-09-25 14:50:04 +000012923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Matthias Kloseb9621712010-04-24 17:59:49 +000012925$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012926
Guido van Rossumda88dad1995-01-26 00:46:29 +000012927 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012928
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12932$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012934# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012935
12936
Matthias Kloseb9621712010-04-24 17:59:49 +000012937ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012938if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12943$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012944 OLD_CFLAGS=$CFLAGS
12945 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012947/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012948
12949# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Martin v. Löwis11437992002-04-12 09:54:03 +000012951int
12952main ()
12953{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012954
12955 char *name;
12956 struct hostent *he, *res;
12957 char buffer[2048];
12958 int buflen = 2048;
12959 int h_errnop;
12960
12961 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
12963 ;
12964 return 0;
12965}
12966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012970
Martin v. Löwis11437992002-04-12 09:54:03 +000012971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012973
Matthias Kloseb9621712010-04-24 17:59:49 +000012974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12975$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012977else
Skip Montanaro6dead952003-09-25 14:50:04 +000012978
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12980$as_echo "no" >&6; }
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12982$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012984/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012985
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012986# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988int
12989main ()
12990{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012991
12992 char *name;
12993 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012994 char buffer[2048];
12995 int buflen = 2048;
12996 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012997
Matthias Kloseb159a552010-04-25 21:00:44 +000012998 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012999
13000 ;
13001 return 0;
13002}
13003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013005
Matthias Kloseb9621712010-04-24 17:59:49 +000013006 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013007
Martin v. Löwis11437992002-04-12 09:54:03 +000013008
Matthias Kloseb159a552010-04-25 21:00:44 +000013009$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13012$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013013
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013014else
Skip Montanaro6dead952003-09-25 14:50:04 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13017$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13019$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13021/* end confdefs.h. */
13022
13023# include <netdb.h>
13024
13025int
13026main ()
13027{
13028
13029 char *name;
13030 struct hostent *he;
13031 struct hostent_data data;
13032
13033 (void) gethostbyname_r(name, he, &data);
13034
13035 ;
13036 return 0;
13037}
13038_ACEOF
13039if ac_fn_c_try_compile "$LINENO"; then :
13040
13041 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13042
13043
13044$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13045
13046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13047$as_echo "yes" >&6; }
13048
13049else
13050
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13052$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013062 CFLAGS=$OLD_CFLAGS
13063
13064else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 for ac_func in gethostbyname
13067do :
13068 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013069if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013071#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013072_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013073
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013074fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013075done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013076
Michael W. Hudson54241132001-12-07 15:38:26 +000013077
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013078fi
13079
Michael W. Hudson54241132001-12-07 15:38:26 +000013080
13081
13082
13083
13084
13085
Guido van Rossum627b2d71993-12-24 10:39:16 +000013086# checks for system services
13087# (none yet)
13088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013090ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013091if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013092
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13095$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013096if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013098else
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013100LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013104/* Override any GCC internal prototype to avoid an error.
13105 Use char because int might match the return type of a GCC
13106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013107#ifdef __cplusplus
13108extern "C"
13109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013110char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013111int
13112main ()
13113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 ;
13116 return 0;
13117}
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013120 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013121else
Matthias Kloseb9621712010-04-24 17:59:49 +000013122 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013124rm -f core conftest.err conftest.$ac_objext \
13125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13129$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013130if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013131 cat >>confdefs.h <<_ACEOF
13132#define HAVE_LIBIEEE 1
13133_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013134
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013135 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136
Guido van Rossum627b2d71993-12-24 10:39:16 +000013137fi
13138
Michael W. Hudson54241132001-12-07 15:38:26 +000013139
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013140fi
13141
Michael W. Hudson54241132001-12-07 15:38:26 +000013142
Guido van Rossum7f253911997-05-09 02:42:48 +000013143# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13145$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013146
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013148if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013149 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013150if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013151then
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13156$as_echo "yes" >&6; }
13157else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13158$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013159fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013160else
Matthias Kloseb9621712010-04-24 17:59:49 +000013161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13162$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013163fi
13164
Guido van Rossum7f253911997-05-09 02:42:48 +000013165
Guido van Rossum7f43da71994-08-01 12:15:30 +000013166# check for --with-libm=...
13167
Guido van Rossum563e7081996-09-10 18:20:48 +000013168case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013169Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013170*) LIBM=-lm
13171esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13173$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013176if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013177 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013178if test "$withval" = no
13179then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13181$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013182elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013183then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13185$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013186else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013187fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013188else
Matthias Kloseb9621712010-04-24 17:59:49 +000013189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13190$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191fi
13192
Guido van Rossum7f43da71994-08-01 12:15:30 +000013193
13194# check for --with-libc=...
13195
Matthias Kloseb9621712010-04-24 17:59:49 +000013196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13197$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013199# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013202if test "$withval" = no
13203then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13205$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013206elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013207then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13209$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013210else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013211fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13214$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215fi
13216
Guido van Rossum7f43da71994-08-01 12:15:30 +000013217
Stefan Krah1919b7e2012-03-21 18:25:23 +010013218# **************************************
13219# * Check for gcc x64 inline assembler *
13220# **************************************
13221
13222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13223$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225/* end confdefs.h. */
13226
13227int
13228main ()
13229{
13230
13231 __asm__ __volatile__ ("movq %rcx, %rax");
13232
13233 ;
13234 return 0;
13235}
13236_ACEOF
13237if ac_fn_c_try_compile "$LINENO"; then :
13238 have_gcc_asm_for_x64=yes
13239else
13240 have_gcc_asm_for_x64=no
13241fi
13242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13244$as_echo "$have_gcc_asm_for_x64" >&6; }
13245if test "$have_gcc_asm_for_x64" = yes
13246then
13247
13248$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13249
13250fi
13251
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013252# **************************************************
13253# * Check for various properties of floating point *
13254# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13257$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013258if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013260else
13261
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013263 ac_cv_little_endian_double=no
13264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013266/* end confdefs.h. */
13267
13268#include <string.h>
13269int main() {
13270 double x = 9006104071832581.0;
13271 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13272 return 0;
13273 else
13274 return 1;
13275}
13276
13277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013278if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013279 ac_cv_little_endian_double=yes
13280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13284 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013285fi
13286
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013287fi
13288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13290$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013291if test "$ac_cv_little_endian_double" = yes
13292then
13293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013295
13296fi
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13299$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013300if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013302else
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013305 ac_cv_big_endian_double=no
13306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013308/* end confdefs.h. */
13309
13310#include <string.h>
13311int main() {
13312 double x = 9006104071832581.0;
13313 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13314 return 0;
13315 else
13316 return 1;
13317}
13318
13319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013320if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013321 ac_cv_big_endian_double=yes
13322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13326 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013327fi
13328
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013329fi
13330
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13332$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013333if test "$ac_cv_big_endian_double" = yes
13334then
13335
Matthias Kloseb9621712010-04-24 17:59:49 +000013336$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013337
13338fi
13339
13340# Some ARM platforms use a mixed-endian representation for doubles.
13341# While Python doesn't currently have full support for these platforms
13342# (see e.g., issue 1762561), we can at least make sure that float <-> string
13343# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13345$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013346if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013348else
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013351 ac_cv_mixed_endian_double=no
13352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013354/* end confdefs.h. */
13355
13356#include <string.h>
13357int main() {
13358 double x = 9006104071832581.0;
13359 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13360 return 0;
13361 else
13362 return 1;
13363}
13364
13365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013366if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013367 ac_cv_mixed_endian_double=yes
13368else
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013373fi
13374
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013375fi
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13378$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013379if test "$ac_cv_mixed_endian_double" = yes
13380then
13381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013383
13384fi
13385
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013386# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013387# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013388# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013389# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013390# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013391# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013392
13393# This inline assembler syntax may also work for suncc and icc,
13394# so we try it on all platforms.
13395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13397$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013399/* end confdefs.h. */
13400
13401int
13402main ()
13403{
13404
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013405 unsigned short cw;
13406 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13407 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013408
13409 ;
13410 return 0;
13411}
13412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013413if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013414 have_gcc_asm_for_x87=yes
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013417fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13420$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013421if test "$have_gcc_asm_for_x87" = yes
13422then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013423
Matthias Kloseb9621712010-04-24 17:59:49 +000013424$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013425
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013426fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13429$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13431/* end confdefs.h. */
13432
13433int
13434main ()
13435{
13436
13437 unsigned int fpcr;
13438 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13439 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13440
13441 ;
13442 return 0;
13443}
13444_ACEOF
13445if ac_fn_c_try_compile "$LINENO"; then :
13446 have_gcc_asm_for_mc68881=yes
13447else
13448 have_gcc_asm_for_mc68881=no
13449fi
13450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13452$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13453if test "$have_gcc_asm_for_mc68881" = yes
13454then
13455
13456$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13457
13458fi
13459
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013460# Detect whether system arithmetic is subject to x87-style double
13461# rounding issues. The result of this test has little meaning on non
13462# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13463# mode is round-to-nearest and double rounding issues are present, and
13464# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13466$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013467# $BASECFLAGS may affect the result
13468ac_save_cc="$CC"
13469CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013471 ac_cv_x87_double_rounding=no
13472else
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013474/* end confdefs.h. */
13475
13476#include <stdlib.h>
13477#include <math.h>
13478int main() {
13479 volatile double x, y, z;
13480 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13481 x = 0.99999999999999989; /* 1-2**-53 */
13482 y = 1./x;
13483 if (y != 1.)
13484 exit(0);
13485 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13486 x = 1e16;
13487 y = 2.99999;
13488 z = x + y;
13489 if (z != 1e16+4.)
13490 exit(0);
13491 /* both tests show evidence of double rounding */
13492 exit(1);
13493}
13494
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013497 ac_cv_x87_double_rounding=no
13498else
Matthias Kloseb9621712010-04-24 17:59:49 +000013499 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013500fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13502 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013503fi
13504
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013505CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13507$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013508if test "$ac_cv_x87_double_rounding" = yes
13509then
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013512
13513fi
13514
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013515# ************************************
13516# * Check for mathematical functions *
13517# ************************************
13518
13519LIBS_SAVE=$LIBS
13520LIBS="$LIBS $LIBM"
13521
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013522for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13523do :
13524 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13525ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013526if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013527 cat >>confdefs.h <<_ACEOF
13528#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13529_ACEOF
13530
13531fi
13532done
13533
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013534for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013535do :
13536 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13537ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013538if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013539 cat >>confdefs.h <<_ACEOF
13540#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13541_ACEOF
13542
13543fi
13544done
13545
13546ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13547"
Victor Stinnere0be4232011-10-25 13:06:09 +020013548if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013549 ac_have_decl=1
13550else
13551 ac_have_decl=0
13552fi
13553
13554cat >>confdefs.h <<_ACEOF
13555#define HAVE_DECL_ISINF $ac_have_decl
13556_ACEOF
13557ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13558"
Victor Stinnere0be4232011-10-25 13:06:09 +020013559if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013560 ac_have_decl=1
13561else
13562 ac_have_decl=0
13563fi
13564
13565cat >>confdefs.h <<_ACEOF
13566#define HAVE_DECL_ISNAN $ac_have_decl
13567_ACEOF
13568ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13569"
Victor Stinnere0be4232011-10-25 13:06:09 +020013570if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013571 ac_have_decl=1
13572else
13573 ac_have_decl=0
13574fi
13575
13576cat >>confdefs.h <<_ACEOF
13577#define HAVE_DECL_ISFINITE $ac_have_decl
13578_ACEOF
13579
13580
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013581# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13582# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13584$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013585if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013587else
13588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013590 ac_cv_tanh_preserves_zero_sign=no
13591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013593/* end confdefs.h. */
13594
13595#include <math.h>
13596#include <stdlib.h>
13597int main() {
13598 /* return 0 if either negative zeros don't exist
13599 on this platform or if negative zeros exist
13600 and tanh(-0.) == -0. */
13601 if (atan2(0., -1.) == atan2(-0., -1.) ||
13602 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13603 else exit(1);
13604}
13605
13606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013607if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013608 ac_cv_tanh_preserves_zero_sign=yes
13609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013612rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13613 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013614fi
13615
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013616fi
13617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13619$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013620if test "$ac_cv_tanh_preserves_zero_sign" = yes
13621then
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013624
13625fi
13626
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013627if test "$ac_cv_func_log1p" = yes
13628then
13629 # On some versions of AIX, log1p(-0.) returns 0. instead of
13630 # -0. See issue #9920.
13631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13632$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013633 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013634 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013635else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013636
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013637 if test "$cross_compiling" = yes; then :
13638 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013639else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013642
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013643 #include <math.h>
13644 #include <stdlib.h>
13645 int main() {
13646 /* Fail if the signs of log1p(-0.) and -0. can be
13647 distinguished. */
13648 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13649 return 0;
13650 else
13651 return 1;
13652 }
13653
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013654_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013655if ac_fn_c_try_run "$LINENO"; then :
13656 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013657else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013658 ac_cv_log1p_drops_zero_sign=yes
13659fi
13660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013662fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013663
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013664fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013665
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13667$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13668fi
13669if test "$ac_cv_log1p_drops_zero_sign" = yes
13670then
13671
13672$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13673
13674fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013675
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013676LIBS=$LIBS_SAVE
13677
Mark Dickinsona614f042009-11-28 12:48:43 +000013678# For multiprocessing module, check that sem_open
13679# actually works. For FreeBSD versions <= 7.2,
13680# the kernel module that provides POSIX semaphores
13681# isn't loaded by default, so an attempt to call
13682# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13684$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013685if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013689 ac_cv_posix_semaphores_enabled=yes
13690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013692/* end confdefs.h. */
13693
13694#include <unistd.h>
13695#include <fcntl.h>
13696#include <stdio.h>
13697#include <semaphore.h>
13698#include <sys/stat.h>
13699
13700int main(void) {
13701 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13702 if (a == SEM_FAILED) {
13703 perror("sem_open");
13704 return 1;
13705 }
13706 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013707 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013708 return 0;
13709}
13710
13711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013713 ac_cv_posix_semaphores_enabled=yes
13714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013719fi
13720
13721
Mark Dickinsona614f042009-11-28 12:48:43 +000013722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13725$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013726if test $ac_cv_posix_semaphores_enabled = no
13727then
13728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013730
13731fi
13732
Mark Dickinson10683072009-04-18 21:18:19 +000013733# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13735$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013738else
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013740 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013743/* end confdefs.h. */
13744
13745#include <unistd.h>
13746#include <fcntl.h>
13747#include <stdio.h>
13748#include <semaphore.h>
13749#include <sys/stat.h>
13750
13751int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013752 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013753 int count;
13754 int res;
13755 if(a==SEM_FAILED){
13756 perror("sem_open");
13757 return 1;
13758
13759 }
13760 res = sem_getvalue(a, &count);
13761 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013762 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013763 return res==-1 ? 1 : 0;
13764}
13765
Mark Dickinson10683072009-04-18 21:18:19 +000013766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013768 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013774fi
13775
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013776
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013777fi
13778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13780$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013781if test $ac_cv_broken_sem_getvalue = yes
13782then
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013785
13786fi
13787
Mark Dickinsonbd792642009-03-18 20:06:12 +000013788# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13790$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013791# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013792if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013793 enableval=$enable_big_digits; case $enable_big_digits in
13794yes)
13795 enable_big_digits=30 ;;
13796no)
13797 enable_big_digits=15 ;;
1379815|30)
13799 ;;
13800*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013801 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 +000013802esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13804$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013805
13806cat >>confdefs.h <<_ACEOF
13807#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13808_ACEOF
13809
13810
13811else
Matthias Kloseb9621712010-04-24 17:59:49 +000013812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13813$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013814fi
13815
13816
Guido van Rossumef2255b2000-03-10 22:30:29 +000013817# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013818ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013819if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
13821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013823
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013824 wchar_h="yes"
13825
Guido van Rossumef2255b2000-03-10 22:30:29 +000013826else
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013828
13829fi
13830
Michael W. Hudson54241132001-12-07 15:38:26 +000013831
Martin v. Löwis11437992002-04-12 09:54:03 +000013832
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013833# determine wchar_t size
13834if test "$wchar_h" = yes
13835then
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13839# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13841$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013842if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013844else
Matthias Kloseb9621712010-04-24 17:59:49 +000013845 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13846"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Martin v. Löwis11437992002-04-12 09:54:03 +000013848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 if test "$ac_cv_type_wchar_t" = yes; then
13850 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013852as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013853See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854 else
13855 ac_cv_sizeof_wchar_t=0
13856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013858
Martin v. Löwis11437992002-04-12 09:54:03 +000013859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13861$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862
13863
13864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013866#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013867_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013868
Michael W. Hudson54241132001-12-07 15:38:26 +000013869
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013870fi
13871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13873$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013874have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013876/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013877
13878#include <tcl.h>
13879#if TCL_UTF_MAX != 6
13880# error "NOT UCS4_TCL"
13881#endif
13882int
13883main ()
13884{
13885
13886 ;
13887 return 0;
13888}
13889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013890if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013891
13892
Matthias Kloseb9621712010-04-24 17:59:49 +000013893$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013894
13895 have_ucs4_tcl=yes
13896
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13900$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013901
Skip Montanaro6dead952003-09-25 14:50:04 +000013902# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013903if test "$wchar_h" = yes
13904then
13905 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13907$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013910else
13911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013913 ac_cv_wchar_t_signed=yes
13914else
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013916/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013917
13918 #include <wchar.h>
13919 int main()
13920 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013921 /* Success: exit code 0 */
13922 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013923 }
13924
13925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013927 ac_cv_wchar_t_signed=yes
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013933fi
13934
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013935fi
13936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13938$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939fi
13940
Georg Brandl52d168a2008-01-07 18:10:24 +000013941# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013942if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013943 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013944then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013945 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013948
Georg Brandl52d168a2008-01-07 18:10:24 +000013949else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013950 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013951fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13953$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013954
13955# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13957$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013960else
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 ac_cv_c_bigendian=unknown
13962 # See if we're dealing with a universal compiler.
13963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13964/* end confdefs.h. */
13965#ifndef __APPLE_CC__
13966 not a universal capable compiler
13967 #endif
13968 typedef int dummy;
13969
Skip Montanaro6dead952003-09-25 14:50:04 +000013970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013971if ac_fn_c_try_compile "$LINENO"; then :
13972
13973 # Check for potential -arch flags. It is not universal unless
13974 # there are at least two -arch flags with different values.
13975 ac_arch=
13976 ac_prev=
13977 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13978 if test -n "$ac_prev"; then
13979 case $ac_word in
13980 i?86 | x86_64 | ppc | ppc64)
13981 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13982 ac_arch=$ac_word
13983 else
13984 ac_cv_c_bigendian=universal
13985 break
13986 fi
13987 ;;
13988 esac
13989 ac_prev=
13990 elif test "x$ac_word" = "x-arch"; then
13991 ac_prev=arch
13992 fi
13993 done
13994fi
13995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13996 if test $ac_cv_c_bigendian = unknown; then
13997 # See if sys/param.h defines the BYTE_ORDER macro.
13998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014000#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014002
Martin v. Löwis11437992002-04-12 09:54:03 +000014003int
14004main ()
14005{
Matthias Kloseb9621712010-04-24 17:59:49 +000014006#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14007 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14008 && LITTLE_ENDIAN)
14009 bogus endian macros
14010 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
14012 ;
14013 return 0;
14014}
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014017 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014019/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014020#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014021 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014022
Martin v. Löwis11437992002-04-12 09:54:03 +000014023int
14024main ()
14025{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014026#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014027 not big endian
14028 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
14030 ;
14031 return 0;
14032}
14033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014034if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014035 ac_cv_c_bigendian=yes
14036else
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014040fi
14041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14042 fi
14043 if test $ac_cv_c_bigendian = unknown; then
14044 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014046/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014047#include <limits.h>
14048
Martin v. Löwis11437992002-04-12 09:54:03 +000014049int
14050main ()
14051{
Matthias Kloseb9621712010-04-24 17:59:49 +000014052#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14053 bogus endian macros
14054 #endif
14055
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 ;
14057 return 0;
14058}
14059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014060if ac_fn_c_try_compile "$LINENO"; then :
14061 # It does; now see whether it defined to _BIG_ENDIAN or not.
14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14063/* end confdefs.h. */
14064#include <limits.h>
14065
14066int
14067main ()
14068{
14069#ifndef _BIG_ENDIAN
14070 not big endian
14071 #endif
14072
14073 ;
14074 return 0;
14075}
14076_ACEOF
14077if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14083fi
14084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14085 fi
14086 if test $ac_cv_c_bigendian = unknown; then
14087 # Compile a test program.
14088 if test "$cross_compiling" = yes; then :
14089 # Try to guess by grepping values from an object file.
14090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14091/* end confdefs.h. */
14092short int ascii_mm[] =
14093 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14094 short int ascii_ii[] =
14095 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14096 int use_ascii (int i) {
14097 return ascii_mm[i] + ascii_ii[i];
14098 }
14099 short int ebcdic_ii[] =
14100 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14101 short int ebcdic_mm[] =
14102 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14103 int use_ebcdic (int i) {
14104 return ebcdic_mm[i] + ebcdic_ii[i];
14105 }
14106 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108int
14109main ()
14110{
14111return use_ascii (foo) == use_ebcdic (foo);
14112 ;
14113 return 0;
14114}
14115_ACEOF
14116if ac_fn_c_try_compile "$LINENO"; then :
14117 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14118 ac_cv_c_bigendian=yes
14119 fi
14120 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14121 if test "$ac_cv_c_bigendian" = unknown; then
14122 ac_cv_c_bigendian=no
14123 else
14124 # finding both strings is unlikely to happen, but who knows?
14125 ac_cv_c_bigendian=unknown
14126 fi
14127 fi
14128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014130else
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014132/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014133$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014134int
14135main ()
14136{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 /* Are we little or big endian? From Harbison&Steele. */
14139 union
14140 {
14141 long int l;
14142 char c[sizeof (long int)];
14143 } u;
14144 u.l = 1;
14145 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146
14147 ;
14148 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014149}
Martin v. Löwis11437992002-04-12 09:54:03 +000014150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014152 ac_cv_c_bigendian=no
14153else
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14157 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14163$as_echo "$ac_cv_c_bigendian" >&6; }
14164 case $ac_cv_c_bigendian in #(
14165 yes)
14166 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14167;; #(
14168 no)
14169 ;; #(
14170 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014171
Matthias Kloseb9621712010-04-24 17:59:49 +000014172$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014173
Matthias Kloseb9621712010-04-24 17:59:49 +000014174 ;; #(
14175 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014176 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014177 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014179
Michael W. Hudson54241132001-12-07 15:38:26 +000014180
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014181# ABI version string for Python extension modules. This appears between the
14182# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14183# from the following attributes which affect the ABI of this Python build (in
14184# this order):
14185#
14186# * The Python implementation (always 'cpython-' for us)
14187# * The major and minor version numbers
14188# * --with-pydebug (adds a 'd')
14189# * --with-pymalloc (adds a 'm')
14190# * --with-wide-unicode (adds a 'u')
14191#
14192# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014193# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14194# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014195
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14197$as_echo_n "checking ABIFLAGS... " >&6; }
14198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14199$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14201$as_echo_n "checking SOABI... " >&6; }
Antoine Pitrou5bd7bf52015-03-08 20:43:10 +010014202
14203case $ac_sys_system in
14204 Linux*|GNU*)
14205 BITNESS_SUFFIX=-$(($ac_cv_sizeof_void_p * 8))b;;
14206 *)
14207 BITNESS_SUFFIX=;;
14208esac
14209SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${BITNESS_SUFFIX}
14210
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14212$as_echo "$SOABI" >&6; }
14213
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014214
14215case $ac_sys_system in
14216 Linux*|GNU*)
14217 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14218 *)
14219 EXT_SUFFIX=${SHLIB_SUFFIX};;
14220esac
14221
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14223$as_echo_n "checking LDVERSION... " >&6; }
14224LDVERSION='$(VERSION)$(ABIFLAGS)'
14225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14226$as_echo "$LDVERSION" >&6; }
14227
doko@python.org87421192013-01-26 11:39:31 +010014228
14229LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14230
14231
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014232# Check whether right shifting a negative integer extends the sign bit
14233# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14235$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014236if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014241 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014242else
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014245
14246int main()
14247{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014248 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014249}
14250
Martin v. Löwis11437992002-04-12 09:54:03 +000014251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014252if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014253 ac_cv_rshift_extends_sign=yes
14254else
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014257rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14258 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014259fi
14260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014261fi
14262
Matthias Kloseb9621712010-04-24 17:59:49 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14264$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014265if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014266then
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
Matthias Kloseb9621712010-04-24 17:59:49 +000014268$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014269
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014270fi
14271
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014272# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14274$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014275if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014277else
Martin v. Löwis11437992002-04-12 09:54:03 +000014278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014280/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014281#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014282int
14283main ()
14284{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014285
14286 FILE *f = fopen("/dev/null", "r");
14287 flockfile(f);
14288 getc_unlocked(f);
14289 funlockfile(f);
14290
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 ;
14292 return 0;
14293}
14294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014295if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014296 ac_cv_have_getc_unlocked=yes
14297else
Matthias Kloseb9621712010-04-24 17:59:49 +000014298 ac_cv_have_getc_unlocked=no
14299fi
14300rm -f core conftest.err conftest.$ac_objext \
14301 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14305$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014306if test "$ac_cv_have_getc_unlocked" = yes
14307then
Martin v. Löwis11437992002-04-12 09:54:03 +000014308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014310
14311fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014312
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014313# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014314# save the value of LIBS so we don't actually link Python with readline
14315LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014316
Gregory P. Smith18820942008-09-07 06:24:49 +000014317# On some systems we need to link readline to a termcap compatible
14318# library. NOTE: Keep the precedence of listed libraries synchronised
14319# with setup.py.
14320py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14322$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014323for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014324 if test -z "$py_libtermcap"; then
14325 READLINE_LIBS="-lreadline"
14326 else
14327 READLINE_LIBS="-lreadline -l$py_libtermcap"
14328 fi
14329 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014331/* end confdefs.h. */
14332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014333/* Override any GCC internal prototype to avoid an error.
14334 Use char because int might match the return type of a GCC
14335 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014336#ifdef __cplusplus
14337extern "C"
14338#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014339char readline ();
14340int
14341main ()
14342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014344 ;
14345 return 0;
14346}
14347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014348if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014349 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014350fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014351rm -f core conftest.err conftest.$ac_objext \
14352 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014353 if test $py_cv_lib_readline = yes; then
14354 break
14355 fi
14356done
14357# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14358#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014359if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14361$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14364$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014365
Matthias Kloseb9621712010-04-24 17:59:49 +000014366$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014367
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014368fi
14369
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014370# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14372$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014373if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014375else
14376 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014377LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014379/* end confdefs.h. */
14380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381/* Override any GCC internal prototype to avoid an error.
14382 Use char because int might match the return type of a GCC
14383 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014384#ifdef __cplusplus
14385extern "C"
14386#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014387char rl_callback_handler_install ();
14388int
14389main ()
14390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014392 ;
14393 return 0;
14394}
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014397 ac_cv_lib_readline_rl_callback_handler_install=yes
14398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014401rm -f core conftest.err conftest.$ac_objext \
14402 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014403LIBS=$ac_check_lib_save_LIBS
14404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14406$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014407if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014408
Matthias Kloseb9621712010-04-24 17:59:49 +000014409$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014410
14411fi
14412
14413
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014414# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014416/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014417#include <readline/readline.h>
14418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014419if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014420 have_readline=yes
14421else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014422 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014423
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014424fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014425rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014426if test $have_readline = yes
14427then
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014429/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014430#include <readline/readline.h>
14431
14432_ACEOF
14433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014437
14438fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014439rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014440
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014442/* end confdefs.h. */
14443#include <readline/readline.h>
14444
14445_ACEOF
14446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014447 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014448
Matthias Kloseb9621712010-04-24 17:59:49 +000014449$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014450
14451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014452rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014453
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014454fi
14455
Martin v. Löwis0daad592001-09-30 21:09:59 +000014456# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14458$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014461else
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014463LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467/* Override any GCC internal prototype to avoid an error.
14468 Use char because int might match the return type of a GCC
14469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014470#ifdef __cplusplus
14471extern "C"
14472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014473char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014474int
14475main ()
14476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014477return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 ;
14479 return 0;
14480}
14481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014483 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014484else
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014487rm -f core conftest.err conftest.$ac_objext \
14488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014489LIBS=$ac_check_lib_save_LIBS
14490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14492$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014493if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014496
Martin v. Löwis0daad592001-09-30 21:09:59 +000014497fi
14498
Michael W. Hudson54241132001-12-07 15:38:26 +000014499
Thomas Wouters89d996e2007-09-08 17:39:28 +000014500# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14502$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014503if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014504 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014505else
14506 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014507LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014509/* end confdefs.h. */
14510
14511/* Override any GCC internal prototype to avoid an error.
14512 Use char because int might match the return type of a GCC
14513 builtin and then its argument prototype would still apply. */
14514#ifdef __cplusplus
14515extern "C"
14516#endif
14517char rl_completion_display_matches_hook ();
14518int
14519main ()
14520{
14521return rl_completion_display_matches_hook ();
14522 ;
14523 return 0;
14524}
14525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014526if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014527 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14528else
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014531rm -f core conftest.err conftest.$ac_objext \
14532 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014533LIBS=$ac_check_lib_save_LIBS
14534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14536$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014537if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014538
Matthias Kloseb9621712010-04-24 17:59:49 +000014539$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014540
14541fi
14542
14543
Martin v. Löwis0daad592001-09-30 21:09:59 +000014544# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14546$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014547if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014549else
Martin v. Löwis11437992002-04-12 09:54:03 +000014550 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014551LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014555/* Override any GCC internal prototype to avoid an error.
14556 Use char because int might match the return type of a GCC
14557 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014558#ifdef __cplusplus
14559extern "C"
14560#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014561char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014562int
14563main ()
14564{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014565return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 ;
14567 return 0;
14568}
14569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014575rm -f core conftest.err conftest.$ac_objext \
14576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014577LIBS=$ac_check_lib_save_LIBS
14578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14580$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014581if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014584
Guido van Rossum353ae582001-07-10 16:45:32 +000014585fi
14586
Jack Jansendd19cf82001-12-06 22:36:17 +000014587
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014588# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014590/* end confdefs.h. */
14591#include <readline/readline.h>
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014594 have_readline=yes
14595else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014596 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014597
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014598fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014599rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014600if test $have_readline = yes
14601then
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014603/* end confdefs.h. */
14604#include <readline/readline.h>
14605
14606_ACEOF
14607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014608 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014611
14612fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014613rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014614
14615fi
14616
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14618$as_echo_n "checking for append_history in -lreadline... " >&6; }
14619if ${ac_cv_lib_readline_append_history+:} false; then :
14620 $as_echo_n "(cached) " >&6
14621else
14622 ac_check_lib_save_LIBS=$LIBS
14623LIBS="-lreadline $READLINE_LIBS $LIBS"
14624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14625/* end confdefs.h. */
14626
14627/* Override any GCC internal prototype to avoid an error.
14628 Use char because int might match the return type of a GCC
14629 builtin and then its argument prototype would still apply. */
14630#ifdef __cplusplus
14631extern "C"
14632#endif
14633char append_history ();
14634int
14635main ()
14636{
14637return append_history ();
14638 ;
14639 return 0;
14640}
14641_ACEOF
14642if ac_fn_c_try_link "$LINENO"; then :
14643 ac_cv_lib_readline_append_history=yes
14644else
14645 ac_cv_lib_readline_append_history=no
14646fi
14647rm -f core conftest.err conftest.$ac_objext \
14648 conftest$ac_exeext conftest.$ac_ext
14649LIBS=$ac_check_lib_save_LIBS
14650fi
14651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14652$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14653if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14654
14655$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14656
14657fi
14658
14659
Martin v. Löwis82bca632006-02-10 20:49:30 +000014660# End of readline checks: restore LIBS
14661LIBS=$LIBS_no_readline
14662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14664$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014665if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014667else
Martin v. Löwis11437992002-04-12 09:54:03 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014670 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014671else
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014673/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014674
14675int main()
14676{
14677 int val1 = nice(1);
14678 if (val1 != -1 && val1 == nice(2))
14679 exit(0);
14680 exit(1);
14681}
14682
Martin v. Löwis11437992002-04-12 09:54:03 +000014683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014685 ac_cv_broken_nice=yes
14686else
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14690 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014691fi
14692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014693fi
14694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14696$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014697if test "$ac_cv_broken_nice" = yes
14698then
Martin v. Löwis11437992002-04-12 09:54:03 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014701
14702fi
14703
Matthias Kloseb9621712010-04-24 17:59:49 +000014704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14705$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014706if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014708else
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014710 ac_cv_broken_poll=no
14711else
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014713/* end confdefs.h. */
14714
14715#include <poll.h>
14716
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014717int main()
14718{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014719 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014720 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014721
14722 close (42);
14723
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014724 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014725 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014726 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014727 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014728 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014729 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014730 return 1;
14731}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014732
14733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014734if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014735 ac_cv_broken_poll=yes
14736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14740 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014743fi
14744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14746$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014747if test "$ac_cv_broken_poll" = yes
14748then
14749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014751
14752fi
14753
Brett Cannon43802422005-02-10 20:48:03 +000014754# 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 +000014755# (which is not required by ISO C or UNIX spec) and/or if we support
14756# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014757ac_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 +000014758#include <$ac_cv_struct_tm>
14759
Matthias Kloseb9621712010-04-24 17:59:49 +000014760"
Victor Stinnere0be4232011-10-25 13:06:09 +020014761if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014762
14763cat >>confdefs.h <<_ACEOF
14764#define HAVE_STRUCT_TM_TM_ZONE 1
14765_ACEOF
14766
14767
14768fi
14769
14770if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014773
14774else
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14776"
Victor Stinnere0be4232011-10-25 13:06:09 +020014777if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014779else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014781fi
14782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014784#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014785_ACEOF
14786
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14788$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014789if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014793/* end confdefs.h. */
14794#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795#if !HAVE_DECL_TZNAME
14796extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014797#endif
14798
14799int
14800main ()
14801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014802return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014803 ;
14804 return 0;
14805}
14806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014807if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014808 ac_cv_var_tzname=yes
14809else
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014812rm -f core conftest.err conftest.$ac_objext \
14813 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14816$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014817 if test $ac_cv_var_tzname = yes; then
14818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014820
14821 fi
14822fi
14823
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014824
Martin v. Löwis1d459062005-03-14 21:23:33 +000014825# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14827$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014828if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014830else
14831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014833 ac_cv_working_tzset=no
14834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014836/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014837
14838#include <stdlib.h>
14839#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014840#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014841
14842#if HAVE_TZNAME
14843extern char *tzname[];
14844#endif
14845
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014846int main()
14847{
Brett Cannon18367812003-09-19 00:59:16 +000014848 /* Note that we need to ensure that not only does tzset(3)
14849 do 'something' with localtime, but it works as documented
14850 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014851 This includes making sure that tzname is set properly if
14852 tm->tm_zone does not exist since it is the alternative way
14853 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014854
14855 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014856 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014857 */
14858
Martin v. Löwis1d459062005-03-14 21:23:33 +000014859 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014860 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14861
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014862 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014863 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014864 if (localtime(&groundhogday)->tm_hour != 0)
14865 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014866#if HAVE_TZNAME
14867 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14868 if (strcmp(tzname[0], "UTC") ||
14869 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14870 exit(1);
14871#endif
Brett Cannon18367812003-09-19 00:59:16 +000014872
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014873 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014874 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014875 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014876 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014877#if HAVE_TZNAME
14878 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14879 exit(1);
14880#endif
Brett Cannon18367812003-09-19 00:59:16 +000014881
14882 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14883 tzset();
14884 if (localtime(&groundhogday)->tm_hour != 11)
14885 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014886#if HAVE_TZNAME
14887 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14888 exit(1);
14889#endif
14890
14891#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014892 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14893 exit(1);
14894 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14895 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014896#endif
Brett Cannon18367812003-09-19 00:59:16 +000014897
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014898 exit(0);
14899}
14900
14901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014902if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014903 ac_cv_working_tzset=yes
14904else
Matthias Kloseb9621712010-04-24 17:59:49 +000014905 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014909fi
14910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911fi
14912
Matthias Kloseb9621712010-04-24 17:59:49 +000014913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14914$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014915if test "$ac_cv_working_tzset" = yes
14916then
14917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014919
14920fi
14921
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014922# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14924$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014925if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014929/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014930#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014931int
14932main ()
14933{
14934
14935struct stat st;
14936st.st_mtim.tv_nsec = 1;
14937
14938 ;
14939 return 0;
14940}
14941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014943 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014944else
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14948fi
14949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14951$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014952if test "$ac_cv_stat_tv_nsec" = yes
14953then
14954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014956
14957fi
14958
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014959# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14961$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014962if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014964else
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014966/* end confdefs.h. */
14967#include <sys/stat.h>
14968int
14969main ()
14970{
14971
14972struct stat st;
14973st.st_mtimespec.tv_nsec = 1;
14974
14975 ;
14976 return 0;
14977}
14978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014980 ac_cv_stat_tv_nsec2=yes
14981else
Matthias Kloseb9621712010-04-24 17:59:49 +000014982 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14985fi
14986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14988$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014989if test "$ac_cv_stat_tv_nsec2" = yes
14990then
14991
Matthias Kloseb9621712010-04-24 17:59:49 +000014992$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014993
14994fi
14995
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014996# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014997ac_save_cppflags="$CPPFLAGS"
14998CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014999
15000for ac_header in curses.h ncurses.h
15001do :
15002 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15003ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15004if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15005 cat >>confdefs.h <<_ACEOF
15006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15007_ACEOF
15008
15009fi
15010
15011done
15012
15013
15014# On Solaris, term.h requires curses.h
15015for ac_header in term.h
15016do :
15017 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15018#ifdef HAVE_CURSES_H
15019#include <curses.h>
15020#endif
15021
15022"
15023if test "x$ac_cv_header_term_h" = xyes; then :
15024 cat >>confdefs.h <<_ACEOF
15025#define HAVE_TERM_H 1
15026_ACEOF
15027
15028fi
15029
15030done
15031
15032
Jack Jansen666b1e72001-10-31 12:11:48 +000015033# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15035$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015036if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015041#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015042int
15043main ()
15044{
Jack Jansen666b1e72001-10-31 12:11:48 +000015045
15046 int rtn;
15047 rtn = mvwdelch(0,0,0);
15048
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ;
15050 return 0;
15051}
15052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015053if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015054 ac_cv_mvwdelch_is_expression=yes
15055else
Matthias Kloseb9621712010-04-24 17:59:49 +000015056 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15059fi
15060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15062$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015063
15064if test "$ac_cv_mvwdelch_is_expression" = yes
15065then
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015068
15069fi
15070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15072$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015073if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015077/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015078#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015079int
15080main ()
15081{
Jack Jansen666b1e72001-10-31 12:11:48 +000015082
15083 WINDOW *w;
15084 w->_flags = 0;
15085
Martin v. Löwis11437992002-04-12 09:54:03 +000015086 ;
15087 return 0;
15088}
15089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015090if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015091 ac_cv_window_has_flags=yes
15092else
Matthias Kloseb9621712010-04-24 17:59:49 +000015093 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15096fi
15097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15099$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015100
Jack Jansen666b1e72001-10-31 12:11:48 +000015101
15102if test "$ac_cv_window_has_flags" = yes
15103then
Martin v. Löwis11437992002-04-12 09:54:03 +000015104
Matthias Kloseb9621712010-04-24 17:59:49 +000015105$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015106
15107fi
15108
Matthias Kloseb9621712010-04-24 17:59:49 +000015109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15110$as_echo_n "checking for is_term_resized... " >&6; }
15111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015112/* end confdefs.h. */
15113#include <curses.h>
15114int
15115main ()
15116{
15117void *x=is_term_resized
15118 ;
15119 return 0;
15120}
15121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015122if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015125
Matthias Kloseb159a552010-04-25 21:00:44 +000015126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015127$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15130$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015131
15132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15136$as_echo_n "checking for resize_term... " >&6; }
15137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015138/* end confdefs.h. */
15139#include <curses.h>
15140int
15141main ()
15142{
15143void *x=resize_term
15144 ;
15145 return 0;
15146}
15147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015148if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015151
Matthias Kloseb159a552010-04-25 21:00:44 +000015152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015153$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015154else
Matthias Kloseb9621712010-04-24 17:59:49 +000015155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15156$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015157
15158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15162$as_echo_n "checking for resizeterm... " >&6; }
15163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015164/* end confdefs.h. */
15165#include <curses.h>
15166int
15167main ()
15168{
15169void *x=resizeterm
15170 ;
15171 return 0;
15172}
15173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015174if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015177
Matthias Kloseb159a552010-04-25 21:00:44 +000015178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015179$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15182$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015183
15184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015186# last curses configure check
15187CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15190$as_echo "$as_me: checking for device files" >&6;}
15191
15192if test "x$cross_compiling" = xyes; then
15193 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15195$as_echo_n "checking for /dev/ptmx... " >&6; }
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15197$as_echo "not set" >&6; }
15198 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15199 fi
15200 if test "${ac_cv_file__dev_ptc+set}" != set; then
15201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15202$as_echo_n "checking for /dev/ptc... " >&6; }
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15204$as_echo "not set" >&6; }
15205 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15206 fi
15207fi
15208
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15210$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015211if ${ac_cv_file__dev_ptmx+:} false; then :
15212 $as_echo_n "(cached) " >&6
15213else
15214 test "$cross_compiling" = yes &&
15215 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15216if test -r "/dev/ptmx"; then
15217 ac_cv_file__dev_ptmx=yes
15218else
15219 ac_cv_file__dev_ptmx=no
15220fi
15221fi
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15223$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15224if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015225
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015226fi
15227
15228if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015231
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15234$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015235if ${ac_cv_file__dev_ptc+:} false; then :
15236 $as_echo_n "(cached) " >&6
15237else
15238 test "$cross_compiling" = yes &&
15239 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15240if test -r "/dev/ptc"; then
15241 ac_cv_file__dev_ptc=yes
15242else
15243 ac_cv_file__dev_ptc=no
15244fi
15245fi
15246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15247$as_echo "$ac_cv_file__dev_ptc" >&6; }
15248if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015249
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015250fi
15251
15252if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015253
Matthias Kloseb9621712010-04-24 17:59:49 +000015254$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015255
Neal Norwitz865400f2003-03-21 01:42:58 +000015256fi
15257
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015258if test "$have_long_long" = yes
15259then
Matthias Kloseb9621712010-04-24 17:59:49 +000015260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15261$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015262 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015263 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015264else
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015266 ac_cv_have_long_long_format="cross -- assuming no"
15267 if test x$GCC = xyes; then
15268 save_CFLAGS=$CFLAGS
15269 CFLAGS="$CFLAGS -Werror -Wformat"
15270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15271/* end confdefs.h. */
15272
15273 #include <stdio.h>
15274 #include <stddef.h>
15275
15276int
15277main ()
15278{
15279
15280 char *buffer;
15281 sprintf(buffer, "%lld", (long long)123);
15282 sprintf(buffer, "%lld", (long long)-123);
15283 sprintf(buffer, "%llu", (unsigned long long)123);
15284
15285 ;
15286 return 0;
15287}
15288_ACEOF
15289if ac_fn_c_try_compile "$LINENO"; then :
15290 ac_cv_have_long_long_format=yes
15291
15292fi
15293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15294 CFLAGS=$save_CFLAGS
15295 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015296else
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015298/* end confdefs.h. */
15299
15300 #include <stdio.h>
15301 #include <stddef.h>
15302 #include <string.h>
15303
15304 #ifdef HAVE_SYS_TYPES_H
15305 #include <sys/types.h>
15306 #endif
15307
15308 int main()
15309 {
15310 char buffer[256];
15311
15312 if (sprintf(buffer, "%lld", (long long)123) < 0)
15313 return 1;
15314 if (strcmp(buffer, "123"))
15315 return 1;
15316
15317 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15318 return 1;
15319 if (strcmp(buffer, "-123"))
15320 return 1;
15321
15322 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15323 return 1;
15324 if (strcmp(buffer, "123"))
15325 return 1;
15326
15327 return 0;
15328 }
15329
15330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015331if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015332 ac_cv_have_long_long_format=yes
15333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15337 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015338fi
15339
15340
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015341fi
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15344$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015345fi
15346
Mark Dickinson89d7d412009-12-31 20:50:59 +000015347if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015348then
15349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015351
15352fi
15353
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015354if test $ac_sys_system = Darwin
15355then
15356 LIBS="$LIBS -framework CoreFoundation"
15357fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15360$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015361if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015362 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015363else
Matthias Kloseb9621712010-04-24 17:59:49 +000015364 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015365 ac_cv_have_size_t_format="cross -- assuming yes"
15366
Thomas Wouters477c8d52006-05-27 19:21:47 +000015367else
Matthias Kloseb9621712010-04-24 17:59:49 +000015368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015369/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015370
Thomas Wouters477c8d52006-05-27 19:21:47 +000015371#include <stdio.h>
15372#include <stddef.h>
15373#include <string.h>
15374
Christian Heimes2c181612007-12-17 20:04:13 +000015375#ifdef HAVE_SYS_TYPES_H
15376#include <sys/types.h>
15377#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015378
15379#ifdef HAVE_SSIZE_T
15380typedef ssize_t Py_ssize_t;
15381#elif SIZEOF_VOID_P == SIZEOF_LONG
15382typedef long Py_ssize_t;
15383#else
15384typedef int Py_ssize_t;
15385#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015386
Christian Heimes2c181612007-12-17 20:04:13 +000015387int main()
15388{
15389 char buffer[256];
15390
Thomas Wouters477c8d52006-05-27 19:21:47 +000015391 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15392 return 1;
15393
Thomas Wouters89f507f2006-12-13 04:49:30 +000015394 if (strcmp(buffer, "123"))
15395 return 1;
15396
15397 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15398 return 1;
15399
15400 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015401 return 1;
15402
15403 return 0;
15404}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015405
Thomas Wouters477c8d52006-05-27 19:21:47 +000015406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015408 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015409else
Matthias Kloseb9621712010-04-24 17:59:49 +000015410 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015414fi
15415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15418$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015419if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015420
Matthias Kloseb9621712010-04-24 17:59:49 +000015421$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015422
15423fi
15424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015426#ifdef HAVE_SYS_TYPES_H
15427#include <sys/types.h>
15428#endif
15429#ifdef HAVE_SYS_SOCKET_H
15430#include <sys/socket.h>
15431#endif
15432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433"
Victor Stinnere0be4232011-10-25 13:06:09 +020015434if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015435
Martin v. Löwis11437992002-04-12 09:54:03 +000015436else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015437
Matthias Kloseb9621712010-04-24 17:59:49 +000015438$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015439
15440fi
15441
Michael W. Hudson54241132001-12-07 15:38:26 +000015442
Matthias Kloseb9621712010-04-24 17:59:49 +000015443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15444$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015445if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015446 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015447else
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015449 ac_cv_broken_mbstowcs=no
15450else
Matthias Kloseb9621712010-04-24 17:59:49 +000015451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015452/* end confdefs.h. */
15453
Stefan Krah19c21392012-11-22 23:47:32 +010015454#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015455#include<stdlib.h>
15456int main() {
15457 size_t len = -1;
15458 const char *str = "text";
15459 len = mbstowcs(NULL, str, 0);
15460 return (len != 4);
15461}
15462
15463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015464if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015465 ac_cv_broken_mbstowcs=no
15466else
Matthias Kloseb9621712010-04-24 17:59:49 +000015467 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015471fi
15472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015473fi
15474
Matthias Kloseb9621712010-04-24 17:59:49 +000015475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15476$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015477if test "$ac_cv_broken_mbstowcs" = yes
15478then
15479
Matthias Kloseb9621712010-04-24 17:59:49 +000015480$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015481
15482fi
15483
Antoine Pitroub52ec782009-01-25 16:34:23 +000015484# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15486$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015487
15488# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015490 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015491if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015492then
15493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015495
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15497$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015498fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015499if test "$withval" = no
15500then
15501
15502$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15505$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015506fi
15507
Antoine Pitrou042b1282010-08-13 21:15:58 +000015508else
15509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15510$as_echo "no value specified" >&6; }
15511fi
15512
Antoine Pitroub52ec782009-01-25 16:34:23 +000015513
Matthias Kloseb17289e2012-03-15 19:51:34 +010015514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15515$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15516if ${ac_cv_computed_gotos+:} false; then :
15517 $as_echo_n "(cached) " >&6
15518else
15519 if test "$cross_compiling" = yes; then :
15520 if test "${with_computed_gotos+set}" = set; then
15521 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15522 else
15523 ac_cv_computed_gotos=no
15524 fi
15525else
15526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15527/* end confdefs.h. */
15528
15529int main(int argc, char **argv)
15530{
15531 static void *targets[1] = { &&LABEL1 };
15532 goto LABEL2;
15533LABEL1:
15534 return 0;
15535LABEL2:
15536 goto *targets[0];
15537 return 1;
15538}
15539
15540_ACEOF
15541if ac_fn_c_try_run "$LINENO"; then :
15542 ac_cv_computed_gotos=yes
15543else
15544 ac_cv_computed_gotos=no
15545fi
15546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15547 conftest.$ac_objext conftest.beam conftest.$ac_ext
15548fi
15549
15550fi
15551
15552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15553$as_echo "$ac_cv_computed_gotos" >&6; }
15554case "$ac_cv_computed_gotos" in yes*)
15555
15556$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15557
15558esac
15559
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015560case $ac_sys_system in
15561AIX*)
15562
15563$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15564 ;;
15565esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015566
Michael W. Hudson54241132001-12-07 15:38:26 +000015567
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015568
15569
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015570for h in `(cd $srcdir;echo Python/thread_*.h)`
15571do
15572 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15573done
15574
Michael W. Hudson54241132001-12-07 15:38:26 +000015575
Ned Deily0db50cf2014-07-25 12:41:31 -070015576SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15578$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015579for dir in $SRCDIRS; do
15580 if test ! -d $dir; then
15581 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015582 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015583done
Matthias Kloseb9621712010-04-24 17:59:49 +000015584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15585$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015586
Stefan Krah1919b7e2012-03-21 18:25:23 +010015587# Availability of -O2:
15588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15589$as_echo_n "checking for -O2... " >&6; }
15590saved_cflags="$CFLAGS"
15591CFLAGS="-O2"
15592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15593/* end confdefs.h. */
15594
15595int
15596main ()
15597{
15598
15599
15600 ;
15601 return 0;
15602}
15603_ACEOF
15604if ac_fn_c_try_compile "$LINENO"; then :
15605 have_O2=yes
15606else
15607 have_O2=no
15608fi
15609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15611$as_echo "$have_O2" >&6; }
15612CFLAGS="$saved_cflags"
15613
15614# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15615# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15617$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15618saved_cflags="$CFLAGS"
15619CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15620if test "$have_O2" = no; then
15621 CFLAGS=""
15622fi
15623if test "$cross_compiling" = yes; then :
15624 have_glibc_memmove_bug=undefined
15625else
15626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15627/* end confdefs.h. */
15628
15629#include <stdio.h>
15630#include <stdlib.h>
15631#include <string.h>
15632void foo(void *p, void *q) { memmove(p, q, 19); }
15633int main() {
15634 char a[32] = "123456789000000000";
15635 foo(&a[9], a);
15636 if (strcmp(a, "123456789123456789000000000") != 0)
15637 return 1;
15638 foo(a, &a[9]);
15639 if (strcmp(a, "123456789000000000") != 0)
15640 return 1;
15641 return 0;
15642}
15643
15644_ACEOF
15645if ac_fn_c_try_run "$LINENO"; then :
15646 have_glibc_memmove_bug=no
15647else
15648 have_glibc_memmove_bug=yes
15649fi
15650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15651 conftest.$ac_objext conftest.beam conftest.$ac_ext
15652fi
15653
15654CFLAGS="$saved_cflags"
15655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15656$as_echo "$have_glibc_memmove_bug" >&6; }
15657if test "$have_glibc_memmove_bug" = yes; then
15658
15659$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15660
15661fi
15662
15663if test "$have_gcc_asm_for_x87" = yes; then
15664 # Some versions of gcc miscompile inline asm:
15665 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15666 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15667 case $CC in
15668 *gcc*)
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15670$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15671 saved_cflags="$CFLAGS"
15672 CFLAGS="-O2"
15673 if test "$cross_compiling" = yes; then :
15674 have_ipa_pure_const_bug=undefined
15675else
15676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15677/* end confdefs.h. */
15678
15679 __attribute__((noinline)) int
15680 foo(int *p) {
15681 int r;
15682 asm ( "movl \$6, (%1)\n\t"
15683 "xorl %0, %0\n\t"
15684 : "=r" (r) : "r" (p) : "memory"
15685 );
15686 return r;
15687 }
15688 int main() {
15689 int p = 8;
15690 if ((foo(&p) ? : p) != 6)
15691 return 1;
15692 return 0;
15693 }
15694
15695_ACEOF
15696if ac_fn_c_try_run "$LINENO"; then :
15697 have_ipa_pure_const_bug=no
15698else
15699 have_ipa_pure_const_bug=yes
15700fi
15701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15702 conftest.$ac_objext conftest.beam conftest.$ac_ext
15703fi
15704
15705 CFLAGS="$saved_cflags"
15706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15707$as_echo "$have_ipa_pure_const_bug" >&6; }
15708 if test "$have_ipa_pure_const_bug" = yes; then
15709
15710$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15711
15712 fi
15713 ;;
15714 esac
15715fi
15716
Victor Stinner4f5366e2015-01-09 02:13:19 +010015717# Check for stdatomic.h
15718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15719$as_echo_n "checking for stdatomic.h... " >&6; }
15720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15721/* end confdefs.h. */
15722
15723
15724 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015725 atomic_int value = ATOMIC_VAR_INIT(1);
15726 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015727 int main() {
15728 int loaded_value = atomic_load(&value);
15729 return 0;
15730 }
15731
15732
15733_ACEOF
15734if ac_fn_c_try_link "$LINENO"; then :
15735 have_stdatomic_h=yes
15736else
15737 have_stdatomic_h=no
15738fi
15739rm -f core conftest.err conftest.$ac_objext \
15740 conftest$ac_exeext conftest.$ac_ext
15741
15742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15743$as_echo "$have_stdatomic_h" >&6; }
15744
15745if test "$have_stdatomic_h" = yes; then
15746
15747$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15748
15749fi
15750
15751# Check for GCC >= 4.7 __atomic builtins
15752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15753$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15755/* end confdefs.h. */
15756
15757
15758 volatile int val = 1;
15759 int main() {
15760 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15761 return 0;
15762 }
15763
15764
15765_ACEOF
15766if ac_fn_c_try_link "$LINENO"; then :
15767 have_builtin_atomic=yes
15768else
15769 have_builtin_atomic=no
15770fi
15771rm -f core conftest.err conftest.$ac_objext \
15772 conftest$ac_exeext conftest.$ac_ext
15773
15774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15775$as_echo "$have_builtin_atomic" >&6; }
15776
15777if test "$have_builtin_atomic" = yes; then
15778
15779$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15780
15781fi
15782
Ned Deily322f5ba2013-11-21 23:01:59 -080015783# ensurepip option
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15785$as_echo_n "checking for ensurepip... " >&6; }
15786
15787# Check whether --with-ensurepip was given.
15788if test "${with_ensurepip+set}" = set; then :
15789 withval=$with_ensurepip;
15790else
15791 with_ensurepip=upgrade
15792fi
15793
15794case $with_ensurepip in #(
15795 yes|upgrade) :
15796 ENSUREPIP=upgrade ;; #(
15797 install) :
15798 ENSUREPIP=install ;; #(
15799 no) :
15800 ENSUREPIP=no ;; #(
15801 *) :
15802 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15803esac
15804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15805$as_echo "$ENSUREPIP" >&6; }
15806
15807
Victor Stinner35a97c02015-03-08 02:59:09 +010015808# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15810$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15812/* end confdefs.h. */
15813
15814
15815 #include <dirent.h>
15816
15817 int main() {
15818 struct dirent entry;
15819 return entry.d_type == DT_UNKNOWN;
15820 }
15821
15822
15823_ACEOF
15824if ac_fn_c_try_link "$LINENO"; then :
15825 have_dirent_d_type=yes
15826else
15827 have_dirent_d_type=no
15828fi
15829rm -f core conftest.err conftest.$ac_objext \
15830 conftest$ac_exeext conftest.$ac_ext
15831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15832$as_echo "$have_dirent_d_type" >&6; }
15833
15834if test "$have_dirent_d_type" = yes; then
15835
15836$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15837
15838fi
15839
Victor Stinner9eb57c52015-03-19 22:21:49 +010015840# check if the Linux getrandom() syscall is available
15841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
15842$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
15843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844/* end confdefs.h. */
15845
15846
15847 #include <sys/syscall.h>
15848
15849 int main() {
15850 const int flags = 0;
15851 char buffer[1];
15852 int n;
15853 /* ignore the result, Python checks for ENOSYS at runtime */
15854 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
15855 return 0;
15856 }
15857
15858
15859_ACEOF
15860if ac_fn_c_try_link "$LINENO"; then :
15861 have_getrandom_syscall=yes
15862else
15863 have_getrandom_syscall=no
15864fi
15865rm -f core conftest.err conftest.$ac_objext \
15866 conftest$ac_exeext conftest.$ac_ext
15867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
15868$as_echo "$have_getrandom_syscall" >&6; }
15869
15870if test "$have_getrandom_syscall" = yes; then
15871
15872$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
15873
15874fi
15875
Guido van Rossum627b2d71993-12-24 10:39:16 +000015876# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015877ac_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 +000015878
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015879ac_config_files="$ac_config_files Modules/ld_so_aix"
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015882# This file is a shell script that caches the results of configure
15883# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015884# scripts and configure runs, see configure's option --config-cache.
15885# It is not useful on other systems. If it contains results you don't
15886# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015887#
Martin v. Löwis11437992002-04-12 09:54:03 +000015888# config.status only pays attention to the cache file if you give it
15889# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015890#
Skip Montanaro6dead952003-09-25 14:50:04 +000015891# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015892# loading this file, other *unset* `ac_cv_foo' will be assigned the
15893# following values.
15894
15895_ACEOF
15896
Guido van Rossumf78abae1997-01-21 22:02:36 +000015897# The following way of writing the cache mishandles newlines in values,
15898# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015900# Ultrix sh set writes to stderr and can't be redirected directly,
15901# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902(
15903 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15904 eval ac_val=\$$ac_var
15905 case $ac_val in #(
15906 *${as_nl}*)
15907 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15909$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910 esac
15911 case $ac_var in #(
15912 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15914 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 esac ;;
15916 esac
15917 done
15918
Martin v. Löwis11437992002-04-12 09:54:03 +000015919 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15921 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 # `set' does not quote correctly, so add quotes: double-quote
15923 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015924 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015925 "s/'/'\\\\''/g;
15926 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015928 *)
15929 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932 esac |
15933 sort
15934) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015939 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15940 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015941 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15942 :end' >>confcache
15943if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15944 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015945 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015946 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15947$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015948 if test ! -f "$cache_file" || test -h "$cache_file"; then
15949 cat confcache >"$cache_file"
15950 else
15951 case $cache_file in #(
15952 */* | ?:*)
15953 mv -f confcache "$cache_file"$$ &&
15954 mv -f "$cache_file"$$ "$cache_file" ;; #(
15955 *)
15956 mv -f confcache "$cache_file" ;;
15957 esac
15958 fi
15959 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015960 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015961 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15962$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015963 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015964fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015965rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015967test "x$prefix" = xNONE && prefix=$ac_default_prefix
15968# Let make expand exec_prefix.
15969test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015970
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015971DEFS=-DHAVE_CONFIG_H
15972
Skip Montanaro6dead952003-09-25 14:50:04 +000015973ac_libobjs=
15974ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015975U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015976for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15977 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15981 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15983 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015984done
15985LIBOBJS=$ac_libobjs
15986
15987LTLIBOBJS=$ac_ltlibobjs
15988
15989
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Matthias Kloseb9621712010-04-24 17:59:49 +000015991
Victor Stinnere0be4232011-10-25 13:06:09 +020015992: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015993ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015994ac_clean_files_save=$ac_clean_files
15995ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015996{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15997$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15998as_write_fail=0
15999cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016000#! $SHELL
16001# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016002# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016003# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016004# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016005
Martin v. Löwis11437992002-04-12 09:54:03 +000016006debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016007ac_cs_recheck=false
16008ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010SHELL=\${CONFIG_SHELL-$SHELL}
16011export SHELL
16012_ASEOF
16013cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16014## -------------------- ##
16015## M4sh Initialization. ##
16016## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018# Be more Bourne compatible
16019DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 emulate sh
16022 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016024 # is contrary to our usage. Disable this feature.
16025 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016027else
Matthias Kloseb9621712010-04-24 17:59:49 +000016028 case `(set -o) 2>/dev/null` in #(
16029 *posix*) :
16030 set -o posix ;; #(
16031 *) :
16032 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016033esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016034fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016035
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037as_nl='
16038'
16039export as_nl
16040# Printing a long string crashes Solaris 7 /usr/bin/printf.
16041as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16042as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16043as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16044# Prefer a ksh shell builtin over an external printf program on Solaris,
16045# but without wasting forks for bash or zsh.
16046if test -z "$BASH_VERSION$ZSH_VERSION" \
16047 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16048 as_echo='print -r --'
16049 as_echo_n='print -rn --'
16050elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16051 as_echo='printf %s\n'
16052 as_echo_n='printf %s'
16053else
16054 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16055 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16056 as_echo_n='/usr/ucb/echo -n'
16057 else
16058 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16059 as_echo_n_body='eval
16060 arg=$1;
16061 case $arg in #(
16062 *"$as_nl"*)
16063 expr "X$arg" : "X\\(.*\\)$as_nl";
16064 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16065 esac;
16066 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16067 '
16068 export as_echo_n_body
16069 as_echo_n='sh -c $as_echo_n_body as_echo'
16070 fi
16071 export as_echo_body
16072 as_echo='sh -c $as_echo_body as_echo'
16073fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
16075# The user is always right.
16076if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016077 PATH_SEPARATOR=:
16078 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16079 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16080 PATH_SEPARATOR=';'
16081 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084
16085# IFS
16086# We need space, tab and new line, in precisely that order. Quoting is
16087# there to prevent editors from complaining about space-tab.
16088# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16089# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090IFS=" "" $as_nl"
16091
16092# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016093as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016094case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016095 *[\\/]* ) as_myself=$0 ;;
16096 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016097for as_dir in $PATH
16098do
16099 IFS=$as_save_IFS
16100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16102 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105 ;;
16106esac
16107# We did not find ourselves, most probably we were run as `sh COMMAND'
16108# in which case we are not to be found in the path.
16109if test "x$as_myself" = x; then
16110 as_myself=$0
16111fi
16112if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16114 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016115fi
16116
Matthias Kloseb9621712010-04-24 17:59:49 +000016117# Unset variables that we do not need and which cause bugs (e.g. in
16118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16119# suppresses any "Segmentation fault" message there. '((' could
16120# trigger a bug in pdksh 5.2.14.
16121for as_var in BASH_ENV ENV MAIL MAILPATH
16122do eval test x\${$as_var+set} = xset \
16123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016124done
16125PS1='$ '
16126PS2='> '
16127PS4='+ '
16128
16129# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016130LC_ALL=C
16131export LC_ALL
16132LANGUAGE=C
16133export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016134
Matthias Kloseb9621712010-04-24 17:59:49 +000016135# CDPATH.
16136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16137
16138
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016139# as_fn_error STATUS ERROR [LINENO LOG_FD]
16140# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016141# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16142# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016143# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016144as_fn_error ()
16145{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016146 as_status=$1; test $as_status -eq 0 && as_status=1
16147 if test "$4"; then
16148 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16149 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016150 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016151 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016152 as_fn_exit $as_status
16153} # as_fn_error
16154
16155
16156# as_fn_set_status STATUS
16157# -----------------------
16158# Set $? to STATUS, without forking.
16159as_fn_set_status ()
16160{
16161 return $1
16162} # as_fn_set_status
16163
16164# as_fn_exit STATUS
16165# -----------------
16166# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16167as_fn_exit ()
16168{
16169 set +e
16170 as_fn_set_status $1
16171 exit $1
16172} # as_fn_exit
16173
16174# as_fn_unset VAR
16175# ---------------
16176# Portably unset VAR.
16177as_fn_unset ()
16178{
16179 { eval $1=; unset $1;}
16180}
16181as_unset=as_fn_unset
16182# as_fn_append VAR VALUE
16183# ----------------------
16184# Append the text in VALUE to the end of the definition contained in VAR. Take
16185# advantage of any shell optimizations that allow amortized linear growth over
16186# repeated appends, instead of the typical quadratic growth present in naive
16187# implementations.
16188if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16189 eval 'as_fn_append ()
16190 {
16191 eval $1+=\$2
16192 }'
16193else
16194 as_fn_append ()
16195 {
16196 eval $1=\$$1\$2
16197 }
16198fi # as_fn_append
16199
16200# as_fn_arith ARG...
16201# ------------------
16202# Perform arithmetic evaluation on the ARGs, and store the result in the
16203# global $as_val. Take advantage of shells that can avoid forks. The arguments
16204# must be portable across $(()) and expr.
16205if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16206 eval 'as_fn_arith ()
16207 {
16208 as_val=$(( $* ))
16209 }'
16210else
16211 as_fn_arith ()
16212 {
16213 as_val=`expr "$@" || test $? -eq 1`
16214 }
16215fi # as_fn_arith
16216
16217
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218if expr a : '\(a\)' >/dev/null 2>&1 &&
16219 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16220 as_expr=expr
16221else
16222 as_expr=false
16223fi
16224
16225if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16226 as_basename=basename
16227else
16228 as_basename=false
16229fi
16230
Matthias Kloseb9621712010-04-24 17:59:49 +000016231if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16232 as_dirname=dirname
16233else
16234 as_dirname=false
16235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237as_me=`$as_basename -- "$0" ||
16238$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16239 X"$0" : 'X\(//\)$' \| \
16240 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016241$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242 sed '/^.*\/\([^/][^/]*\)\/*$/{
16243 s//\1/
16244 q
16245 }
16246 /^X\/\(\/\/\)$/{
16247 s//\1/
16248 q
16249 }
16250 /^X\/\(\/\).*/{
16251 s//\1/
16252 q
16253 }
16254 s/.*/./; q'`
16255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256# Avoid depending upon Character Ranges.
16257as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16258as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16259as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16260as_cr_digits='0123456789'
16261as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262
16263ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016264case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016268 xy) ECHO_C='\c';;
16269 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16270 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 esac;;
16272*)
16273 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016274esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016275
Martin v. Löwis11437992002-04-12 09:54:03 +000016276rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016277if test -d conf$$.dir; then
16278 rm -f conf$$.dir/conf$$.file
16279else
16280 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016281 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016283if (echo >conf$$.file) 2>/dev/null; then
16284 if ln -s conf$$.file conf$$ 2>/dev/null; then
16285 as_ln_s='ln -s'
16286 # ... but there are two gotchas:
16287 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16288 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016289 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016290 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016291 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016292 elif ln conf$$.file conf$$ 2>/dev/null; then
16293 as_ln_s=ln
16294 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016295 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016296 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016297else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016298 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16301rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016302
Matthias Kloseb9621712010-04-24 17:59:49 +000016303
16304# as_fn_mkdir_p
16305# -------------
16306# Create "$as_dir" as a directory, including parents if necessary.
16307as_fn_mkdir_p ()
16308{
16309
16310 case $as_dir in #(
16311 -*) as_dir=./$as_dir;;
16312 esac
16313 test -d "$as_dir" || eval $as_mkdir_p || {
16314 as_dirs=
16315 while :; do
16316 case $as_dir in #(
16317 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16318 *) as_qdir=$as_dir;;
16319 esac
16320 as_dirs="'$as_qdir' $as_dirs"
16321 as_dir=`$as_dirname -- "$as_dir" ||
16322$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16323 X"$as_dir" : 'X\(//\)[^/]' \| \
16324 X"$as_dir" : 'X\(//\)$' \| \
16325 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16326$as_echo X"$as_dir" |
16327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16328 s//\1/
16329 q
16330 }
16331 /^X\(\/\/\)[^/].*/{
16332 s//\1/
16333 q
16334 }
16335 /^X\(\/\/\)$/{
16336 s//\1/
16337 q
16338 }
16339 /^X\(\/\).*/{
16340 s//\1/
16341 q
16342 }
16343 s/.*/./; q'`
16344 test -d "$as_dir" && break
16345 done
16346 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016347 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016348
16349
16350} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016351if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016353else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016354 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016355 as_mkdir_p=false
16356fi
16357
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016358
16359# as_fn_executable_p FILE
16360# -----------------------
16361# Test if FILE is an executable regular file.
16362as_fn_executable_p ()
16363{
16364 test -f "$1" && test -x "$1"
16365} # as_fn_executable_p
16366as_test_x='test -x'
16367as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
16369# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016370as_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 +000016371
16372# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016373as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016374
16375
Martin v. Löwis11437992002-04-12 09:54:03 +000016376exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016377## ----------------------------------- ##
16378## Main body of $CONFIG_STATUS script. ##
16379## ----------------------------------- ##
16380_ASEOF
16381test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016382
Matthias Kloseb9621712010-04-24 17:59:49 +000016383cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16384# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016385# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386# values after options handling.
16387ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016388This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016389generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016390
16391 CONFIG_FILES = $CONFIG_FILES
16392 CONFIG_HEADERS = $CONFIG_HEADERS
16393 CONFIG_LINKS = $CONFIG_LINKS
16394 CONFIG_COMMANDS = $CONFIG_COMMANDS
16395 $ $0 $@
16396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397on `(hostname || uname -n) 2>/dev/null | sed 1q`
16398"
16399
Martin v. Löwis11437992002-04-12 09:54:03 +000016400_ACEOF
16401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402case $ac_config_files in *"
16403"*) set x $ac_config_files; shift; ac_config_files=$*;;
16404esac
16405
16406case $ac_config_headers in *"
16407"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16408esac
16409
16410
16411cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016412# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016413config_files="$ac_config_files"
16414config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016416_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016419ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016420\`$as_me' instantiates files and other configuration actions
16421from templates according to the current configuration. Unless the files
16422and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016423
Matthias Kloseb9621712010-04-24 17:59:49 +000016424Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016425
16426 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016428 --config print configuration, then exit
16429 -q, --quiet, --silent
16430 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 -d, --debug don't remove temporary files
16432 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016433 --file=FILE[:TEMPLATE]
16434 instantiate the configuration file FILE
16435 --header=FILE[:TEMPLATE]
16436 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016437
16438Configuration files:
16439$config_files
16440
16441Configuration headers:
16442$config_headers
16443
Matthias Kloseb9621712010-04-24 17:59:49 +000016444Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016447cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16448ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016449ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016450python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016451configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016453
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016454Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016455This config.status script is free software; the Free Software Foundation
16456gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457
16458ac_pwd='$ac_pwd'
16459srcdir='$srcdir'
16460INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016461MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016462test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016463_ACEOF
16464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16466# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016467ac_need_defaults=:
16468while test $# != 0
16469do
16470 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016471 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16473 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016474 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016475 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016476 --*=)
16477 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16478 ac_optarg=
16479 ac_shift=:
16480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016482 ac_option=$1
16483 ac_optarg=$2
16484 ac_shift=shift
16485 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 esac
16487
Skip Montanaro6dead952003-09-25 14:50:04 +000016488 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016489 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016490 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16491 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016493 $as_echo "$ac_cs_version"; exit ;;
16494 --config | --confi | --conf | --con | --co | --c )
16495 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 debug=: ;;
16498 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016499 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016500 case $ac_optarg in
16501 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016502 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016503 esac
16504 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 ac_need_defaults=false;;
16506 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016507 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016508 case $ac_optarg in
16509 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16510 esac
16511 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016512 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 --he | --h)
16514 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016515 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016516Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016518 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16520 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16521 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016522
16523 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016524 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016525Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
Matthias Kloseb9621712010-04-24 17:59:49 +000016527 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016528 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016529
16530 esac
16531 shift
16532done
16533
Skip Montanaro6dead952003-09-25 14:50:04 +000016534ac_configure_extra_args=
16535
16536if $ac_cs_silent; then
16537 exec 6>/dev/null
16538 ac_configure_extra_args="$ac_configure_extra_args --silent"
16539fi
16540
16541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016542cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016543if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016544 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016545 shift
16546 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16547 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016549 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016550fi
16551
Martin v. Löwis11437992002-04-12 09:54:03 +000016552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554exec 5>>config.log
16555{
16556 echo
16557 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16558## Running $as_me. ##
16559_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016560 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016564cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016566
Matthias Kloseb9621712010-04-24 17:59:49 +000016567cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568
16569# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016570for ac_config_target in $ac_config_targets
16571do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 case $ac_config_target in
16573 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16574 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16575 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016576 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16577 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16579 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016580 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016581 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016582 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583
Victor Stinnere0be4232011-10-25 13:06:09 +020016584 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016585 esac
16586done
16587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588
Martin v. Löwis11437992002-04-12 09:54:03 +000016589# If the user did not use the arguments to specify the items to instantiate,
16590# then the envvar interface is used. Set only those that are not.
16591# We use the long form for the default assignment because of an extremely
16592# bizarre bug on SunOS 4.1.3.
16593if $ac_need_defaults; then
16594 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16595 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16596fi
16597
Skip Montanaro6dead952003-09-25 14:50:04 +000016598# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016599# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016600# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601# Hook for its removal unless debugging.
16602# Note that there is a small window in which the directory will not be cleaned:
16603# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016604$debug ||
16605{
Victor Stinnere0be4232011-10-25 13:06:09 +020016606 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016608 : "${ac_tmp:=$tmp}"
16609 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016612}
Martin v. Löwis11437992002-04-12 09:54:03 +000016613# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016614
Martin v. Löwis11437992002-04-12 09:54:03 +000016615{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016617 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016618} ||
16619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 tmp=./conf$$-$RANDOM
16621 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016622} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016623ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016624
Matthias Kloseb9621712010-04-24 17:59:49 +000016625# Set up the scripts for CONFIG_FILES section.
16626# No need to generate them if there are no CONFIG_FILES.
16627# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016628if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016629
Matthias Kloseb9621712010-04-24 17:59:49 +000016630
16631ac_cr=`echo X | tr X '\015'`
16632# On cygwin, bash can eat \r inside `` if the user requested igncr.
16633# But we know of no other shell where ac_cr would be empty at this
16634# point, so we can use a bashism as a fallback.
16635if test "x$ac_cr" = x; then
16636 eval ac_cr=\$\'\\r\'
16637fi
16638ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16639if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016640 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016641else
16642 ac_cs_awk_cr=$ac_cr
16643fi
16644
Victor Stinnere0be4232011-10-25 13:06:09 +020016645echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016646_ACEOF
16647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648
Matthias Kloseb9621712010-04-24 17:59:49 +000016649{
16650 echo "cat >conf$$subs.awk <<_ACEOF" &&
16651 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16652 echo "_ACEOF"
16653} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016654 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16655ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656ac_delim='%!_!# '
16657for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016659 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660
Matthias Kloseb9621712010-04-24 17:59:49 +000016661 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16662 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663 break
16664 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016665 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666 else
16667 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669done
Matthias Kloseb9621712010-04-24 17:59:49 +000016670rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671
Matthias Kloseb9621712010-04-24 17:59:49 +000016672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016673cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016675sed -n '
16676h
16677s/^/S["/; s/!.*/"]=/
16678p
16679g
16680s/^[^!]*!//
16681:repl
16682t repl
16683s/'"$ac_delim"'$//
16684t delim
16685:nl
16686h
16687s/\(.\{148\}\)..*/\1/
16688t more1
16689s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16690p
16691n
16692b repl
16693:more1
16694s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16695p
16696g
16697s/.\{148\}//
16698t nl
16699:delim
16700h
16701s/\(.\{148\}\)..*/\1/
16702t more2
16703s/["\\]/\\&/g; s/^/"/; s/$/"/
16704p
16705b
16706:more2
16707s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16708p
16709g
16710s/.\{148\}//
16711t delim
16712' <conf$$subs.awk | sed '
16713/^[^""]/{
16714 N
16715 s/\n//
16716}
16717' >>$CONFIG_STATUS || ac_write_fail=1
16718rm -f conf$$subs.awk
16719cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16720_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016721cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016722 for (key in S) S_is_set[key] = 1
16723 FS = ""
16724
16725}
16726{
16727 line = $ 0
16728 nfields = split(line, field, "@")
16729 substed = 0
16730 len = length(field[1])
16731 for (i = 2; i < nfields; i++) {
16732 key = field[i]
16733 keylen = length(key)
16734 if (S_is_set[key]) {
16735 value = S[key]
16736 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16737 len += length(value) + length(field[++i])
16738 substed = 1
16739 } else
16740 len += 1 + keylen
16741 }
16742
16743 print line
16744}
16745
16746_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16749if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16750 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16751else
16752 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016753fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016754 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016755_ACEOF
16756
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016757# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16758# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759# trailing colons and then remove the whole line if VPATH becomes empty
16760# (actually we leave an empty line to preserve line numbers).
16761if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016762 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16763h
16764s///
16765s/^/:/
16766s/[ ]*$/:/
16767s/:\$(srcdir):/:/g
16768s/:\${srcdir}:/:/g
16769s/:@srcdir@:/:/g
16770s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016772x
16773s/\(=[ ]*\).*/\1/
16774G
16775s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016776s/^[^=]*=[ ]*$//
16777}'
16778fi
16779
Matthias Kloseb9621712010-04-24 17:59:49 +000016780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016781fi # test -n "$CONFIG_FILES"
16782
Matthias Kloseb9621712010-04-24 17:59:49 +000016783# Set up the scripts for CONFIG_HEADERS section.
16784# No need to generate them if there are no CONFIG_HEADERS.
16785# This happens for instance with `./config.status Makefile'.
16786if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016787cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016788BEGIN {
16789_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016790
Matthias Kloseb9621712010-04-24 17:59:49 +000016791# Transform confdefs.h into an awk script `defines.awk', embedded as
16792# here-document in config.status, that substitutes the proper values into
16793# config.h.in to produce config.h.
16794
16795# Create a delimiter string that does not exist in confdefs.h, to ease
16796# handling of long lines.
16797ac_delim='%!_!# '
16798for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016799 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16800 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016801 break
16802 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016803 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016804 else
16805 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16806 fi
16807done
16808
16809# For the awk script, D is an array of macro values keyed by name,
16810# likewise P contains macro parameters if any. Preserve backslash
16811# newline sequences.
16812
16813ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16814sed -n '
16815s/.\{148\}/&'"$ac_delim"'/g
16816t rset
16817:rset
16818s/^[ ]*#[ ]*define[ ][ ]*/ /
16819t def
16820d
16821:def
16822s/\\$//
16823t bsnl
16824s/["\\]/\\&/g
16825s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16826D["\1"]=" \3"/p
16827s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16828d
16829:bsnl
16830s/["\\]/\\&/g
16831s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16832D["\1"]=" \3\\\\\\n"\\/p
16833t cont
16834s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16835t cont
16836d
16837:cont
16838n
16839s/.\{148\}/&'"$ac_delim"'/g
16840t clear
16841:clear
16842s/\\$//
16843t bsnlc
16844s/["\\]/\\&/g; s/^/"/; s/$/"/p
16845d
16846:bsnlc
16847s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16848b cont
16849' <confdefs.h | sed '
16850s/'"$ac_delim"'/"\\\
16851"/g' >>$CONFIG_STATUS || ac_write_fail=1
16852
16853cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16854 for (key in D) D_is_set[key] = 1
16855 FS = ""
16856}
16857/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16858 line = \$ 0
16859 split(line, arg, " ")
16860 if (arg[1] == "#") {
16861 defundef = arg[2]
16862 mac1 = arg[3]
16863 } else {
16864 defundef = substr(arg[1], 2)
16865 mac1 = arg[2]
16866 }
16867 split(mac1, mac2, "(") #)
16868 macro = mac2[1]
16869 prefix = substr(line, 1, index(line, defundef) - 1)
16870 if (D_is_set[macro]) {
16871 # Preserve the white space surrounding the "#".
16872 print prefix "define", macro P[macro] D[macro]
16873 next
16874 } else {
16875 # Replace #undef with comments. This is necessary, for example,
16876 # in the case of _POSIX_SOURCE, which is predefined and required
16877 # on some systems where configure will not decide to define it.
16878 if (defundef == "undef") {
16879 print "/*", prefix defundef, macro, "*/"
16880 next
16881 }
16882 }
16883}
16884{ print }
16885_ACAWK
16886_ACEOF
16887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016888 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016889fi # test -n "$CONFIG_HEADERS"
16890
16891
16892eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16893shift
16894for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895do
16896 case $ac_tag in
16897 :[FHLC]) ac_mode=$ac_tag; continue;;
16898 esac
16899 case $ac_mode$ac_tag in
16900 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016901 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 :[FH]-) ac_tag=-:-;;
16903 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16904 esac
16905 ac_save_IFS=$IFS
16906 IFS=:
16907 set x $ac_tag
16908 IFS=$ac_save_IFS
16909 shift
16910 ac_file=$1
16911 shift
16912
16913 case $ac_mode in
16914 :L) ac_source=$1;;
16915 :[FH])
16916 ac_file_inputs=
16917 for ac_f
16918 do
16919 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016920 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016921 *) # Look for the file first in the build tree, then in the source tree
16922 # (if the path is not absolute). The absolute path cannot be DOS-style,
16923 # because $ac_f cannot contain `:'.
16924 test -f "$ac_f" ||
16925 case $ac_f in
16926 [\\/$]*) false;;
16927 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16928 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016929 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016930 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16932 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016933 done
16934
16935 # Let's still pretend it is `configure' which instantiates (i.e., don't
16936 # use $as_me), people would be surprised to read:
16937 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016938 configure_input='Generated from '`
16939 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16940 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 if test x"$ac_file" != x-; then
16942 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016943 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16944$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 # Neutralize special characters interpreted by sed in replacement strings.
16947 case $configure_input in #(
16948 *\&* | *\|* | *\\* )
16949 ac_sed_conf_input=`$as_echo "$configure_input" |
16950 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16951 *) ac_sed_conf_input=$configure_input;;
16952 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016953
16954 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016955 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16956 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957 esac
16958 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 esac
16960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016962$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016963 X"$ac_file" : 'X\(//\)[^/]' \| \
16964 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016965 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016966$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16968 s//\1/
16969 q
16970 }
16971 /^X\(\/\/\)[^/].*/{
16972 s//\1/
16973 q
16974 }
16975 /^X\(\/\/\)$/{
16976 s//\1/
16977 q
16978 }
16979 /^X\(\/\).*/{
16980 s//\1/
16981 q
16982 }
16983 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016985 ac_builddir=.
16986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987case "$ac_dir" in
16988.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16989*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016990 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016992 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993 case $ac_top_builddir_sub in
16994 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16995 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16996 esac ;;
16997esac
16998ac_abs_top_builddir=$ac_pwd
16999ac_abs_builddir=$ac_pwd$ac_dir_suffix
17000# for backward compatibility:
17001ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
17003case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 ac_top_srcdir=$ac_top_builddir_sub
17007 ac_abs_top_srcdir=$ac_pwd ;;
17008 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010 ac_top_srcdir=$srcdir
17011 ac_abs_top_srcdir=$srcdir ;;
17012 *) # Relative name.
17013 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17014 ac_top_srcdir=$ac_top_build_prefix$srcdir
17015 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017016esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017018
Martin v. Löwis11437992002-04-12 09:54:03 +000017019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 case $ac_mode in
17021 :F)
17022 #
17023 # CONFIG_FILE
17024 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017025
17026 case $INSTALL in
17027 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017030 ac_MKDIR_P=$MKDIR_P
17031 case $MKDIR_P in
17032 [\\/$]* | ?:[\\/]* ) ;;
17033 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17034 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017035_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036
Matthias Kloseb9621712010-04-24 17:59:49 +000017037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038# If the template does not know about datarootdir, expand it.
17039# FIXME: This hack should be removed a few years after 2.60.
17040ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017041ac_sed_dataroot='
17042/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 p
17044 q
17045}
17046/@datadir@/p
17047/@docdir@/p
17048/@infodir@/p
17049/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017050/@mandir@/p'
17051case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052*datarootdir*) ac_datarootdir_seen=yes;;
17053*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17055$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017057cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058 ac_datarootdir_hack='
17059 s&@datadir@&$datadir&g
17060 s&@docdir@&$docdir&g
17061 s&@infodir@&$infodir&g
17062 s&@localedir@&$localedir&g
17063 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017065esac
17066_ACEOF
17067
17068# Neutralize VPATH when `$srcdir' = `.'.
17069# Shell code in configure.ac might set extrasub.
17070# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17072ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017073$extrasub
17074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017075cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017076:t
17077/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017078s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017080s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081s&@srcdir@&$ac_srcdir&;t t
17082s&@abs_srcdir@&$ac_abs_srcdir&;t t
17083s&@top_srcdir@&$ac_top_srcdir&;t t
17084s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17085s&@builddir@&$ac_builddir&;t t
17086s&@abs_builddir@&$ac_abs_builddir&;t t
17087s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17088s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017089s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017091"
Victor Stinnere0be4232011-10-25 13:06:09 +020017092eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17093 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017096 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17097 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17098 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017100which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017101$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017102which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017103
Victor Stinnere0be4232011-10-25 13:06:09 +020017104 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017105 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017106 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17107 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017108 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017109 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110 ;;
17111 :H)
17112 #
17113 # CONFIG_HEADER
17114 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017115 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017116 {
17117 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017118 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17119 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017120 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017121 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17123$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017124 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017126 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017127 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 fi
17129 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017130 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017131 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017132 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017133 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136
17137 esac
17138
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017139
17140 case $ac_file$ac_mode in
17141 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17142
17143 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144done # for ac_tag
17145
Guido van Rossum627b2d71993-12-24 10:39:16 +000017146
Matthias Kloseb9621712010-04-24 17:59:49 +000017147as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017148_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017149ac_clean_files=$ac_clean_files_save
17150
Matthias Kloseb9621712010-04-24 17:59:49 +000017151test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017152 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017153
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
17155# configure is writing to config.log, and then calls config.status.
17156# config.status does its own redirection, appending to config.log.
17157# Unfortunately, on DOS this fails, as config.log is still kept open
17158# by configure, so config.status won't be able to write to it; its
17159# output is simply discarded. So we exec the FD to /dev/null,
17160# effectively closing config.log, so it can be properly (re)opened and
17161# appended to by config.status. When coming back to configure, we
17162# need to make the FD available again.
17163if test "$no_create" != yes; then
17164 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017165 ac_config_status_args=
17166 test "$silent" = yes &&
17167 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017169 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017170 exec 5>>config.log
17171 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17172 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017173 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017174fi
17175if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17176 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17177$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017178fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017179
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017180
Christian Heimes75ed8902013-11-20 01:11:18 +010017181echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017182if test ! -f Modules/Setup
17183then
17184 cp $srcdir/Modules/Setup.dist Modules/Setup
17185fi
17186
Christian Heimes75ed8902013-11-20 01:11:18 +010017187echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017188if test ! -f Modules/Setup.local
17189then
17190 echo "# Edit this file for local setup changes" >Modules/Setup.local
17191fi
17192
Christian Heimes75ed8902013-11-20 01:11:18 +010017193echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017194$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17195 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017196 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017197mv config.c Modules