blob: e823a083c67c415a0570189d019368dcfebb57d9 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# 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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_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
697BUILDEXEEXT
698EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200700PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200701PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200702MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200703ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000704MAINCC
705CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706GREP
707CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000708OBJEXT
709EXEEXT
710ac_ct_CC
711CPPFLAGS
712LDFLAGS
713CFLAGS
714CC
715EXPORT_MACOSX_DEPLOYMENT_TARGET
716CONFIGURE_MACOSX_DEPLOYMENT_TARGET
717SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200718_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000720FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800722FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200738PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100739host_os
740host_vendor
741host_cpu
742host
743build_os
744build_vendor
745build_cpu
746build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500747HAS_HG
748HGBRANCH
749HGTAG
750HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400751BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000752target_alias
753host_alias
754build_alias
755LIBS
756ECHO_T
757ECHO_N
758ECHO_C
759DEFS
760mandir
761localedir
762libdir
763psdir
764pdfdir
765dvidir
766htmldir
767infodir
768docdir
769oldincludedir
770includedir
771localstatedir
772sharedstatedir
773sysconfdir
774datadir
775datarootdir
776libexecdir
777sbindir
778bindir
779program_transform_name
780prefix
781exec_prefix
782PACKAGE_URL
783PACKAGE_BUGREPORT
784PACKAGE_STRING
785PACKAGE_VERSION
786PACKAGE_TARNAME
787PACKAGE_NAME
788PATH_SEPARATOR
789SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000790ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000791ac_user_opts='
792enable_option_checking
793enable_universalsdk
794with_universal_archs
795with_framework_name
796enable_framework
797with_gcc
798with_cxx_main
799with_suffix
800enable_shared
801enable_profiling
802with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100803with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100804with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_libs
806with_system_expat
807with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100808with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000809enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700810with_tcltk_includes
811with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_dbmliborder
813with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_threads
815with_thread
816enable_ipv6
817with_doc_strings
818with_tsc
819with_pymalloc
820with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_fpectl
822with_libm
823with_libc
824enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800826with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000827'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000828 ac_precious_vars='build_alias
829host_alias
830target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100831MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832CC
833CFLAGS
834LDFLAGS
835LIBS
836CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100837CPP
838PKG_CONFIG
839PKG_CONFIG_PATH
840PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844ac_init_help=
845ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000846ac_unrecognized_opts=
847ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# The variables have the same names as the options, with
849# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862x_includes=NONE
863x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000864
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879includedir='${prefix}/include'
880oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
882infodir='${datarootdir}/info'
883htmldir='${docdir}'
884dvidir='${docdir}'
885pdfdir='${docdir}'
886psdir='${docdir}'
887libdir='${exec_prefix}/lib'
888localedir='${datarootdir}/locale'
889mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 # If the previous option needs an argument, assign it.
896 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 ac_prev=
899 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200903 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
904 *=) ac_optarg= ;;
905 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Accept the important Cygnus configure options, so we can diagnose typos.
909
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 case $ac_dashdash$ac_option in
911 --)
912 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 -bindir | --bindir | --bindi | --bind | --bin | --bi)
915 ac_prev=bindir ;;
916 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 -cache-file | --cache-file | --cache-fil | --cache-fi \
925 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
926 ac_prev=cache_file ;;
927 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
928 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 cache_file=$ac_optarg ;;
930
931 --config-cache | -C)
932 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000934 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
940 | --dataroo | --dataro | --datar)
941 ac_prev=datarootdir ;;
942 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
943 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
944 datarootdir=$ac_optarg ;;
945
Guido van Rossum7f43da71994-08-01 12:15:30 +0000946 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000947 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000949 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200950 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt_orig=$ac_useropt
952 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
953 case $ac_user_opts in
954 *"
955"enable_$ac_useropt"
956"*) ;;
957 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
958 ac_unrecognized_sep=', ';;
959 esac
960 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000961
962 -docdir | --docdir | --docdi | --doc | --do)
963 ac_prev=docdir ;;
964 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
965 docdir=$ac_optarg ;;
966
967 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
968 ac_prev=dvidir ;;
969 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
970 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
972 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000973 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000974 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000975 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200976 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000977 ac_useropt_orig=$ac_useropt
978 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
979 case $ac_user_opts in
980 *"
981"enable_$ac_useropt"
982"*) ;;
983 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
984 ac_unrecognized_sep=', ';;
985 esac
986 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
989 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
990 | --exec | --exe | --ex)
991 ac_prev=exec_prefix ;;
992 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
993 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
994 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
997 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000998 # Obsolete; use --with-gas.
999 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 -help | --help | --hel | --he | -h)
1002 ac_init_help=long ;;
1003 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1004 ac_init_help=recursive ;;
1005 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1006 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1014 ac_prev=htmldir ;;
1015 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1016 | --ht=*)
1017 htmldir=$ac_optarg ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -includedir | --includedir | --includedi | --included | --include \
1020 | --includ | --inclu | --incl | --inc)
1021 ac_prev=includedir ;;
1022 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1023 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -infodir | --infodir | --infodi | --infod | --info | --inf)
1027 ac_prev=infodir ;;
1028 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -libdir | --libdir | --libdi | --libd)
1032 ac_prev=libdir ;;
1033 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1037 | --libexe | --libex | --libe)
1038 ac_prev=libexecdir ;;
1039 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1040 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 -localedir | --localedir | --localedi | --localed | --locale)
1044 ac_prev=localedir ;;
1045 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1046 localedir=$ac_optarg ;;
1047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 ac_prev=localstatedir ;;
1051 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1056 ac_prev=mandir ;;
1057 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061 # Obsolete; use --without-fp.
1062 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 no_create=yes ;;
1067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1069 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1070 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1073 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1074 | --oldin | --oldi | --old | --ol | --o)
1075 ac_prev=oldincludedir ;;
1076 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1077 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1078 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1082 ac_prev=prefix ;;
1083 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1087 | --program-pre | --program-pr | --program-p)
1088 ac_prev=program_prefix ;;
1089 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1090 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1094 | --program-suf | --program-su | --program-s)
1095 ac_prev=program_suffix ;;
1096 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1097 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-transform-name | --program-transform-name \
1101 | --program-transform-nam | --program-transform-na \
1102 | --program-transform-n | --program-transform- \
1103 | --program-transform | --program-transfor \
1104 | --program-transfo | --program-transf \
1105 | --program-trans | --program-tran \
1106 | --progr-tra | --program-tr | --program-t)
1107 ac_prev=program_transform_name ;;
1108 -program-transform-name=* | --program-transform-name=* \
1109 | --program-transform-nam=* | --program-transform-na=* \
1110 | --program-transform-n=* | --program-transform-=* \
1111 | --program-transform=* | --program-transfor=* \
1112 | --program-transfo=* | --program-transf=* \
1113 | --program-trans=* | --program-tran=* \
1114 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001117 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1118 ac_prev=pdfdir ;;
1119 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1120 pdfdir=$ac_optarg ;;
1121
1122 -psdir | --psdir | --psdi | --psd | --ps)
1123 ac_prev=psdir ;;
1124 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1125 psdir=$ac_optarg ;;
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1128 | -silent | --silent | --silen | --sile | --sil)
1129 silent=yes ;;
1130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1132 ac_prev=sbindir ;;
1133 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1134 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136
1137 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1138 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1139 | --sharedst | --shareds | --shared | --share | --shar \
1140 | --sha | --sh)
1141 ac_prev=sharedstatedir ;;
1142 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1143 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1144 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1145 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148 -site | --site | --sit)
1149 ac_prev=site ;;
1150 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1154 ac_prev=srcdir ;;
1155 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001158 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1159 | --syscon | --sysco | --sysc | --sys | --sy)
1160 ac_prev=sysconfdir ;;
1161 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1162 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1171 verbose=yes ;;
1172
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 -version | --version | --versio | --versi | --vers | -V)
1174 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt_orig=$ac_useropt
1182 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1183 case $ac_user_opts in
1184 *"
1185"with_$ac_useropt"
1186"*) ;;
1187 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1188 ac_unrecognized_sep=', ';;
1189 esac
1190 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001208 --x)
1209 # Obsolete; use --with-x.
1210 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1213 | --x-incl | --x-inc | --x-in | --x-i)
1214 ac_prev=x_includes ;;
1215 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1216 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218
1219 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1220 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1221 ac_prev=x_libraries ;;
1222 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1223 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1227Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228 ;;
1229
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 *=*)
1231 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1232 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 case $ac_envvar in #(
1234 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 export $ac_envvar ;;
1239
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001240 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001245 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
1248 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001249done
1250
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254fi
1255
Matthias Kloseb9621712010-04-24 17:59:49 +00001256if test -n "$ac_unrecognized_opts"; then
1257 case $enable_option_checking in
1258 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1261 esac
1262fi
1263
1264# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1266 datadir sysconfdir sharedstatedir localstatedir includedir \
1267 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1268 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 # Remove trailing slashes.
1272 case $ac_val in
1273 */ )
1274 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1275 eval $ac_var=\$ac_val;;
1276 esac
1277 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 [\\/$]* | ?:[\\/]* ) continue;;
1280 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001283done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Martin v. Löwis11437992002-04-12 09:54:03 +00001285# There might be people who depend on the old broken behavior: `$host'
1286# used to hold the argument of --host etc.
1287# FIXME: To remove some day.
1288build=$build_alias
1289host=$host_alias
1290target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001291
Martin v. Löwis11437992002-04-12 09:54:03 +00001292# FIXME: To remove some day.
1293if test "x$host_alias" != x; then
1294 if test "x$build_alias" = x; then
1295 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 elif test "x$build_alias" != "x$host_alias"; then
1297 cross_compiling=yes
1298 fi
1299fi
1300
1301ac_tool_prefix=
1302test -n "$host_alias" && ac_tool_prefix=$host_alias-
1303
1304test "$silent" = yes && exec 6>/dev/null
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001307ac_pwd=`pwd` && test -n "$ac_pwd" &&
1308ac_ls_di=`ls -di .` &&
1309ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001310 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001312 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315# Find the source files, if location was not specified.
1316if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001317 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001318 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001319 ac_confdir=`$as_dirname -- "$as_myself" ||
1320$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1321 X"$as_myself" : 'X\(//\)[^/]' \| \
1322 X"$as_myself" : 'X\(//\)$' \| \
1323 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1324$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)[^/].*/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\).*/{
1338 s//\1/
1339 q
1340 }
1341 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344 srcdir=..
1345 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346else
1347 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349if test ! -r "$srcdir/$ac_unique_file"; then
1350 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001351 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1354ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001355 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001356 pwd)`
1357# When building in place, set srcdir=.
1358if test "$ac_abs_confdir" = "$ac_pwd"; then
1359 srcdir=.
1360fi
1361# Remove unnecessary trailing slashes from srcdir.
1362# Double slashes in file names in object file debugging info
1363# mess up M-x gdb in Emacs.
1364case $srcdir in
1365*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1366esac
1367for ac_var in $ac_precious_vars; do
1368 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1369 eval ac_env_${ac_var}_value=\$${ac_var}
1370 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1371 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1372done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001373
Martin v. Löwis11437992002-04-12 09:54:03 +00001374#
1375# Report the --help message.
1376#
1377if test "$ac_init_help" = "long"; then
1378 # Omit some internal or obsolete options to make the list less imposing.
1379 # This message is too long to be a string in the A/UX 3.1 sh.
1380 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001381\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382
1383Usage: $0 [OPTION]... [VAR=VALUE]...
1384
1385To assign environment variables (e.g., CC, CFLAGS...), specify them as
1386VAR=VALUE. See below for descriptions of some of the useful variables.
1387
1388Defaults for the options are specified in brackets.
1389
1390Configuration:
1391 -h, --help display this help and exit
1392 --help=short display options specific to this package
1393 --help=recursive display the short help of all the included packages
1394 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001395 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --cache-file=FILE cache test results in FILE [disabled]
1397 -C, --config-cache alias for \`--cache-file=config.cache'
1398 -n, --no-create do not create output files
1399 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1400
Martin v. Löwis11437992002-04-12 09:54:03 +00001401Installation directories:
1402 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001403 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407By default, \`make install' will install all the files in
1408\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1409an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1410for instance \`--prefix=\$HOME'.
1411
1412For better control, use the options below.
1413
1414Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 --bindir=DIR user executables [EPREFIX/bin]
1416 --sbindir=DIR system admin executables [EPREFIX/sbin]
1417 --libexecdir=DIR program executables [EPREFIX/libexec]
1418 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1419 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1420 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1421 --libdir=DIR object code libraries [EPREFIX/lib]
1422 --includedir=DIR C header files [PREFIX/include]
1423 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1424 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1425 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1426 --infodir=DIR info documentation [DATAROOTDIR/info]
1427 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1428 --mandir=DIR man documentation [DATAROOTDIR/man]
1429 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1430 --htmldir=DIR html documentation [DOCDIR]
1431 --dvidir=DIR dvi documentation [DOCDIR]
1432 --pdfdir=DIR pdf documentation [DOCDIR]
1433 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434_ACEOF
1435
1436 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001437
1438System types:
1439 --build=BUILD configure for building on BUILD [guessed]
1440 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001441_ACEOF
1442fi
1443
1444if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001445 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001446 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001447 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 cat <<\_ACEOF
1449
1450Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001452 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1453 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001454 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001455 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --enable-framework[=INSTALLDIR]
1457 Build (MacOSX|Darwin) framework
1458 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001459 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001460 --enable-loadable-sqlite-extensions
1461 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-ipv6 Enable ipv6 (with ipv4) support
1463 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001464 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001465 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Optional Packages:
1468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001470 --with-universal-archs=ARCH
1471 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001472 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001473 --with-framework-name=FRAMEWORK
1474 specify an alternate name of the framework built
1475 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-cxx-main=<compiler>
1478 compile main() and link python executable with C++
1479 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-suffix=.exe set executable suffix
1481 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001482 --with-hash-algorithm=[fnv|siphash24]
1483 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001484 --with-address-sanitizer
1485 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001487 --with-system-expat build pyexpat module using an installed expat
1488 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001489 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001490 --with-system-libmpdec build _decimal module using an installed libmpdec
1491 library
Ned Deilyd819b932013-09-06 01:07:05 -07001492 --with-tcltk-includes='-I...'
1493 override search for Tcl and Tk include files
1494 --with-tcltk-libs='-L...'
1495 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001496 --with-dbmliborder=db1:db2:...
1497 order to check db backends for dbm. Valid value is a
1498 colon separated string with the backend names
1499 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-threads[=DIRECTORY]
1502 disable/enable thread support
1503 --with(out)-thread[=DIRECTORY]
1504 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001506 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001508 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-fpectl enable SIGFPE catching
1510 --with-libm=STRING math library
1511 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001512 --with(out)-computed-gotos
1513 Use computed gotos in evaluation loop (enabled by
1514 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001515 --with(out)-ensurepip=[=upgrade]
1516 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001517
1518Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001519 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 CC C compiler command
1521 CFLAGS C compiler flags
1522 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1523 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001524 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001525 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001528 PKG_CONFIG path to pkg-config utility
1529 PKG_CONFIG_PATH
1530 directories to add to pkg-config's search path
1531 PKG_CONFIG_LIBDIR
1532 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001533
1534Use these variables to override the choices made by `configure' or to help
1535it to find libraries and programs with nonstandard names/locations.
1536
Georg Brandle2e15612009-05-20 18:25:10 +00001537Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001538_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001540fi
1541
1542if test "$ac_init_help" = "recursive"; then
1543 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001545 test -d "$ac_dir" ||
1546 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1547 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 ac_builddir=.
1549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550case "$ac_dir" in
1551.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1552*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 case $ac_top_builddir_sub in
1557 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1558 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1559 esac ;;
1560esac
1561ac_abs_top_builddir=$ac_pwd
1562ac_abs_builddir=$ac_pwd$ac_dir_suffix
1563# for backward compatibility:
1564ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 ac_top_srcdir=$ac_top_builddir_sub
1570 ac_abs_top_srcdir=$ac_pwd ;;
1571 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 ac_top_srcdir=$srcdir
1574 ac_abs_top_srcdir=$srcdir ;;
1575 *) # Relative name.
1576 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1577 ac_top_srcdir=$ac_top_build_prefix$srcdir
1578 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001579esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 cd "$ac_dir" || { ac_status=$?; continue; }
1583 # Check for guested configure.
1584 if test -f "$ac_srcdir/configure.gnu"; then
1585 echo &&
1586 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1587 elif test -f "$ac_srcdir/configure"; then
1588 echo &&
1589 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 fi || ac_status=$?
1593 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 done
1595fi
1596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001598if $ac_init_version; then
1599 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001600python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001601generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001603Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604This configure script is free software; the Free Software Foundation
1605gives unlimited permission to copy, distribute and modify it.
1606_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001609
1610## ------------------------ ##
1611## Autoconf initialization. ##
1612## ------------------------ ##
1613
1614# ac_fn_c_try_compile LINENO
1615# --------------------------
1616# Try to compile conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_compile ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext
1621 if { { ac_try="$ac_compile"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_compile") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest.$ac_objext; then :
1640 ac_retval=0
1641else
1642 $as_echo "$as_me: failed program was:" >&5
1643sed 's/^/| /' conftest.$ac_ext >&5
1644
1645 ac_retval=1
1646fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001647 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001648 as_fn_set_status $ac_retval
1649
1650} # ac_fn_c_try_compile
1651
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001652# ac_fn_c_try_cpp LINENO
1653# ----------------------
1654# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1655ac_fn_c_try_cpp ()
1656{
1657 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1658 if { { ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 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; } > conftest.i && {
1674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1675 test ! -s conftest.err
1676 }; then :
1677 ac_retval=0
1678else
1679 $as_echo "$as_me: failed program was:" >&5
1680sed 's/^/| /' conftest.$ac_ext >&5
1681
1682 ac_retval=1
1683fi
1684 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1685 as_fn_set_status $ac_retval
1686
1687} # ac_fn_c_try_cpp
1688
Matthias Kloseb9621712010-04-24 17:59:49 +00001689# ac_fn_c_try_link LINENO
1690# -----------------------
1691# Try to link conftest.$ac_ext, and return whether this succeeded.
1692ac_fn_c_try_link ()
1693{
1694 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1695 rm -f conftest.$ac_objext conftest$ac_exeext
1696 if { { ac_try="$ac_link"
1697case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_link") 2>conftest.err
1704 ac_status=$?
1705 if test -s conftest.err; then
1706 grep -v '^ *+' conftest.err >conftest.er1
1707 cat conftest.er1 >&5
1708 mv -f conftest.er1 conftest.err
1709 fi
1710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1711 test $ac_status = 0; } && {
1712 test -z "$ac_c_werror_flag" ||
1713 test ! -s conftest.err
1714 } && test -s conftest$ac_exeext && {
1715 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001716 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
1725 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1726 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1727 # interfere with the next link command; also delete a directory that is
1728 # left behind by Apple's compiler. We do this before executing the actions.
1729 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 as_fn_set_status $ac_retval
1732
1733} # ac_fn_c_try_link
1734
Matthias Kloseb9621712010-04-24 17:59:49 +00001735# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1736# -------------------------------------------------------
1737# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1738# the include files in INCLUDES and setting the cache variable VAR
1739# accordingly.
1740ac_fn_c_check_header_mongrel ()
1741{
1742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1745$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001746if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 $as_echo_n "(cached) " >&6
1748fi
1749eval ac_res=\$$3
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1751$as_echo "$ac_res" >&6; }
1752else
1753 # Is the header compilable?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1755$as_echo_n "checking $2 usability... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758$4
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_compile "$LINENO"; then :
1762 ac_header_compiler=yes
1763else
1764 ac_header_compiler=no
1765fi
1766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1768$as_echo "$ac_header_compiler" >&6; }
1769
1770# Is the header present?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1772$as_echo_n "checking $2 presence... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775#include <$2>
1776_ACEOF
1777if ac_fn_c_try_cpp "$LINENO"; then :
1778 ac_header_preproc=yes
1779else
1780 ac_header_preproc=no
1781fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1784$as_echo "$ac_header_preproc" >&6; }
1785
1786# So? What about this header?
1787case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1788 yes:no: )
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1790$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1792$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1793 ;;
1794 no:yes:* )
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1796$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1798$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1800$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1802$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001806## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001807## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001808 ) | sed "s/^/$as_me: WARNING: /" >&2
1809 ;;
1810esac
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1812$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001813if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001814 $as_echo_n "(cached) " >&6
1815else
1816 eval "$3=\$ac_header_compiler"
1817fi
1818eval ac_res=\$$3
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1820$as_echo "$ac_res" >&6; }
1821fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001822 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001823
1824} # ac_fn_c_check_header_mongrel
1825
1826# ac_fn_c_try_run LINENO
1827# ----------------------
1828# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1829# that executables *can* be run.
1830ac_fn_c_try_run ()
1831{
1832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1833 if { { ac_try="$ac_link"
1834case "(($ac_try" in
1835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1836 *) ac_try_echo=$ac_try;;
1837esac
1838eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1839$as_echo "$ac_try_echo"; } >&5
1840 (eval "$ac_link") 2>&5
1841 ac_status=$?
1842 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1843 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1844 { { case "(($ac_try" in
1845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1846 *) ac_try_echo=$ac_try;;
1847esac
1848eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1849$as_echo "$ac_try_echo"; } >&5
1850 (eval "$ac_try") 2>&5
1851 ac_status=$?
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; }; }; then :
1854 ac_retval=0
1855else
1856 $as_echo "$as_me: program exited with status $ac_status" >&5
1857 $as_echo "$as_me: failed program was:" >&5
1858sed 's/^/| /' conftest.$ac_ext >&5
1859
1860 ac_retval=$ac_status
1861fi
1862 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001864 as_fn_set_status $ac_retval
1865
1866} # ac_fn_c_try_run
1867
1868# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1869# -------------------------------------------------------
1870# Tests whether HEADER exists and can be compiled using the include files in
1871# INCLUDES, setting the cache variable VAR accordingly.
1872ac_fn_c_check_header_compile ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001877if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001878 $as_echo_n "(cached) " >&6
1879else
1880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1881/* end confdefs.h. */
1882$4
1883#include <$2>
1884_ACEOF
1885if ac_fn_c_try_compile "$LINENO"; then :
1886 eval "$3=yes"
1887else
1888 eval "$3=no"
1889fi
1890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1891fi
1892eval ac_res=\$$3
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1894$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896
1897} # ac_fn_c_check_header_compile
1898
Matthias Kloseb9621712010-04-24 17:59:49 +00001899# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1900# -------------------------------------------
1901# Tests whether TYPE exists after having included INCLUDES, setting cache
1902# variable VAR accordingly.
1903ac_fn_c_check_type ()
1904{
1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1907$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001909 $as_echo_n "(cached) " >&6
1910else
1911 eval "$3=no"
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof ($2))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof (($2)))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938
1939else
1940 eval "$3=yes"
1941fi
1942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1943fi
1944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1945fi
1946eval ac_res=\$$3
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1948$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001950
1951} # ac_fn_c_check_type
1952
1953# ac_fn_c_find_uintX_t LINENO BITS VAR
1954# ------------------------------------
1955# Finds an unsigned integer type with width BITS, setting cache variable VAR
1956# accordingly.
1957ac_fn_c_find_uintX_t ()
1958{
1959 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1961$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001963 $as_echo_n "(cached) " >&6
1964else
1965 eval "$3=no"
1966 # Order is important - never check a type that is potentially smaller
1967 # than half of the expected target width.
1968 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1969 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1971/* end confdefs.h. */
1972$ac_includes_default
1973int
1974main ()
1975{
1976static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001977test_array [0] = 0;
1978return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980 ;
1981 return 0;
1982}
1983_ACEOF
1984if ac_fn_c_try_compile "$LINENO"; then :
1985 case $ac_type in #(
1986 uint$2_t) :
1987 eval "$3=yes" ;; #(
1988 *) :
1989 eval "$3=\$ac_type" ;;
1990esac
1991fi
1992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001993 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001994
1995else
1996 break
1997fi
1998 done
1999fi
2000eval ac_res=\$$3
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2002$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005} # ac_fn_c_find_uintX_t
2006
2007# ac_fn_c_find_intX_t LINENO BITS VAR
2008# -----------------------------------
2009# Finds a signed integer type with width BITS, setting cache variable VAR
2010# accordingly.
2011ac_fn_c_find_intX_t ()
2012{
2013 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2015$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017 $as_echo_n "(cached) " >&6
2018else
2019 eval "$3=no"
2020 # Order is important - never check a type that is potentially smaller
2021 # than half of the expected target width.
2022 for ac_type in int$2_t 'int' 'long int' \
2023 'long long int' 'short int' 'signed char'; do
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002044int
2045main ()
2046{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002047static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002048 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057
2058else
2059 case $ac_type in #(
2060 int$2_t) :
2061 eval "$3=yes" ;; #(
2062 *) :
2063 eval "$3=\$ac_type" ;;
2064esac
2065fi
2066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2067fi
2068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002069 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002070
2071else
2072 break
2073fi
2074 done
2075fi
2076eval ac_res=\$$3
2077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002079 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002080
2081} # ac_fn_c_find_intX_t
2082
2083# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2084# --------------------------------------------
2085# Tries to find the compile-time value of EXPR in a program that includes
2086# INCLUDES, setting VAR accordingly. Returns whether the value could be
2087# computed
2088ac_fn_c_compute_int ()
2089{
2090 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2091 if test "$cross_compiling" = yes; then
2092 # Depending upon the size, compute the lo and hi bounds.
2093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_lo=0 ac_mid=0
2109 while :; do
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=$ac_mid; break
2126else
2127 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2128 if test $ac_lo -le $ac_mid; then
2129 ac_lo= ac_hi=
2130 break
2131 fi
2132 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2133fi
2134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 done
2136else
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_hi=-1 ac_mid=-1
2153 while :; do
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_lo=$ac_mid; break
2170else
2171 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2172 if test $ac_mid -le $ac_hi; then
2173 ac_lo= ac_hi=
2174 break
2175 fi
2176 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179 done
2180else
2181 ac_lo= ac_hi=
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184fi
2185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2186# Binary search between lo and hi bounds.
2187while test "x$ac_lo" != "x$ac_hi"; do
2188 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191$4
2192int
2193main ()
2194{
2195static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002196test_array [0] = 0;
2197return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002198
2199 ;
2200 return 0;
2201}
2202_ACEOF
2203if ac_fn_c_try_compile "$LINENO"; then :
2204 ac_hi=$ac_mid
2205else
2206 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209done
2210case $ac_lo in #((
2211?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2212'') ac_retval=1 ;;
2213esac
2214 else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$4
2218static long int longval () { return $2; }
2219static unsigned long int ulongval () { return $2; }
2220#include <stdio.h>
2221#include <stdlib.h>
2222int
2223main ()
2224{
2225
2226 FILE *f = fopen ("conftest.val", "w");
2227 if (! f)
2228 return 1;
2229 if (($2) < 0)
2230 {
2231 long int i = longval ();
2232 if (i != ($2))
2233 return 1;
2234 fprintf (f, "%ld", i);
2235 }
2236 else
2237 {
2238 unsigned long int i = ulongval ();
2239 if (i != ($2))
2240 return 1;
2241 fprintf (f, "%lu", i);
2242 }
2243 /* Do not output a trailing newline, as this causes \r\n confusion
2244 on some platforms. */
2245 return ferror (f) || fclose (f) != 0;
2246
2247 ;
2248 return 0;
2249}
2250_ACEOF
2251if ac_fn_c_try_run "$LINENO"; then :
2252 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2253else
2254 ac_retval=1
2255fi
2256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2257 conftest.$ac_objext conftest.beam conftest.$ac_ext
2258rm -f conftest.val
2259
2260 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002261 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 as_fn_set_status $ac_retval
2263
2264} # ac_fn_c_compute_int
2265
2266# ac_fn_c_check_func LINENO FUNC VAR
2267# ----------------------------------
2268# Tests whether FUNC exists, setting the cache variable VAR accordingly
2269ac_fn_c_check_func ()
2270{
2271 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2273$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002274if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 $as_echo_n "(cached) " >&6
2276else
2277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2278/* end confdefs.h. */
2279/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2280 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2281#define $2 innocuous_$2
2282
2283/* System header to define __stub macros and hopefully few prototypes,
2284 which can conflict with char $2 (); below.
2285 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2286 <limits.h> exists even on freestanding compilers. */
2287
2288#ifdef __STDC__
2289# include <limits.h>
2290#else
2291# include <assert.h>
2292#endif
2293
2294#undef $2
2295
2296/* Override any GCC internal prototype to avoid an error.
2297 Use char because int might match the return type of a GCC
2298 builtin and then its argument prototype would still apply. */
2299#ifdef __cplusplus
2300extern "C"
2301#endif
2302char $2 ();
2303/* The GNU C library defines this for functions which it implements
2304 to always fail with ENOSYS. Some functions are actually named
2305 something starting with __ and the normal name is an alias. */
2306#if defined __stub_$2 || defined __stub___$2
2307choke me
2308#endif
2309
2310int
2311main ()
2312{
2313return $2 ();
2314 ;
2315 return 0;
2316}
2317_ACEOF
2318if ac_fn_c_try_link "$LINENO"; then :
2319 eval "$3=yes"
2320else
2321 eval "$3=no"
2322fi
2323rm -f core conftest.err conftest.$ac_objext \
2324 conftest$ac_exeext conftest.$ac_ext
2325fi
2326eval ac_res=\$$3
2327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2328$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002329 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002330
2331} # ac_fn_c_check_func
2332
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002333# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2334# ---------------------------------------------
2335# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2336# accordingly.
2337ac_fn_c_check_decl ()
2338{
2339 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2340 as_decl_name=`echo $2|sed 's/ *(.*//'`
2341 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2343$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2344if eval \${$3+:} false; then :
2345 $as_echo_n "(cached) " >&6
2346else
2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2348/* end confdefs.h. */
2349$4
2350int
2351main ()
2352{
2353#ifndef $as_decl_name
2354#ifdef __cplusplus
2355 (void) $as_decl_use;
2356#else
2357 (void) $as_decl_name;
2358#endif
2359#endif
2360
2361 ;
2362 return 0;
2363}
2364_ACEOF
2365if ac_fn_c_try_compile "$LINENO"; then :
2366 eval "$3=yes"
2367else
2368 eval "$3=no"
2369fi
2370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2371fi
2372eval ac_res=\$$3
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2374$as_echo "$ac_res" >&6; }
2375 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2376
2377} # ac_fn_c_check_decl
2378
Matthias Kloseb9621712010-04-24 17:59:49 +00002379# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2380# ----------------------------------------------------
2381# Tries to find if the field MEMBER exists in type AGGR, after including
2382# INCLUDES, setting cache variable VAR accordingly.
2383ac_fn_c_check_member ()
2384{
2385 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2387$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002388if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002389 $as_echo_n "(cached) " >&6
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2408/* end confdefs.h. */
2409$5
2410int
2411main ()
2412{
2413static $2 ac_aggr;
2414if (sizeof ac_aggr.$3)
2415return 0;
2416 ;
2417 return 0;
2418}
2419_ACEOF
2420if ac_fn_c_try_compile "$LINENO"; then :
2421 eval "$4=yes"
2422else
2423 eval "$4=no"
2424fi
2425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428fi
2429eval ac_res=\$$4
2430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2431$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002432 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002433
2434} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002435cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002436This file contains any messages produced by compilers while
2437running configure, to aid debugging if configure makes a mistake.
2438
Yury Selivanov7aa53412015-05-30 10:57:56 -04002439It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002440generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442 $ $0 $@
2443
2444_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002446{
2447cat <<_ASUNAME
2448## --------- ##
2449## Platform. ##
2450## --------- ##
2451
2452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2453uname -m = `(uname -m) 2>/dev/null || echo unknown`
2454uname -r = `(uname -r) 2>/dev/null || echo unknown`
2455uname -s = `(uname -s) 2>/dev/null || echo unknown`
2456uname -v = `(uname -v) 2>/dev/null || echo unknown`
2457
2458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2460
2461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2468
2469_ASUNAME
2470
2471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 $as_echo "PATH: $as_dir"
2477 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002479
2480} >&5
2481
2482cat >&5 <<_ACEOF
2483
2484
2485## ----------- ##
2486## Core tests. ##
2487## ----------- ##
2488
2489_ACEOF
2490
2491
2492# Keep a trace of the command line.
2493# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002495# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002496# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002497ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002498ac_configure_args0=
2499ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002500ac_must_keep_next=false
2501for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002502do
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 for ac_arg
2504 do
2505 case $ac_arg in
2506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2508 | -silent | --silent | --silen | --sile | --sil)
2509 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 esac
2513 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002520 case $ac_arg in
2521 *=* | --config-cache | -C | -disable-* | --disable-* \
2522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2524 | -with-* | --with-* | -without-* | --without-* | --x)
2525 case "$ac_configure_args0 " in
2526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2527 esac
2528 ;;
2529 -* ) ac_must_keep_next=true ;;
2530 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
Matthias Kloseb9621712010-04-24 17:59:49 +00002537{ ac_configure_args0=; unset ac_configure_args0;}
2538{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
2540# When interrupted or exit'd, cleanup temporary files, and complete
2541# config.log. We remove comments because anyway the quotes in there
2542# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543# WARNING: Use '\'' to represent an apostrophe within the trap.
2544# 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 +00002545trap 'exit_status=$?
2546 # Save into config.log some information that might help in debugging.
2547 {
2548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002551## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 echo
2554 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555(
2556 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2557 eval ac_val=\$$ac_var
2558 case $ac_val in #(
2559 *${as_nl}*)
2560 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2562$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 esac
2564 case $ac_var in #(
2565 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002566 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2567 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac ;;
2569 esac
2570 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2573 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 "s/'\''/'\''\\\\'\'''\''/g;
2576 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2577 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002578 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002580 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac |
2582 sort
2583)
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002585
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002587## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 echo
2590 for ac_var in $ac_subst_vars
2591 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 eval ac_val=\$$ac_var
2593 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 done | sort
2598 echo
2599
2600 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002604 echo
2605 for ac_var in $ac_subst_files
2606 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 eval ac_val=\$$ac_var
2608 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002610 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002611 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 done | sort
2613 echo
2614 fi
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002617 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002618## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002619## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 echo
2623 fi
2624 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002625 $as_echo "$as_me: caught signal $ac_signal"
2626 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 rm -f core *.core core.conftest.* &&
2629 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002632for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002634done
2635ac_signal=0
2636
2637# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
Matthias Kloseb9621712010-04-24 17:59:49 +00002640$as_echo "/* confdefs.h */" > confdefs.h
2641
Martin v. Löwis11437992002-04-12 09:54:03 +00002642# Predefined preprocessor variables.
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_NAME "$PACKAGE_NAME"
2646_ACEOF
2647
Martin v. Löwis11437992002-04-12 09:54:03 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_VERSION "$PACKAGE_VERSION"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_STRING "$PACKAGE_STRING"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2662_ACEOF
2663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_URL "$PACKAGE_URL"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668
2669# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670# Prefer an explicitly selected file to automatically selected ones.
2671ac_site_file1=NONE
2672ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 # We do not want a PATH search for config.site.
2675 case $CONFIG_SITE in #((
2676 -*) ac_site_file1=./$CONFIG_SITE;;
2677 */*) ac_site_file1=$CONFIG_SITE;;
2678 *) ac_site_file1=./$CONFIG_SITE;;
2679 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002681 ac_site_file1=$prefix/share/config.site
2682 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683else
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 ac_site_file1=$ac_default_prefix/share/config.site
2685 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002687for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002688do
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 test "x$ac_site_file" = xNONE && continue
2690 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2691 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2692$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002694 . "$ac_site_file" \
2695 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2696$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2697as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002698See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699 fi
2700done
2701
2702if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # Some versions of bash will fail to source /dev/null (special files
2704 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2705 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2707$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2710 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 esac
2712 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002713else
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2715$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 >$cache_file
2717fi
2718
2719# Check that the precious variables saved in the cache have kept the same
2720# value.
2721ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2724 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002725 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2726 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 case $ac_old_set,$ac_new_set in
2728 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2730$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 +00002731 ac_cache_corrupted=: ;;
2732 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2734$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_cache_corrupted=: ;;
2736 ,);;
2737 *)
2738 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002739 # differences in whitespace do not lead to failure.
2740 ac_old_val_w=`echo x $ac_old_val`
2741 ac_new_val_w=`echo x $ac_new_val`
2742 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2744$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2745 ac_cache_corrupted=:
2746 else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2748$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2749 eval $ac_var=\$ac_old_val
2750 fi
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2752$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2753 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2754$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 fi;;
2756 esac
2757 # Pass precious variables to config.status.
2758 if test "$ac_new_set" = set; then
2759 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002760 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 *) ac_arg=$ac_var=$ac_new_val ;;
2762 esac
2763 case " $ac_configure_args " in
2764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 esac
2767 fi
2768done
2769if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2773$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002774 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002776## -------------------- ##
2777## Main body of script. ##
2778## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002779
Guido van Rossum7f43da71994-08-01 12:15:30 +00002780ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002781ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2784ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002785
Guido van Rossum627b2d71993-12-24 10:39:16 +00002786
Michael W. Hudson54241132001-12-07 15:38:26 +00002787
Trent Nelson4d4ec652012-10-16 08:51:24 -04002788
Trent Nelson5595ab52012-10-17 04:47:31 -04002789if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002790 # If we're building out-of-tree, we need to make sure the following
2791 # resources get picked up before their $srcdir counterparts.
2792 # Objects/ -> typeslots.inc
2793 # Include/ -> Python-ast.h, graminit.h
2794 # Python/ -> importlib.h
2795 # (A side effect of this is that these resources will automatically be
2796 # regenerated when building out-of-tree, regardless of whether or not
2797 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2798 # off.)
2799 BASECPPFLAGS="-IObjects -IInclude -IPython"
2800else
2801 BASECPPFLAGS=""
2802fi
2803
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804
2805
2806
2807
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002808if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002809then
2810# Extract the first word of "hg", so it can be a program name with args.
2811set dummy hg; ac_word=$2
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2813$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002814if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815 $as_echo_n "(cached) " >&6
2816else
2817 if test -n "$HAS_HG"; then
2818 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2819else
2820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2821for as_dir in $PATH
2822do
2823 IFS=$as_save_IFS
2824 test -z "$as_dir" && as_dir=.
2825 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 ac_cv_prog_HAS_HG="found"
2828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2829 break 2
2830 fi
2831done
2832 done
2833IFS=$as_save_IFS
2834
2835 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2836fi
2837fi
2838HAS_HG=$ac_cv_prog_HAS_HG
2839if test -n "$HAS_HG"; then
2840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2841$as_echo "$HAS_HG" >&6; }
2842else
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
2845fi
2846
2847
2848else
2849HAS_HG=no-repository
2850fi
2851if test $HAS_HG = found
2852then
2853 HGVERSION="hg id -i \$(srcdir)"
2854 HGTAG="hg id -t \$(srcdir)"
2855 HGBRANCH="hg id -b \$(srcdir)"
2856else
2857 HGVERSION=""
2858 HGTAG=""
2859 HGBRANCH=""
2860fi
2861
2862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002863ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002864
2865
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002866ac_aux_dir=
2867for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2868 if test -f "$ac_dir/install-sh"; then
2869 ac_aux_dir=$ac_dir
2870 ac_install_sh="$ac_aux_dir/install-sh -c"
2871 break
2872 elif test -f "$ac_dir/install.sh"; then
2873 ac_aux_dir=$ac_dir
2874 ac_install_sh="$ac_aux_dir/install.sh -c"
2875 break
2876 elif test -f "$ac_dir/shtool"; then
2877 ac_aux_dir=$ac_dir
2878 ac_install_sh="$ac_aux_dir/shtool install -c"
2879 break
2880 fi
2881done
2882if test -z "$ac_aux_dir"; then
2883 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2884fi
2885
2886# These three variables are undocumented and unsupported,
2887# and are intended to be withdrawn in a future Autoconf release.
2888# They can cause serious problems if a builder's source tree is in a directory
2889# whose full name contains unusual characters.
2890ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2891ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2892ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2893
2894
2895# Make sure we can run config.sub.
2896$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2897 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2898
2899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2900$as_echo_n "checking build system type... " >&6; }
2901if ${ac_cv_build+:} false; then :
2902 $as_echo_n "(cached) " >&6
2903else
2904 ac_build_alias=$build_alias
2905test "x$ac_build_alias" = x &&
2906 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2907test "x$ac_build_alias" = x &&
2908 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2909ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2910 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2911
2912fi
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2914$as_echo "$ac_cv_build" >&6; }
2915case $ac_cv_build in
2916*-*-*) ;;
2917*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2918esac
2919build=$ac_cv_build
2920ac_save_IFS=$IFS; IFS='-'
2921set x $ac_cv_build
2922shift
2923build_cpu=$1
2924build_vendor=$2
2925shift; shift
2926# Remember, the first character of IFS is used to create $*,
2927# except with old shells:
2928build_os=$*
2929IFS=$ac_save_IFS
2930case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2931
2932
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2934$as_echo_n "checking host system type... " >&6; }
2935if ${ac_cv_host+:} false; then :
2936 $as_echo_n "(cached) " >&6
2937else
2938 if test "x$host_alias" = x; then
2939 ac_cv_host=$ac_cv_build
2940else
2941 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2942 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2943fi
2944
2945fi
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2947$as_echo "$ac_cv_host" >&6; }
2948case $ac_cv_host in
2949*-*-*) ;;
2950*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2951esac
2952host=$ac_cv_host
2953ac_save_IFS=$IFS; IFS='-'
2954set x $ac_cv_host
2955shift
2956host_cpu=$1
2957host_vendor=$2
2958shift; shift
2959# Remember, the first character of IFS is used to create $*,
2960# except with old shells:
2961host_os=$*
2962IFS=$ac_save_IFS
2963case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2964
2965
2966
doko@python.orga10e4a92013-01-25 18:45:12 +01002967
2968
Ned Deilyfcbc2462014-08-22 13:32:49 -07002969# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2970rm -f pybuilddir.txt
2971
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972if test "$cross_compiling" = yes; then
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2974$as_echo_n "checking for python interpreter for cross build... " >&6; }
2975 if test -z "$PYTHON_FOR_BUILD"; then
2976 for interp in python$PACKAGE_VERSION python3 python; do
2977 which $interp >/dev/null 2>&1 || continue
2978 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2979 break
2980 fi
2981 interp=
2982 done
2983 if test x$interp = x; then
2984 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2985 fi
2986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2987$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002988 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 +02002989 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002990elif test "$cross_compiling" = maybe; then
2991 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002992else
2993 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2994fi
2995
2996
Martin v. Löwis11437992002-04-12 09:54:03 +00002997
Benjamin Petersond23f8222009-04-05 19:13:16 +00002998if test "$prefix" != "/"; then
2999 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3000fi
3001
3002
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
3004
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003005# We don't use PACKAGE_ variables, and they cause conflicts
3006# with other autoconf-based packages that include Python.h
3007grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3008rm confdefs.h
3009mv confdefs.h.new confdefs.h
3010
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003011
Yury Selivanov7aa53412015-05-30 10:57:56 -04003012VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003013
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003014# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003015
3016SOVERSION=1.0
3017
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003018# The later defininition of _XOPEN_SOURCE disables certain features
3019# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003022
3023
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003029
3030
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003031# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3032# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3033# them.
3034
Matthias Kloseb9621712010-04-24 17:59:49 +00003035$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003036
3037
Martin v. Löwisd6320502004-08-12 13:45:08 +00003038# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3039# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3040
Matthias Kloseb9621712010-04-24 17:59:49 +00003041$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003042
3043
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003044# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3045# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3046# them.
3047
Matthias Kloseb9621712010-04-24 17:59:49 +00003048$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003049
3050
3051
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003052define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003053
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003054# Arguments passed to configure.
3055
3056CONFIG_ARGS="$ac_configure_args"
3057
Matthias Kloseb9621712010-04-24 17:59:49 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3059$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003061if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063 case $enableval in
3064 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 # Locate the best usable SDK, see Mac/README.txt for more
3066 # information
3067 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003068 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003070 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3071 if test ! -d "${enableval}"
3072 then
3073 enableval=/
3074 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003075 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003076 ;;
3077 esac
3078 case $enableval in
3079 no)
3080 UNIVERSALSDK=
3081 enable_universalsdk=
3082 ;;
3083 *)
3084 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085 if test ! -d "${UNIVERSALSDK}"
3086 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003087 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089 ;;
3090 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003091
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003092
Thomas Wouters477c8d52006-05-27 19:21:47 +00003093else
3094
3095 UNIVERSALSDK=
3096 enable_universalsdk=
3097
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003098fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003099
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100if test -n "${UNIVERSALSDK}"
3101then
Matthias Kloseb9621712010-04-24 17:59:49 +00003102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3103$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104else
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3106$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003107fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003110
Ned Deily87adb6e2013-10-18 21:09:56 -07003111ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003112
Ned Deilycbfb9a52012-06-23 16:02:19 -07003113# For backward compatibility reasons we prefer to select '32-bit' if available,
3114# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003116if test "`uname -s`" = "Darwin"
3117then
3118 if test -n "${UNIVERSALSDK}"
3119 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003120 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003121 then
3122 UNIVERSAL_ARCHS="intel"
3123 fi
3124 fi
3125fi
3126
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003127
Matthias Kloseb9621712010-04-24 17:59:49 +00003128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3129$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
3131# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003132if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003133 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003134 UNIVERSAL_ARCHS="$withval"
3135
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003136fi
3137
Ned Deily87adb6e2013-10-18 21:09:56 -07003138if test -n "${UNIVERSALSDK}"
3139then
3140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3141$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3142else
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3144$as_echo "no" >&6; }
3145fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003147
3148# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003149if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003150 withval=$with_framework_name;
3151 PYTHONFRAMEWORK=${withval}
3152 PYTHONFRAMEWORKDIR=${withval}.framework
3153 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3154
3155else
3156
3157 PYTHONFRAMEWORK=Python
3158 PYTHONFRAMEWORKDIR=Python.framework
3159 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3160
3161fi
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003164if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003166 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003167 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003168 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 esac
3170 case $enableval in
3171 no)
3172 PYTHONFRAMEWORK=
3173 PYTHONFRAMEWORKDIR=no-framework
3174 PYTHONFRAMEWORKPREFIX=
3175 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176 FRAMEWORKINSTALLFIRST=
3177 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 FRAMEWORKALTINSTALLFIRST=
3179 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003180 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 if test "x${prefix}" = "xNONE"; then
3182 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3183 else
3184 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3185 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003187 ;;
3188 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003189 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003190 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003192 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3194 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003195 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003197
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003198 if test "x${prefix}" = "xNONE" ; then
3199 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003200
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003204
3205 case "${enableval}" in
3206 /System*)
3207 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3208 if test "${prefix}" = "NONE" ; then
3209 # See below
3210 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3211 fi
3212 ;;
3213
3214 /Library*)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217
3218 */Library/Frameworks)
3219 MDIR="`dirname "${enableval}"`"
3220 MDIR="`dirname "${MDIR}"`"
3221 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3222
3223 if test "${prefix}" = "NONE"; then
3224 # User hasn't specified the
3225 # --prefix option, but wants to install
3226 # the framework in a non-default location,
3227 # ensure that the compatibility links get
3228 # installed relative to that prefix as well
3229 # instead of in /usr/local.
3230 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3231 fi
3232 ;;
3233
3234 *)
3235 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3236 ;;
3237 esac
3238
Jack Jansen127e56e2001-09-11 14:41:54 +00003239 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003241 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003244
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003245 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003246
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003247 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3248
3249 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3250
Jack Jansene578a632001-08-15 01:27:14 +00003251 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003252
Guido van Rossum563e7081996-09-10 18:20:48 +00003253else
Martin v. Löwis11437992002-04-12 09:54:03 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003257 PYTHONFRAMEWORKPREFIX=
3258 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003259 FRAMEWORKINSTALLFIRST=
3260 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261 FRAMEWORKALTINSTALLFIRST=
3262 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003263 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3266 else
3267 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3268 fi
Jack Jansene578a632001-08-15 01:27:14 +00003269 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003271
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272fi
3273
Thomas Wouters477c8d52006-05-27 19:21:47 +00003274
3275
Michael W. Hudson54241132001-12-07 15:38:26 +00003276
3277
3278
3279
Jack Jansene578a632001-08-15 01:27:14 +00003280
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003281
3282
3283
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003284
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003285
Ned Deilyb8f944f2013-11-21 22:42:25 -08003286
Jack Jansene578a632001-08-15 01:27:14 +00003287##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003288## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003289## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003290##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291# Set name for machine-dependent library files
3292
Matthias Kloseb9621712010-04-24 17:59:49 +00003293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3294$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295if test -z "$MACHDEP"
3296then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 # avoid using uname for cross builds
3298 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003299 # ac_sys_system and ac_sys_release are used for setting
3300 # a lot of different things including 'define_xopen_source'
3301 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 case "$host" in
3303 *-*-linux*)
3304 ac_sys_system=Linux
3305 ;;
3306 *-*-cygwin*)
3307 ac_sys_system=Cygwin
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 ac_sys_release=
3315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003317 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003318 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003319 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003320 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003321 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003322 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003323 fi
3324 ac_md_system=`echo $ac_sys_system |
3325 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3326 ac_md_release=`echo $ac_sys_release |
3327 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3328 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003329
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003330 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003331 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003332 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003333 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003334 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003335 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003336 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337fi
Guido van Rossum91922671997-10-09 20:24:13 +00003338
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003339
3340if test "$cross_compiling" = yes; then
3341 case "$host" in
3342 *-*-linux*)
3343 case "$host_cpu" in
3344 arm*)
3345 _host_cpu=arm
3346 ;;
3347 *)
3348 _host_cpu=$host_cpu
3349 esac
3350 ;;
3351 *-*-cygwin*)
3352 _host_cpu=
3353 ;;
3354 *)
3355 # for now, limit cross builds to known configurations
3356 MACHDEP="unknown"
3357 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3358 esac
3359 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3360fi
3361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3363# disable features if it is defined, without any means to access these
3364# features as extensions. For these systems, we skip the definition of
3365# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3366# some feature, make sure there is no alternative way to access this
3367# feature. Also, when using wildcards, make sure you have verified the
3368# need for not defining _XOPEN_SOURCE on all systems matching the
3369# wildcard, and that the wildcard does not include future systems
3370# (which may remove their limitations).
3371case $ac_sys_system/$ac_sys_release in
3372 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3373 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003374 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003375 # In addition, Stefan Krah confirms that issue #1244610 exists through
3376 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003377 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003378 define_xopen_source=no
3379 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3380 # also defined. This can be overridden by defining _BSD_SOURCE
3381 # As this has a different meaning on Linux, only define it on OpenBSD
3382
Matthias Kloseb9621712010-04-24 17:59:49 +00003383$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003384
3385 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003386 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3388 # also defined. This can be overridden by defining _BSD_SOURCE
3389 # As this has a different meaning on Linux, only define it on OpenBSD
3390
Matthias Kloseb9621712010-04-24 17:59:49 +00003391$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003392
3393 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003394 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3395 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3396 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003397 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 +00003398 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003399 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3400 # request to enable features supported by the standard as a request
3401 # to disable features not supported by the standard. The best way
3402 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3403 # entirely and define __EXTENSIONS__ instead.
3404 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003405 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003406 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3407 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003408 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003409 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003410 define_xopen_source=no;;
3411 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003412 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003413 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003414 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003415 # On FreeBSD 4, the math functions C89 does not cover are never defined
3416 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3417 FreeBSD/4.*)
3418 define_xopen_source=no;;
3419 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3420 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3421 # identifies itself as Darwin/7.*
3422 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3423 # disables platform specific features beyond repair.
3424 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3425 # has no effect, don't bother defining them
3426 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003427 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003428 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3431 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3432 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003433 AIX/4)
3434 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003435 AIX/5)
3436 if test `uname -r` -eq 1; then
3437 define_xopen_source=no
3438 fi
3439 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003440 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3441 # defining NI_NUMERICHOST.
3442 QNX/6.3.2)
3443 define_xopen_source=no
3444 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446esac
3447
3448if test $define_xopen_source = yes
3449then
Victor Stinner14d098d2011-09-07 22:29:43 +02003450 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003451
Victor Stinner14d098d2011-09-07 22:29:43 +02003452$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003453
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
3455 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3456 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3457 # several APIs are not declared. Since this is also needed in some
3458 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003459
Matthias Kloseb9621712010-04-24 17:59:49 +00003460$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003461
3462
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003463
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003464$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003465
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003466fi
3467
Christian Heimes647cd872013-12-07 23:39:33 +01003468# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3469case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003470 hp*|HP*)
3471 define_stdc_a1=yes;;
3472 *)
3473 define_stdc_a1=no;;
3474esac
3475
3476if test $define_stdc_a1 = yes
3477then
Christian Heimes647cd872013-12-07 23:39:33 +01003478
3479$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3480
Christian Heimesb02bcae2013-12-08 15:21:08 +01003481fi
Christian Heimes647cd872013-12-07 23:39:33 +01003482
Guido van Rossum91922671997-10-09 20:24:13 +00003483#
3484# SGI compilers allow the specification of the both the ABI and the
3485# ISA on the command line. Depending on the values of these switches,
3486# different and often incompatable code will be generated.
3487#
3488# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3489# thus supply support for various ABI/ISA combinations. The MACHDEP
3490# variable is also adjusted.
3491#
3492
3493if test ! -z "$SGI_ABI"
3494then
3495 CC="cc $SGI_ABI"
3496 LDFLAGS="$SGI_ABI $LDFLAGS"
3497 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3500$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003501
Jack Jansen6b08a402004-06-03 12:41:45 +00003502# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3503# it may influence the way we can build extensions, so distutils
3504# needs to check it
3505
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506
Jack Jansen6b08a402004-06-03 12:41:45 +00003507CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003508EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003509
Guido van Rossum627b2d71993-12-24 10:39:16 +00003510# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003511
3512# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3513# for debug/optimization stuff. BASECFLAGS is for flags that are required
3514# just to get things to compile and link. Users are free to override OPT
3515# when running configure or make. The build should not break if they do.
3516# BASECFLAGS should generally not be messed with, however.
3517
3518# XXX shouldn't some/most/all of this code be merged with the stuff later
3519# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3521$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003524if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003526 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003527 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003528 without_gcc=yes;;
3529 yes) CC=gcc
3530 without_gcc=no;;
3531 *) CC=$withval
3532 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003533 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003534else
Martin v. Löwis11437992002-04-12 09:54:03 +00003535
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003536 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003537 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003538 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003539 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003540 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003541fi
3542
Matthias Kloseb9621712010-04-24 17:59:49 +00003543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3544$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003545
Guido van Rossum8b131c51995-03-09 14:10:13 +00003546# If the user switches compilers, we can't believe the cache
3547if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3548then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003549 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003550(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003551fi
3552
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003553# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3554# when the compiler supports them, but we don't always want -O2, and
3555# we set -g later.
3556if test -z "$CFLAGS"; then
3557 CFLAGS=
3558fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003559
3560if test "$ac_sys_system" = "Darwin"
3561then
3562 # Compiler selection on MacOSX is more complicated than
3563 # AC_PROG_CC can handle, see Mac/README.txt for more
3564 # information
3565 if test -z "${CC}"
3566 then
3567 found_gcc=
3568 found_clang=
3569 as_save_IFS=$IFS; IFS=:
3570 for as_dir in $PATH
3571 do
3572 IFS=$as_save_IFS
3573 if test -x $as_dir/gcc; then
3574 if test -z "${found_gcc}"; then
3575 found_gcc=$as_dir/gcc
3576 fi
3577 fi
3578 if test -x $as_dir/clang; then
3579 if test -z "${found_clang}"; then
3580 found_clang=$as_dir/clang
3581 fi
3582 fi
3583 done
3584 IFS=$as_save_IFS
3585
3586 if test -n "$found_gcc" -a -n "$found_clang"
3587 then
3588 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3591$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3592 CC="$found_clang"
3593 CXX="$found_clang++"
3594 fi
3595
3596
3597 elif test -z "$found_gcc" -a -n "$found_clang"
3598 then
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3600$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3601 CC="$found_clang"
3602 CXX="$found_clang++"
3603
3604 elif test -z "$found_gcc" -a -z "$found_clang"
3605 then
3606 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3607 if test -n "${found_clang}"
3608 then
3609 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3610$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3611 CC="${found_clang}"
3612 CXX="`/usr/bin/xcrun -find clang++`"
3613
3614 # else: use default behaviour
3615 fi
3616 fi
3617 fi
3618fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003619ac_ext=c
3620ac_cpp='$CPP $CPPFLAGS'
3621ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3622ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3623ac_compiler_gnu=$ac_cv_c_compiler_gnu
3624if test -n "$ac_tool_prefix"; then
3625 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3626set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3628$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003629if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631else
3632 if test -n "$CC"; then
3633 ac_cv_prog_CC="$CC" # Let the user override the test.
3634else
Martin v. Löwis11437992002-04-12 09:54:03 +00003635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3636for as_dir in $PATH
3637do
3638 IFS=$as_save_IFS
3639 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003642 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 $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 +00003644 break 2
3645 fi
3646done
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003649
Jack Jansendd19cf82001-12-06 22:36:17 +00003650fi
3651fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003652CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003653if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3655$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003656else
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3658$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663if test -z "$ac_cv_prog_CC"; then
3664 ac_ct_CC=$CC
3665 # Extract the first word of "gcc", so it can be a program name with args.
3666set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3668$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003669if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003671else
3672 if test -n "$ac_ct_CC"; then
3673 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3674else
3675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3676for as_dir in $PATH
3677do
3678 IFS=$as_save_IFS
3679 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003681 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003682 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
3690fi
3691fi
3692ac_ct_CC=$ac_cv_prog_ac_ct_CC
3693if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3695$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3698$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test "x$ac_ct_CC" = x; then
3702 CC=""
3703 else
3704 case $cross_compiling:$ac_tool_warned in
3705yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003706{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3707$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003708ac_tool_warned=yes ;;
3709esac
3710 CC=$ac_ct_CC
3711 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
3713 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003714fi
3715
Jack Jansendd19cf82001-12-06 22:36:17 +00003716if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 if test -n "$ac_tool_prefix"; then
3718 # 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 +00003719set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3721$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003722if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003724else
3725 if test -n "$CC"; then
3726 ac_cv_prog_CC="$CC" # Let the user override the test.
3727else
Martin v. Löwis11437992002-04-12 09:54:03 +00003728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3729for as_dir in $PATH
3730do
3731 IFS=$as_save_IFS
3732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $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 +00003737 break 2
3738 fi
3739done
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003741IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003742
3743fi
3744fi
3745CC=$ac_cv_prog_CC
3746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756fi
3757if test -z "$CC"; then
3758 # Extract the first word of "cc", so it can be a program name with args.
3759set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3761$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003762if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003764else
3765 if test -n "$CC"; then
3766 ac_cv_prog_CC="$CC" # Let the user override the test.
3767else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3777 ac_prog_rejected=yes
3778 continue
3779 fi
3780 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
3783 fi
3784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003787
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test $ac_prog_rejected = yes; then
3789 # We found a bogon in the path, so make sure we never use it.
3790 set dummy $ac_cv_prog_CC
3791 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793 # We chose a different compiler from the bogus one.
3794 # However, it has the same basename, so the bogon will be chosen
3795 # first if we set CC to just the basename; use the full file name.
3796 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003797 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003798 fi
3799fi
3800fi
3801fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003809fi
3810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812fi
3813if test -z "$CC"; then
3814 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 do
3817 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003821if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003823else
3824 if test -n "$CC"; then
3825 ac_cv_prog_CC="$CC" # Let the user override the test.
3826else
Martin v. Löwis11437992002-04-12 09:54:03 +00003827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828for as_dir in $PATH
3829do
3830 IFS=$as_save_IFS
3831 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 $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 +00003836 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003838done
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003841
3842fi
3843fi
3844CC=$ac_cv_prog_CC
3845if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3847$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3850$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003851fi
3852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 test -n "$CC" && break
3855 done
3856fi
3857if test -z "$CC"; then
3858 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003860do
3861 # Extract the first word of "$ac_prog", so it can be a program name with args.
3862set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3864$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003865if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003867else
3868 if test -n "$ac_ct_CC"; then
3869 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3870else
3871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3872for as_dir in $PATH
3873do
3874 IFS=$as_save_IFS
3875 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 $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 +00003880 break 2
3881 fi
3882done
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003885
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
3887fi
3888ac_ct_CC=$ac_cv_prog_ac_ct_CC
3889if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3891$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003892else
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3894$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003895fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 test -n "$ac_ct_CC" && break
3899done
Michael W. Hudson54241132001-12-07 15:38:26 +00003900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 if test "x$ac_ct_CC" = x; then
3902 CC=""
3903 else
3904 case $cross_compiling:$ac_tool_warned in
3905yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908ac_tool_warned=yes ;;
3909esac
3910 CC=$ac_ct_CC
3911 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
3913
3914fi
3915
3916
Matthias Kloseb9621712010-04-24 17:59:49 +00003917test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003919as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003920See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003921
3922# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003923$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3924set X $ac_compile
3925ac_compiler=$2
3926for ac_option in --version -v -V -qversion; do
3927 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928case "(($ac_try" in
3929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3930 *) ac_try_echo=$ac_try;;
3931esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003932eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3933$as_echo "$ac_try_echo"; } >&5
3934 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 if test -s conftest.err; then
3937 sed '10a\
3938... rest of stderr output deleted ...
3939 10q' conftest.err >conftest.er1
3940 cat conftest.er1 >&5
3941 fi
3942 rm -f conftest.er1 conftest.err
3943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }
3945done
Martin v. Löwis11437992002-04-12 09:54:03 +00003946
Matthias Kloseb9621712010-04-24 17:59:49 +00003947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003948/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950int
3951main ()
3952{
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003959ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003960# Try to create an executable without -o first, disregard a.out.
3961# It will help us diagnose broken compilers, and finding out an intuition
3962# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3964$as_echo_n "checking whether the C compiler works... " >&6; }
3965ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3966
3967# The possible output files:
3968ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3969
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970ac_rmfiles=
3971for ac_file in $ac_files
3972do
3973 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3976 esac
3977done
3978rm -f $ac_rmfiles
3979
Matthias Kloseb9621712010-04-24 17:59:49 +00003980if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003981case "(($ac_try" in
3982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3983 *) ac_try_echo=$ac_try;;
3984esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003985eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3986$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3990 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3992# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3993# in a Makefile. We should not override ac_cv_exeext if it was cached,
3994# so that the user can short-circuit this test for compilers unknown to
3995# Autoconf.
3996for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003997do
3998 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004000 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 ;;
4002 [ab].out )
4003 # We found the default executable, but exeext='' is most
4004 # certainly right.
4005 break;;
4006 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004007 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 then :; else
4009 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4010 fi
4011 # We set ac_cv_exeext here because the later test for it is not
4012 # safe: cross compilers may not add the suffix if given an `-o'
4013 # argument, so we may need to know it at that point already.
4014 # Even if this section looks crufty: it has the advantage of
4015 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004016 break;;
4017 * )
4018 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 esac
4020done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021test "$ac_cv_exeext" = no && ac_cv_exeext=
4022
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004023else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004024 ac_file=''
4025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004026if test -z "$ac_file"; then :
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4028$as_echo "no" >&6; }
4029$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004030sed 's/^/| /' conftest.$ac_ext >&5
4031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004034as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004035See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004036else
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4038$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4041$as_echo_n "checking for C compiler default output file name... " >&6; }
4042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4043$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004044ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045
Matthias Kloseb9621712010-04-24 17:59:49 +00004046rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4049$as_echo_n "checking for suffix of executables... " >&6; }
4050if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004051case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004057 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4062# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4063# work properly (i.e., refer to `conftest.exe'), while it won't with
4064# `rm'.
4065for ac_file in conftest.exe conftest conftest.*; do
4066 test -f "$ac_file" || continue
4067 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004068 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004069 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4070 break;;
4071 * ) break;;
4072 esac
4073done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004078See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004080rm -f conftest conftest$ac_cv_exeext
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4082$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083
4084rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004085EXEEXT=$ac_cv_exeext
4086ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4088/* end confdefs.h. */
4089#include <stdio.h>
4090int
4091main ()
4092{
4093FILE *f = fopen ("conftest.out", "w");
4094 return ferror (f) || fclose (f) != 0;
4095
4096 ;
4097 return 0;
4098}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004100ac_clean_files="$ac_clean_files conftest.out"
4101# Check that the compiler produces executables we can run. If not, either
4102# the compiler is broken, or we cross compile.
4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4104$as_echo_n "checking whether we are cross compiling... " >&6; }
4105if test "$cross_compiling" != yes; then
4106 { { ac_try="$ac_link"
4107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
4111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
4113 (eval "$ac_link") 2>&5
4114 ac_status=$?
4115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }
4117 if { ac_try='./conftest$ac_cv_exeext'
4118 { { case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
4122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
4124 (eval "$ac_try") 2>&5
4125 ac_status=$?
4126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; }; then
4128 cross_compiling=no
4129 else
4130 if test "$cross_compiling" = maybe; then
4131 cross_compiling=yes
4132 else
4133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004136If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004137See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004138 fi
4139 fi
4140fi
4141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4142$as_echo "$cross_compiling" >&6; }
4143
4144rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4145ac_clean_files=$ac_clean_files_save
4146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4147$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
4150else
4151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004152/* end confdefs.h. */
4153
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
4162rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164case "(($ac_try" in
4165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4166 *) ac_try_echo=$ac_try;;
4167esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004168eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4169$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004170 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4173 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174 for ac_file in conftest.o conftest.obj conftest.*; do
4175 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004178 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4179 break;;
4180 esac
4181done
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004184sed 's/^/| /' conftest.$ac_ext >&5
4185
Matthias Kloseb9621712010-04-24 17:59:49 +00004186{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4187$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004188as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004189See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004191rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4194$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004195OBJEXT=$ac_cv_objext
4196ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4198$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004199if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Matthias Kloseb9621712010-04-24 17:59:49 +00004202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
Martin v. Löwis11437992002-04-12 09:54:03 +00004205int
4206main ()
4207{
4208#ifndef __GNUC__
4209 choke me
4210#endif
4211
4212 ;
4213 return 0;
4214}
4215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004216if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004217 ac_compiler_gnu=yes
4218else
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004222ac_cv_c_compiler_gnu=$ac_compiler_gnu
4223
4224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4226$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4227if test $ac_compiler_gnu = yes; then
4228 GCC=yes
4229else
4230 GCC=
4231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004232ac_test_CFLAGS=${CFLAGS+set}
4233ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4235$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004238else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_save_c_werror_flag=$ac_c_werror_flag
4240 ac_c_werror_flag=yes
4241 ac_cv_prog_cc_g=no
4242 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004245
Martin v. Löwis11437992002-04-12 09:54:03 +00004246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 CFLAGS=""
4258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270
Matthias Kloseb9621712010-04-24 17:59:49 +00004271else
4272 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275/* end confdefs.h. */
4276
4277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
4284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004285if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4293 ac_c_werror_flag=$ac_save_c_werror_flag
4294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4296$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004299elif test $ac_cv_prog_cc_g = yes; then
4300 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004301 CFLAGS="-g -O2"
4302 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004303 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004304 fi
4305else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004306 if test "$GCC" = yes; then
4307 CFLAGS="-O2"
4308 else
4309 CFLAGS=
4310 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4313$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004314if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004316else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004317 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004318ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004320/* end confdefs.h. */
4321#include <stdarg.h>
4322#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004323struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4325struct buf { int x; };
4326FILE * (*rcsopen) (struct buf *, struct stat *, int);
4327static char *e (p, i)
4328 char **p;
4329 int i;
4330{
4331 return p[i];
4332}
4333static char *f (char * (*g) (char **, int), char **p, ...)
4334{
4335 char *s;
4336 va_list v;
4337 va_start (v,p);
4338 s = g (p, va_arg (v,int));
4339 va_end (v);
4340 return s;
4341}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004342
4343/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4344 function prototypes and stuff, but not '\xHH' hex character constants.
4345 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004346 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004347 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4348 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4351
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4353 inside strings and character constants. */
4354#define FOO(x) 'x'
4355int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4356
Skip Montanaro6dead952003-09-25 14:50:04 +00004357int test (int i, double x);
4358struct s1 {int (*f) (int a);};
4359struct s2 {int (*f) (double a);};
4360int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4361int argc;
4362char **argv;
4363int
4364main ()
4365{
4366return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4367 ;
4368 return 0;
4369}
4370_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4372 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004373do
4374 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext
4379 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004380done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004382CC=$ac_save_CC
4383
4384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004385# AC_CACHE_VAL
4386case "x$ac_cv_prog_cc_c89" in
4387 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4389$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4392$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004393 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4396$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004397esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004398if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Matthias Kloseb9621712010-04-24 17:59:49 +00004400fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004401
Martin v. Löwis11437992002-04-12 09:54:03 +00004402ac_ext=c
4403ac_cpp='$CPP $CPPFLAGS'
4404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4406ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004408ac_ext=c
4409ac_cpp='$CPP $CPPFLAGS'
4410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4412ac_compiler_gnu=$ac_cv_c_compiler_gnu
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4414$as_echo_n "checking how to run the C preprocessor... " >&6; }
4415# On Suns, sometimes $CPP names a directory.
4416if test -n "$CPP" && test -d "$CPP"; then
4417 CPP=
4418fi
4419if test -z "$CPP"; then
4420 if ${ac_cv_prog_CPP+:} false; then :
4421 $as_echo_n "(cached) " >&6
4422else
4423 # Double quotes because CPP needs to be expanded
4424 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4425 do
4426 ac_preproc_ok=false
4427for ac_c_preproc_warn_flag in '' yes
4428do
4429 # Use a header file that comes with gcc, so configuring glibc
4430 # with a fresh cross-compiler works.
4431 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4432 # <limits.h> exists even on freestanding compilers.
4433 # On the NeXT, cc -E runs the code through the compiler's parser,
4434 # not just through cpp. "Syntax error" is here to catch this case.
4435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4436/* end confdefs.h. */
4437#ifdef __STDC__
4438# include <limits.h>
4439#else
4440# include <assert.h>
4441#endif
4442 Syntax error
4443_ACEOF
4444if ac_fn_c_try_cpp "$LINENO"; then :
4445
4446else
4447 # Broken: fails on valid input.
4448continue
4449fi
4450rm -f conftest.err conftest.i conftest.$ac_ext
4451
4452 # OK, works on sane cases. Now check whether nonexistent headers
4453 # can be detected and how.
4454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4455/* end confdefs.h. */
4456#include <ac_nonexistent.h>
4457_ACEOF
4458if ac_fn_c_try_cpp "$LINENO"; then :
4459 # Broken: success on invalid input.
4460continue
4461else
4462 # Passes both tests.
4463ac_preproc_ok=:
4464break
4465fi
4466rm -f conftest.err conftest.i conftest.$ac_ext
4467
4468done
4469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4470rm -f conftest.i conftest.err conftest.$ac_ext
4471if $ac_preproc_ok; then :
4472 break
4473fi
4474
4475 done
4476 ac_cv_prog_CPP=$CPP
4477
4478fi
4479 CPP=$ac_cv_prog_CPP
4480else
4481 ac_cv_prog_CPP=$CPP
4482fi
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4484$as_echo "$CPP" >&6; }
4485ac_preproc_ok=false
4486for ac_c_preproc_warn_flag in '' yes
4487do
4488 # Use a header file that comes with gcc, so configuring glibc
4489 # with a fresh cross-compiler works.
4490 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4491 # <limits.h> exists even on freestanding compilers.
4492 # On the NeXT, cc -E runs the code through the compiler's parser,
4493 # not just through cpp. "Syntax error" is here to catch this case.
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495/* end confdefs.h. */
4496#ifdef __STDC__
4497# include <limits.h>
4498#else
4499# include <assert.h>
4500#endif
4501 Syntax error
4502_ACEOF
4503if ac_fn_c_try_cpp "$LINENO"; then :
4504
4505else
4506 # Broken: fails on valid input.
4507continue
4508fi
4509rm -f conftest.err conftest.i conftest.$ac_ext
4510
4511 # OK, works on sane cases. Now check whether nonexistent headers
4512 # can be detected and how.
4513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4514/* end confdefs.h. */
4515#include <ac_nonexistent.h>
4516_ACEOF
4517if ac_fn_c_try_cpp "$LINENO"; then :
4518 # Broken: success on invalid input.
4519continue
4520else
4521 # Passes both tests.
4522ac_preproc_ok=:
4523break
4524fi
4525rm -f conftest.err conftest.i conftest.$ac_ext
4526
4527done
4528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4529rm -f conftest.i conftest.err conftest.$ac_ext
4530if $ac_preproc_ok; then :
4531
4532else
4533 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4536See \`config.log' for more details" "$LINENO" 5; }
4537fi
4538
4539ac_ext=c
4540ac_cpp='$CPP $CPPFLAGS'
4541ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4542ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4543ac_compiler_gnu=$ac_cv_c_compiler_gnu
4544
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4546$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4547if ${ac_cv_path_GREP+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 if test -z "$GREP"; then
4551 ac_path_GREP_found=false
4552 # Loop through the user's path and test for each of PROGNAME-LIST
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_prog in grep ggrep; do
4559 for ac_exec_ext in '' $ac_executable_extensions; do
4560 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4561 as_fn_executable_p "$ac_path_GREP" || continue
4562# Check for GNU ac_path_GREP and select it if it is found.
4563 # Check for GNU $ac_path_GREP
4564case `"$ac_path_GREP" --version 2>&1` in
4565*GNU*)
4566 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4567*)
4568 ac_count=0
4569 $as_echo_n 0123456789 >"conftest.in"
4570 while :
4571 do
4572 cat "conftest.in" "conftest.in" >"conftest.tmp"
4573 mv "conftest.tmp" "conftest.in"
4574 cp "conftest.in" "conftest.nl"
4575 $as_echo 'GREP' >> "conftest.nl"
4576 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4577 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4578 as_fn_arith $ac_count + 1 && ac_count=$as_val
4579 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4580 # Best one so far, save it but keep looking for a better one
4581 ac_cv_path_GREP="$ac_path_GREP"
4582 ac_path_GREP_max=$ac_count
4583 fi
4584 # 10*(2^10) chars as input seems more than enough
4585 test $ac_count -gt 10 && break
4586 done
4587 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4588esac
4589
4590 $ac_path_GREP_found && break 3
4591 done
4592 done
4593 done
4594IFS=$as_save_IFS
4595 if test -z "$ac_cv_path_GREP"; then
4596 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4597 fi
4598else
4599 ac_cv_path_GREP=$GREP
4600fi
4601
4602fi
4603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4604$as_echo "$ac_cv_path_GREP" >&6; }
4605 GREP="$ac_cv_path_GREP"
4606
4607
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004608
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004609
4610
Matthias Kloseb9621712010-04-24 17:59:49 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4612$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004615if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004616 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618 case $withval in
4619 no) with_cxx_main=no
4620 MAINCC='$(CC)';;
4621 yes) with_cxx_main=yes
4622 MAINCC='$(CXX)';;
4623 *) with_cxx_main=yes
4624 MAINCC=$withval
4625 if test -z "$CXX"
4626 then
4627 CXX=$withval
4628 fi;;
4629 esac
4630else
4631
4632 with_cxx_main=no
4633 MAINCC='$(CC)'
4634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004635fi
4636
Matthias Kloseb9621712010-04-24 17:59:49 +00004637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4638$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004639
4640preset_cxx="$CXX"
4641if test -z "$CXX"
4642then
4643 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004644 gcc) if test -n "$ac_tool_prefix"; then
4645 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4646set dummy ${ac_tool_prefix}g++; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_CXX+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $CXX in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in notfound
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675CXX=$ac_cv_path_CXX
4676if test -n "$CXX"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4678$as_echo "$CXX" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685fi
4686if test -z "$ac_cv_path_CXX"; then
4687 ac_pt_CXX=$CXX
4688 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4691$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004692if ${ac_cv_path_ac_pt_CXX+:} false; then :
4693 $as_echo_n "(cached) " >&6
4694else
4695 case $ac_pt_CXX in
4696 [\\/]* | ?:[\\/]*)
4697 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4698 ;;
4699 *)
4700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in notfound
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004707 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
4711done
4712 done
4713IFS=$as_save_IFS
4714
4715 ;;
4716esac
4717fi
4718ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4719if test -n "$ac_pt_CXX"; then
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4721$as_echo "$ac_pt_CXX" >&6; }
4722else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
4725fi
4726
4727 if test "x$ac_pt_CXX" = x; then
4728 CXX="g++"
4729 else
4730 case $cross_compiling:$ac_tool_warned in
4731yes:)
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4734ac_tool_warned=yes ;;
4735esac
4736 CXX=$ac_pt_CXX
4737 fi
4738else
4739 CXX="$ac_cv_path_CXX"
4740fi
4741 ;;
4742 cc) if test -n "$ac_tool_prefix"; then
4743 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4744set dummy ${ac_tool_prefix}c++; ac_word=$2
4745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004747if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749else
4750 case $CXX in
4751 [\\/]* | ?:[\\/]*)
4752 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4753 ;;
4754 *)
4755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4756for as_dir in notfound
4757do
4758 IFS=$as_save_IFS
4759 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004761 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004762 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764 break 2
4765 fi
4766done
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004768IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 ;;
4771esac
4772fi
4773CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004774if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4776$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004777else
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004781
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782
4783fi
4784if test -z "$ac_cv_path_CXX"; then
4785 ac_pt_CXX=$CXX
4786 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4789$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 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 +00004796 ;;
4797 *)
4798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4799for as_dir in notfound
4800do
4801 IFS=$as_save_IFS
4802 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004805 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807 break 2
4808 fi
4809done
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004811IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004813 ;;
4814esac
4815fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4817if test -n "$ac_pt_CXX"; then
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4819$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004820else
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4822$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004824
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825 if test "x$ac_pt_CXX" = x; then
4826 CXX="c++"
4827 else
4828 case $cross_compiling:$ac_tool_warned in
4829yes:)
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4831$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4832ac_tool_warned=yes ;;
4833esac
4834 CXX=$ac_pt_CXX
4835 fi
4836else
4837 CXX="$ac_cv_path_CXX"
4838fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 clang|*/clang) if test -n "$ac_tool_prefix"; then
4841 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4842set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4844$as_echo_n "checking for $ac_word... " >&6; }
4845if ${ac_cv_path_CXX+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847else
4848 case $CXX in
4849 [\\/]* | ?:[\\/]*)
4850 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4851 ;;
4852 *)
4853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4854for as_dir in notfound
4855do
4856 IFS=$as_save_IFS
4857 test -z "$as_dir" && as_dir=.
4858 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004859 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004860 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4861 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4862 break 2
4863 fi
4864done
4865 done
4866IFS=$as_save_IFS
4867
Ned Deilycbfb9a52012-06-23 16:02:19 -07004868 ;;
4869esac
4870fi
4871CXX=$ac_cv_path_CXX
4872if test -n "$CXX"; then
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4874$as_echo "$CXX" >&6; }
4875else
4876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4877$as_echo "no" >&6; }
4878fi
4879
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880
4881fi
4882if test -z "$ac_cv_path_CXX"; then
4883 ac_pt_CXX=$CXX
4884 # Extract the first word of "clang++", so it can be a program name with args.
4885set dummy clang++; ac_word=$2
4886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4887$as_echo_n "checking for $ac_word... " >&6; }
4888if ${ac_cv_path_ac_pt_CXX+:} false; then :
4889 $as_echo_n "(cached) " >&6
4890else
4891 case $ac_pt_CXX in
4892 [\\/]* | ?:[\\/]*)
4893 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4894 ;;
4895 *)
4896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4897for as_dir in notfound
4898do
4899 IFS=$as_save_IFS
4900 test -z "$as_dir" && as_dir=.
4901 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004903 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4905 break 2
4906 fi
4907done
4908 done
4909IFS=$as_save_IFS
4910
4911 ;;
4912esac
4913fi
4914ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4915if test -n "$ac_pt_CXX"; then
4916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4917$as_echo "$ac_pt_CXX" >&6; }
4918else
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4920$as_echo "no" >&6; }
4921fi
4922
4923 if test "x$ac_pt_CXX" = x; then
4924 CXX="clang++"
4925 else
4926 case $cross_compiling:$ac_tool_warned in
4927yes:)
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4929$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4930ac_tool_warned=yes ;;
4931esac
4932 CXX=$ac_pt_CXX
4933 fi
4934else
4935 CXX="$ac_cv_path_CXX"
4936fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004937 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004938 esac
4939 if test "$CXX" = "notfound"
4940 then
4941 CXX=""
4942 fi
4943fi
4944if test -z "$CXX"
4945then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004946 if test -n "$ac_tool_prefix"; then
4947 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4948 do
4949 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4950set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004953if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004955else
4956 if test -n "$CXX"; then
4957 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4958else
4959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4960for as_dir in $PATH
4961do
4962 IFS=$as_save_IFS
4963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004966 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004967 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004968 break 2
4969 fi
4970done
Matthias Kloseb9621712010-04-24 17:59:49 +00004971 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004972IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004973
4974fi
4975fi
4976CXX=$ac_cv_prog_CXX
4977if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4979$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004983fi
4984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004986 test -n "$CXX" && break
4987 done
4988fi
4989if test -z "$CXX"; then
4990 ac_ct_CXX=$CXX
4991 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4992do
4993 # Extract the first word of "$ac_prog", so it can be a program name with args.
4994set dummy $ac_prog; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 if test -n "$ac_ct_CXX"; then
5001 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5002else
5003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004for as_dir in $PATH
5005do
5006 IFS=$as_save_IFS
5007 test -z "$as_dir" && as_dir=.
5008 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005010 ac_cv_prog_ac_ct_CXX="$ac_prog"
5011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012 break 2
5013 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 done
5016IFS=$as_save_IFS
5017
5018fi
5019fi
5020ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5021if test -n "$ac_ct_CXX"; then
5022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5023$as_echo "$ac_ct_CXX" >&6; }
5024else
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5026$as_echo "no" >&6; }
5027fi
5028
5029
5030 test -n "$ac_ct_CXX" && break
5031done
5032
5033 if test "x$ac_ct_CXX" = x; then
5034 CXX="notfound"
5035 else
5036 case $cross_compiling:$ac_tool_warned in
5037yes:)
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5039$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5040ac_tool_warned=yes ;;
5041esac
5042 CXX=$ac_ct_CXX
5043 fi
5044fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045
5046 if test "$CXX" = "notfound"
5047 then
5048 CXX=""
5049 fi
5050fi
5051if test "$preset_cxx" != "$CXX"
5052then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005053 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055 By default, distutils will build C++ extension modules with \"$CXX\".
5056 If this is not intended, then set CXX on the configure command line.
5057 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005058$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059
5060 By default, distutils will build C++ extension modules with \"$CXX\".
5061 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005062 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
5065
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005066MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5067
5068
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5070$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5071cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005072#undef bfin
5073#undef cris
5074#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005075#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005076#undef hppa
5077#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005078#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005079#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005080#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005081#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005082#undef unix
5083#if defined(__linux__)
5084# if defined(__x86_64__) && defined(__LP64__)
5085 x86_64-linux-gnu
5086# elif defined(__x86_64__) && defined(__ILP32__)
5087 x86_64-linux-gnux32
5088# elif defined(__i386__)
5089 i386-linux-gnu
5090# elif defined(__aarch64__) && defined(__AARCH64EL__)
5091# if defined(__ILP32__)
5092 aarch64_ilp32-linux-gnu
5093# else
5094 aarch64-linux-gnu
5095# endif
5096# elif defined(__aarch64__) && defined(__AARCH64EB__)
5097# if defined(__ILP32__)
5098 aarch64_be_ilp32-linux-gnu
5099# else
5100 aarch64_be-linux-gnu
5101# endif
5102# elif defined(__alpha__)
5103 alpha-linux-gnu
5104# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5105# if defined(__ARMEL__)
5106 arm-linux-gnueabihf
5107# else
5108 armeb-linux-gnueabihf
5109# endif
5110# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5111# if defined(__ARMEL__)
5112 arm-linux-gnueabi
5113# else
5114 armeb-linux-gnueabi
5115# endif
5116# elif defined(__hppa__)
5117 hppa-linux-gnu
5118# elif defined(__ia64__)
5119 ia64-linux-gnu
5120# elif defined(__m68k__) && !defined(__mcoldfire__)
5121 m68k-linux-gnu
5122# elif defined(__mips_hard_float) && defined(_MIPSEL)
5123# if _MIPS_SIM == _ABIO32
5124 mipsel-linux-gnu
5125# elif _MIPS_SIM == _ABIN32
5126 mips64el-linux-gnuabin32
5127# elif _MIPS_SIM == _ABI64
5128 mips64el-linux-gnuabi64
5129# else
5130# error unknown platform triplet
5131# endif
5132# elif defined(__mips_hard_float)
5133# if _MIPS_SIM == _ABIO32
5134 mips-linux-gnu
5135# elif _MIPS_SIM == _ABIN32
5136 mips64-linux-gnuabin32
5137# elif _MIPS_SIM == _ABI64
5138 mips64-linux-gnuabi64
5139# else
5140# error unknown platform triplet
5141# endif
5142# elif defined(__or1k__)
5143 or1k-linux-gnu
5144# elif defined(__powerpc__) && defined(__SPE__)
5145 powerpc-linux-gnuspe
5146# elif defined(__powerpc64__)
5147# if defined(__LITTLE_ENDIAN__)
5148 powerpc64le-linux-gnu
5149# else
5150 powerpc64-linux-gnu
5151# endif
5152# elif defined(__powerpc__)
5153 powerpc-linux-gnu
5154# elif defined(__s390x__)
5155 s390x-linux-gnu
5156# elif defined(__s390__)
5157 s390-linux-gnu
5158# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5159 sh4-linux-gnu
5160# elif defined(__sparc__) && defined(__arch64__)
5161 sparc64-linux-gnu
5162# elif defined(__sparc__)
5163 sparc-linux-gnu
5164# else
5165# error unknown platform triplet
5166# endif
5167#elif defined(__FreeBSD_kernel__)
5168# if defined(__LP64__)
5169 x86_64-kfreebsd-gnu
5170# elif defined(__i386__)
5171 i386-kfreebsd-gnu
5172# else
5173# error unknown platform triplet
5174# endif
5175#elif defined(__gnu_hurd__)
5176 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005177#elif defined(__APPLE__)
5178 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005179#else
5180# error unknown platform triplet
5181#endif
5182
5183EOF
5184
5185if $CPP conftest.c >conftest.out 2>/dev/null; then
5186 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5188$as_echo "$PLATFORM_TRIPLET" >&6; }
5189else
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5191$as_echo "none" >&6; }
5192fi
5193rm -f conftest.c conftest.out
5194
5195if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5196 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5197 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5198 fi
5199fi
5200PLATDIR=plat-$MACHDEP
5201
5202
5203
5204
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5206$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5207save_LDFLAGS="$LDFLAGS"
5208LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005209
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211/* end confdefs.h. */
5212
5213int
5214main ()
5215{
5216
5217 ;
5218 return 0;
5219}
5220_ACEOF
5221if ac_fn_c_try_link "$LINENO"; then :
5222 NO_AS_NEEDED="-Wl,--no-as-needed"
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5224$as_echo "yes" >&6; }
5225else
5226 NO_AS_NEEDED=""
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
5229fi
5230rm -f core conftest.err conftest.$ac_objext \
5231 conftest$ac_exeext conftest.$ac_ext
5232LDFLAGS="$save_LDFLAGS"
5233
5234
5235
5236# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005237
Matthias Kloseb9621712010-04-24 17:59:49 +00005238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5239$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005240if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005241 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005242else
5243 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5244 then ac_cv_path_EGREP="$GREP -E"
5245 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005246 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005247 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005248 # Loop through the user's path and test for each of PROGNAME-LIST
5249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005250for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5251do
5252 IFS=$as_save_IFS
5253 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005254 for ac_prog in egrep; do
5255 for ac_exec_ext in '' $ac_executable_extensions; do
5256 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005257 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005258# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005259 # Check for GNU $ac_path_EGREP
5260case `"$ac_path_EGREP" --version 2>&1` in
5261*GNU*)
5262 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5263*)
5264 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005265 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005266 while :
5267 do
5268 cat "conftest.in" "conftest.in" >"conftest.tmp"
5269 mv "conftest.tmp" "conftest.in"
5270 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005271 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005272 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5273 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005274 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005275 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5276 # Best one so far, save it but keep looking for a better one
5277 ac_cv_path_EGREP="$ac_path_EGREP"
5278 ac_path_EGREP_max=$ac_count
5279 fi
5280 # 10*(2^10) chars as input seems more than enough
5281 test $ac_count -gt 10 && break
5282 done
5283 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5284esac
5285
Matthias Kloseb9621712010-04-24 17:59:49 +00005286 $ac_path_EGREP_found && break 3
5287 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005288 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005289 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005290IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005291 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005292 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 +00005293 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005294else
5295 ac_cv_path_EGREP=$EGREP
5296fi
5297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005298 fi
5299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5301$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005302 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005303
5304
Matthias Kloseb9621712010-04-24 17:59:49 +00005305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5306$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005307if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005308 $as_echo_n "(cached) " >&6
5309else
5310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005311/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005312#include <stdlib.h>
5313#include <stdarg.h>
5314#include <string.h>
5315#include <float.h>
5316
5317int
5318main ()
5319{
5320
5321 ;
5322 return 0;
5323}
5324_ACEOF
5325if ac_fn_c_try_compile "$LINENO"; then :
5326 ac_cv_header_stdc=yes
5327else
5328 ac_cv_header_stdc=no
5329fi
5330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5331
5332if test $ac_cv_header_stdc = yes; then
5333 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335/* end confdefs.h. */
5336#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005337
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005338_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005339if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005342else
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005344fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005345rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347fi
5348
5349if test $ac_cv_header_stdc = yes; then
5350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5352/* end confdefs.h. */
5353#include <stdlib.h>
5354
5355_ACEOF
5356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5357 $EGREP "free" >/dev/null 2>&1; then :
5358
5359else
5360 ac_cv_header_stdc=no
5361fi
5362rm -f conftest*
5363
5364fi
5365
5366if test $ac_cv_header_stdc = yes; then
5367 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5368 if test "$cross_compiling" = yes; then :
5369 :
5370else
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372/* end confdefs.h. */
5373#include <ctype.h>
5374#include <stdlib.h>
5375#if ((' ' & 0x0FF) == 0x020)
5376# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5377# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5378#else
5379# define ISLOWER(c) \
5380 (('a' <= (c) && (c) <= 'i') \
5381 || ('j' <= (c) && (c) <= 'r') \
5382 || ('s' <= (c) && (c) <= 'z'))
5383# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5384#endif
5385
5386#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5387int
5388main ()
5389{
5390 int i;
5391 for (i = 0; i < 256; i++)
5392 if (XOR (islower (i), ISLOWER (i))
5393 || toupper (i) != TOUPPER (i))
5394 return 2;
5395 return 0;
5396}
5397_ACEOF
5398if ac_fn_c_try_run "$LINENO"; then :
5399
5400else
5401 ac_cv_header_stdc=no
5402fi
5403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5404 conftest.$ac_objext conftest.beam conftest.$ac_ext
5405fi
5406
5407fi
5408fi
5409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5410$as_echo "$ac_cv_header_stdc" >&6; }
5411if test $ac_cv_header_stdc = yes; then
5412
5413$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5414
5415fi
5416
5417# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5418for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5419 inttypes.h stdint.h unistd.h
5420do :
5421 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5422ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5423"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005424if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005425 cat >>confdefs.h <<_ACEOF
5426#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5427_ACEOF
5428
5429fi
5430
5431done
5432
5433
5434
5435 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 +02005436if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 MINIX=yes
5438else
5439 MINIX=
5440fi
5441
5442
5443 if test "$MINIX" = yes; then
5444
5445$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5446
5447
5448$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5449
5450
5451$as_echo "#define _MINIX 1" >>confdefs.h
5452
5453 fi
5454
5455
5456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5457$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005458if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 $as_echo_n "(cached) " >&6
5460else
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005464# define __EXTENSIONS__ 1
5465 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005466int
5467main ()
5468{
5469
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474if ac_fn_c_try_compile "$LINENO"; then :
5475 ac_cv_safe_to_define___extensions__=yes
5476else
5477 ac_cv_safe_to_define___extensions__=no
5478fi
5479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5480fi
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5482$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5483 test $ac_cv_safe_to_define___extensions__ = yes &&
5484 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5485
5486 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5487
5488 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5489
5490 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5491
5492 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5493
5494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496# Check for unsupported systems
5497case $ac_sys_system/$ac_sys_release in
5498atheos*|Linux*/1*)
5499 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5500 echo See README for details.
5501 exit 1;;
5502esac
5503
5504
Matthias Kloseb9621712010-04-24 17:59:49 +00005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5506$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507
5508# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005509if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 withval=$with_suffix;
5511 case $withval in
5512 no) EXEEXT=;;
5513 yes) EXEEXT=.exe;;
5514 *) EXEEXT=$withval;;
5515 esac
5516fi
5517
Matthias Kloseb9621712010-04-24 17:59:49 +00005518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5519$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520
5521# Test whether we're running on a non-case-sensitive system, in which
5522# case we give a warning if no ext is given
5523
Matthias Kloseb9621712010-04-24 17:59:49 +00005524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5525$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526if test ! -d CaseSensitiveTestDir; then
5527mkdir CaseSensitiveTestDir
5528fi
5529
5530if test -d casesensitivetestdir
5531then
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5533$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534 BUILDEXEEXT=.exe
5535else
Matthias Kloseb9621712010-04-24 17:59:49 +00005536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538 BUILDEXEEXT=$EXEEXT
5539fi
5540rmdir CaseSensitiveTestDir
5541
5542case $MACHDEP in
5543bsdos*)
5544 case $CC in
5545 gcc) CC="$CC -D_HAVE_BSDI";;
5546 esac;;
5547esac
5548
5549case $ac_sys_system in
5550hp*|HP*)
5551 case $CC in
5552 cc|*/cc) CC="$CC -Ae";;
5553 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554esac
5555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556
Matthias Kloseb9621712010-04-24 17:59:49 +00005557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5558$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559if test -z "$LIBRARY"
5560then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005561 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5564$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565
5566# LDLIBRARY is the name of the library to link against (as opposed to the
5567# name of the library into which to insert object files). BLDLIBRARY is also
5568# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5569# is blank as the main program is not linked directly against LDLIBRARY.
5570# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5571# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5572# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5573# DLLLIBRARY is the shared (i.e., DLL) library.
5574#
5575# RUNSHARED is used to run shared python without installed libraries
5576#
5577# INSTSONAME is the name of the shared library that will be use to install
5578# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005579#
5580# LDVERSION is the shared library version number, normally the Python version
5581# with the ABI build flags appended.
5582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583
5584
5585
5586
5587
5588
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590LDLIBRARY="$LIBRARY"
5591BLDLIBRARY='$(LDLIBRARY)'
5592INSTSONAME='$(LDLIBRARY)'
5593DLLLIBRARY=''
5594LDLIBRARYDIR=''
5595RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005596LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
5598# LINKCC is the command that links the python executable -- default is $(CC).
5599# If CXX is set, and if it is needed to link a main function that was
5600# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5601# python might then depend on the C++ runtime
5602# This is altered for AIX in order to build the export list before
5603# linking.
5604
Matthias Kloseb9621712010-04-24 17:59:49 +00005605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5606$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607if test -z "$LINKCC"
5608then
5609 LINKCC='$(PURIFY) $(MAINCC)'
5610 case $ac_sys_system in
5611 AIX*)
5612 exp_extra="\"\""
5613 if test $ac_sys_release -ge 5 -o \
5614 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5615 exp_extra="."
5616 fi
5617 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 QNX*)
5619 # qcc must be used because the other compilers do not
5620 # support -N.
5621 LINKCC=qcc;;
5622 esac
5623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5625$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626
5627# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5628# make sure we default having it set to "no": this is used by
5629# distutils.unixccompiler to know if it should add --enable-new-dtags
5630# to linker command lines, and failing to detect GNU ld simply results
5631# in the same bahaviour as before.
5632
Matthias Kloseb9621712010-04-24 17:59:49 +00005633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5634$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635ac_prog=ld
5636if test "$GCC" = yes; then
5637 ac_prog=`$CC -print-prog-name=ld`
5638fi
5639case `"$ac_prog" -V 2>&1 < /dev/null` in
5640 *GNU*)
5641 GNULD=yes;;
5642 *)
5643 GNULD=no;;
5644esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5646$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5649$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005650if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005651 $as_echo_n "(cached) " >&6
5652else
5653 ac_cv_c_inline=no
5654for ac_kw in inline __inline__ __inline; do
5655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5656/* end confdefs.h. */
5657#ifndef __cplusplus
5658typedef int foo_t;
5659static $ac_kw foo_t static_foo () {return 0; }
5660$ac_kw foo_t foo () {return 0; }
5661#endif
5662
5663_ACEOF
5664if ac_fn_c_try_compile "$LINENO"; then :
5665 ac_cv_c_inline=$ac_kw
5666fi
5667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5668 test "$ac_cv_c_inline" != no && break
5669done
5670
5671fi
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5673$as_echo "$ac_cv_c_inline" >&6; }
5674
5675case $ac_cv_c_inline in
5676 inline | yes) ;;
5677 *)
5678 case $ac_cv_c_inline in
5679 no) ac_val=;;
5680 *) ac_val=$ac_cv_c_inline;;
5681 esac
5682 cat >>confdefs.h <<_ACEOF
5683#ifndef __cplusplus
5684#define inline $ac_val
5685#endif
5686_ACEOF
5687 ;;
5688esac
5689
5690if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005691
5692$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005693
5694
5695fi
5696
5697
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5699$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005701if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702 enableval=$enable_shared;
5703fi
5704
5705
5706if test -z "$enable_shared"
5707then
5708 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005709 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 enable_shared="yes";;
5711 *)
5712 enable_shared="no";;
5713 esac
5714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5716$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5719$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005721if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005722 enableval=$enable_profiling;
5723fi
5724
5725if test "x$enable_profiling" = xyes; then
5726 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005727 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729/* end confdefs.h. */
5730int main() { return 0; }
5731_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005732if ac_fn_c_try_link "$LINENO"; then :
5733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005735 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005737rm -f core conftest.err conftest.$ac_objext \
5738 conftest$ac_exeext conftest.$ac_ext
5739 CC="$ac_save_cc"
5740else
5741 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5744$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
doko@ubuntu.comba015832012-06-30 16:52:05 +02005746if test "x$enable_profiling" = xyes; then
5747 BASECFLAGS="-pg $BASECFLAGS"
5748 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
5750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5752$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
5754# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5755# library that we build, but we do not want to link against it (we
5756# will find it with a -framework option). For this reason there is an
5757# extra variable BLDLIBRARY against which Python and the extension
5758# modules are linked, BLDLIBRARY. This is normally the same as
5759# LDLIBRARY, but empty for MacOSX framework builds.
5760if test "$enable_framework"
5761then
5762 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005763 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005764 BLDLIBRARY=''
5765else
5766 BLDLIBRARY='$(LDLIBRARY)'
5767fi
5768
5769# Other platforms follow
5770if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005771 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772
Matthias Kloseb9621712010-04-24 17:59:49 +00005773$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775 case $ac_sys_system in
5776 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005777 LDLIBRARY='libpython$(LDVERSION).dll.a'
5778 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779 ;;
5780 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005781 LDLIBRARY='libpython$(LDVERSION).so'
5782 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005783 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005785 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005786 then
5787 PY3LIBRARY=libpython3.so
5788 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005790 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005791 LDLIBRARY='libpython$(LDVERSION).so'
5792 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005793 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005795 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005796 then
5797 PY3LIBRARY=libpython3.so
5798 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 ;;
5800 hp*|HP*)
5801 case `uname -m` in
5802 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005803 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 ;;
5805 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005806 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 ;;
5808 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005809 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005810 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005813 LDLIBRARY='libpython$(LDVERSION).dylib'
5814 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005815 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005817 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005818 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005819 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005820 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821
5822 esac
5823else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005824 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005825 case $ac_sys_system in
5826 CYGWIN*)
5827 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005828 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 ;;
5830 esac
5831fi
5832
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005833if test "$cross_compiling" = yes; then
5834 RUNSHARED=
5835fi
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5838$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
5840if test -n "$ac_tool_prefix"; then
5841 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5842set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5844$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005845if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005846 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847else
5848 if test -n "$RANLIB"; then
5849 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5850else
5851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852for as_dir in $PATH
5853do
5854 IFS=$as_save_IFS
5855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005856 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860 break 2
5861 fi
5862done
Matthias Kloseb9621712010-04-24 17:59:49 +00005863 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864IFS=$as_save_IFS
5865
5866fi
5867fi
5868RANLIB=$ac_cv_prog_RANLIB
5869if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5871$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872else
Matthias Kloseb9621712010-04-24 17:59:49 +00005873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5874$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
5876
5877
5878fi
5879if test -z "$ac_cv_prog_RANLIB"; then
5880 ac_ct_RANLIB=$RANLIB
5881 # Extract the first word of "ranlib", so it can be a program name with args.
5882set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5884$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005885if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005886 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887else
5888 if test -n "$ac_ct_RANLIB"; then
5889 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5890else
5891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5892for as_dir in $PATH
5893do
5894 IFS=$as_save_IFS
5895 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005896 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 break 2
5901 fi
5902done
Matthias Kloseb9621712010-04-24 17:59:49 +00005903 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904IFS=$as_save_IFS
5905
5906fi
5907fi
5908ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5909if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5911$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912else
Matthias Kloseb9621712010-04-24 17:59:49 +00005913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915fi
5916
5917 if test "x$ac_ct_RANLIB" = x; then
5918 RANLIB=":"
5919 else
5920 case $cross_compiling:$ac_tool_warned in
5921yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005922{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5923$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924ac_tool_warned=yes ;;
5925esac
5926 RANLIB=$ac_ct_RANLIB
5927 fi
5928else
5929 RANLIB="$ac_cv_prog_RANLIB"
5930fi
5931
5932
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005933if test -n "$ac_tool_prefix"; then
5934 for ac_prog in ar aal
5935 do
5936 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5937set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5939$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005940if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005941 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942else
5943 if test -n "$AR"; then
5944 ac_cv_prog_AR="$AR" # Let the user override the test.
5945else
5946as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5947for as_dir in $PATH
5948do
5949 IFS=$as_save_IFS
5950 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005952 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005953 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 break 2
5956 fi
5957done
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959IFS=$as_save_IFS
5960
5961fi
5962fi
5963AR=$ac_cv_prog_AR
5964if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5966$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967else
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5969$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
5972
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005973 test -n "$AR" && break
5974 done
5975fi
5976if test -z "$AR"; then
5977 ac_ct_AR=$AR
5978 for ac_prog in ar aal
5979do
5980 # Extract the first word of "$ac_prog", so it can be a program name with args.
5981set dummy $ac_prog; ac_word=$2
5982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5983$as_echo_n "checking for $ac_word... " >&6; }
5984if ${ac_cv_prog_ac_ct_AR+:} false; then :
5985 $as_echo_n "(cached) " >&6
5986else
5987 if test -n "$ac_ct_AR"; then
5988 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5989else
5990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5991for as_dir in $PATH
5992do
5993 IFS=$as_save_IFS
5994 test -z "$as_dir" && as_dir=.
5995 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005997 ac_cv_prog_ac_ct_AR="$ac_prog"
5998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5999 break 2
6000 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002 done
6003IFS=$as_save_IFS
6004
6005fi
6006fi
6007ac_ct_AR=$ac_cv_prog_ac_ct_AR
6008if test -n "$ac_ct_AR"; then
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6010$as_echo "$ac_ct_AR" >&6; }
6011else
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017 test -n "$ac_ct_AR" && break
6018done
6019
6020 if test "x$ac_ct_AR" = x; then
6021 AR="ar"
6022 else
6023 case $cross_compiling:$ac_tool_warned in
6024yes:)
6025{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6026$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6027ac_tool_warned=yes ;;
6028esac
6029 AR=$ac_ct_AR
6030 fi
6031fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032
6033
6034# tweak ARFLAGS only if the user didn't set it on the command line
6035
6036if test -z "$ARFLAGS"
6037then
6038 ARFLAGS="rc"
6039fi
6040
doko@ubuntu.com58844492012-06-30 18:25:32 +02006041if test -n "$ac_tool_prefix"; then
6042 for ac_prog in readelf
6043 do
6044 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6045set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6047$as_echo_n "checking for $ac_word... " >&6; }
6048if ${ac_cv_prog_READELF+:} false; then :
6049 $as_echo_n "(cached) " >&6
6050else
6051 if test -n "$READELF"; then
6052 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6053else
6054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6055for as_dir in $PATH
6056do
6057 IFS=$as_save_IFS
6058 test -z "$as_dir" && as_dir=.
6059 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006061 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6063 break 2
6064 fi
6065done
6066 done
6067IFS=$as_save_IFS
6068
6069fi
6070fi
6071READELF=$ac_cv_prog_READELF
6072if test -n "$READELF"; then
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6074$as_echo "$READELF" >&6; }
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078fi
6079
6080
6081 test -n "$READELF" && break
6082 done
6083fi
6084if test -z "$READELF"; then
6085 ac_ct_READELF=$READELF
6086 for ac_prog in readelf
6087do
6088 # Extract the first word of "$ac_prog", so it can be a program name with args.
6089set dummy $ac_prog; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6093 $as_echo_n "(cached) " >&6
6094else
6095 if test -n "$ac_ct_READELF"; then
6096 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6097else
6098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101 IFS=$as_save_IFS
6102 test -z "$as_dir" && as_dir=.
6103 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006104 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006105 ac_cv_prog_ac_ct_READELF="$ac_prog"
6106 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107 break 2
6108 fi
6109done
6110 done
6111IFS=$as_save_IFS
6112
6113fi
6114fi
6115ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6116if test -n "$ac_ct_READELF"; then
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6118$as_echo "$ac_ct_READELF" >&6; }
6119else
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6121$as_echo "no" >&6; }
6122fi
6123
6124
6125 test -n "$ac_ct_READELF" && break
6126done
6127
6128 if test "x$ac_ct_READELF" = x; then
6129 READELF=":"
6130 else
6131 case $cross_compiling:$ac_tool_warned in
6132yes:)
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6135ac_tool_warned=yes ;;
6136esac
6137 READELF=$ac_ct_READELF
6138 fi
6139fi
6140
6141if test "$cross_compiling" = yes; then
6142 case "$READELF" in
6143 readelf|:)
6144 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6145 ;;
6146 esac
6147fi
6148
6149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150
Matthias Klosec4c48422012-10-21 23:05:35 +02006151for ac_prog in python$PACKAGE_VERSION python3 python
6152do
6153 # Extract the first word of "$ac_prog", so it can be a program name with args.
6154set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6156$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006157if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006158 $as_echo_n "(cached) " >&6
6159else
Matthias Klosec4c48422012-10-21 23:05:35 +02006160 if test -n "$PYTHON"; then
6161 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006162else
6163as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH
6165do
6166 IFS=$as_save_IFS
6167 test -z "$as_dir" && as_dir=.
6168 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006169 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006170 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6172 break 2
6173 fi
6174done
6175 done
6176IFS=$as_save_IFS
6177
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006178fi
6179fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006180PYTHON=$ac_cv_prog_PYTHON
6181if test -n "$PYTHON"; then
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6183$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006184else
6185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }
6187fi
6188
6189
Matthias Klosec4c48422012-10-21 23:05:35 +02006190 test -n "$PYTHON" && break
6191done
6192test -n "$PYTHON" || PYTHON="not-found"
6193
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006194if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006195 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6196else
6197 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006198fi
6199
6200
Kushal Das02d23a22014-04-15 23:50:06 +05306201for ac_prog in python$PACKAGE_VERSION python3 python
6202do
6203 # Extract the first word of "$ac_prog", so it can be a program name with args.
6204set dummy $ac_prog; ac_word=$2
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6206$as_echo_n "checking for $ac_word... " >&6; }
6207if ${ac_cv_prog_PYTHON+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209else
6210 if test -n "$PYTHON"; then
6211 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6212else
6213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH
6215do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
6218 for ac_exec_ext in '' $ac_executable_extensions; do
6219 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220 ac_cv_prog_PYTHON="$ac_prog"
6221 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222 break 2
6223 fi
6224done
6225 done
6226IFS=$as_save_IFS
6227
6228fi
6229fi
6230PYTHON=$ac_cv_prog_PYTHON
6231if test -n "$PYTHON"; then
6232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6233$as_echo "$PYTHON" >&6; }
6234else
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6236$as_echo "no" >&6; }
6237fi
6238
6239
6240 test -n "$PYTHON" && break
6241done
6242test -n "$PYTHON" || PYTHON="not-found"
6243
6244if test "$PYTHON" = not-found; then
6245 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6246else
6247 OPCODEHGEN="$PYTHON"
6248fi
6249
6250
6251
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252case $MACHDEP in
6253bsdos*|hp*|HP*)
6254 # install -d does not work on BSDI or HP-UX
6255 if test -z "$INSTALL"
6256 then
6257 INSTALL="${srcdir}/install-sh -c"
6258 fi
6259esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260# Find a good install program. We prefer a C program (faster),
6261# so one script is as good as another. But avoid the broken or
6262# incompatible versions:
6263# SysV /etc/install, /usr/sbin/install
6264# SunOS /usr/etc/install
6265# IRIX /sbin/install
6266# AIX /bin/install
6267# AmigaOS /C/install, which installs bootblocks on floppy discs
6268# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6269# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6270# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6271# OS/2's system install, which has a completely different semantic
6272# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006273# Reject install programs that cannot install multiple files.
6274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6275$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006277if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006278 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006279else
6280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283 IFS=$as_save_IFS
6284 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 # Account for people who put trailing slashes in PATH elements.
6286case $as_dir/ in #((
6287 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006289 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006290 /usr/ucb/* ) ;;
6291 *)
6292 # OSF1 and SCO ODT 3.0 have their own names for install.
6293 # Don't use installbsd from OSF since it installs stuff as root
6294 # by default.
6295 for ac_prog in ginstall scoinst install; do
6296 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006297 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006298 if test $ac_prog = install &&
6299 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6300 # AIX install. It has an incompatible calling convention.
6301 :
6302 elif test $ac_prog = install &&
6303 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6304 # program-specific install script used by HP pwplus--don't use.
6305 :
6306 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006307 rm -rf conftest.one conftest.two conftest.dir
6308 echo one > conftest.one
6309 echo two > conftest.two
6310 mkdir conftest.dir
6311 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6312 test -s conftest.one && test -s conftest.two &&
6313 test -s conftest.dir/conftest.one &&
6314 test -s conftest.dir/conftest.two
6315 then
6316 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6317 break 3
6318 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 fi
6320 fi
6321 done
6322 done
6323 ;;
6324esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006325
6326 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327IFS=$as_save_IFS
6328
Matthias Kloseb9621712010-04-24 17:59:49 +00006329rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330
6331fi
6332 if test "${ac_cv_path_install+set}" = set; then
6333 INSTALL=$ac_cv_path_install
6334 else
6335 # As a last resort, use the slow shell script. Don't cache a
6336 # value for INSTALL within a source directory, because that will
6337 # break other packages using the cache if that directory is
6338 # removed, or if the value is a relative name.
6339 INSTALL=$ac_install_sh
6340 fi
6341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6343$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344
6345# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6346# It thinks the first close brace ends the variable substitution.
6347test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6348
6349test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6350
6351test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6352
Matthias Klose93a0ef12012-03-15 18:08:34 +01006353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6354$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6355if test -z "$MKDIR_P"; then
6356 if ${ac_cv_path_mkdir+:} false; then :
6357 $as_echo_n "(cached) " >&6
6358else
6359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6360for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6361do
6362 IFS=$as_save_IFS
6363 test -z "$as_dir" && as_dir=.
6364 for ac_prog in mkdir gmkdir; do
6365 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006366 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006367 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6368 'mkdir (GNU coreutils) '* | \
6369 'mkdir (coreutils) '* | \
6370 'mkdir (fileutils) '4.1*)
6371 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6372 break 3;;
6373 esac
6374 done
6375 done
6376 done
6377IFS=$as_save_IFS
6378
6379fi
6380
6381 test -d ./--version && rmdir ./--version
6382 if test "${ac_cv_path_mkdir+set}" = set; then
6383 MKDIR_P="$ac_cv_path_mkdir -p"
6384 else
6385 # As a last resort, use the slow shell script. Don't cache a
6386 # value for MKDIR_P within a source directory, because that will
6387 # break other packages using the cache if that directory is
6388 # removed, or if the value is a relative name.
6389 MKDIR_P="$ac_install_sh -d"
6390 fi
6391fi
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6393$as_echo "$MKDIR_P" >&6; }
6394
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395
6396# Not every filesystem supports hard links
6397
6398if test -z "$LN" ; then
6399 case $ac_sys_system in
6400 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401 *) LN=ln;;
6402 esac
6403fi
6404
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006405# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006406
6407ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6411$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412
6413# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006414if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415 withval=$with_pydebug;
6416if test "$withval" != no
6417then
6418
Matthias Kloseb9621712010-04-24 17:59:49 +00006419$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420
Matthias Kloseb9621712010-04-24 17:59:49 +00006421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6422$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006424 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006425else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427fi
6428else
Matthias Kloseb9621712010-04-24 17:59:49 +00006429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6430$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431fi
6432
6433
6434# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6435# merged with this chunk of code?
6436
6437# Optimizer/debugger flags
6438# ------------------------
6439# (The following bit of code is complicated enough - please keep things
6440# indented properly. Just pretend you're editing Python code. ;-)
6441
6442# There are two parallel sets of case statements below, one that checks to
6443# see if OPT was set and one that does BASECFLAGS setting based upon
6444# compiler and platform. BASECFLAGS tweaks need to be made even if the
6445# user set OPT.
6446
6447# tweak OPT based on compiler and platform, only if the user didn't set
6448# it on the command line
6449
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006450if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451then
6452 case $GCC in
6453 yes)
6454 if test "$CC" != 'g++' ; then
6455 STRICT_PROTO="-Wstrict-prototypes"
6456 fi
6457 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6458 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6459 WRAP="-fwrapv"
6460 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006461
6462 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006463 case $CC in
6464 *clang*) WRAP="-fwrapv"
6465 ;;
6466 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006467
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006468 case $ac_cv_prog_cc_g in
6469 yes)
6470 if test "$Py_DEBUG" = 'true' ; then
6471 # Optimization messes up debuggers, so turn it off for
6472 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006473 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6474 OPT="-g -Og -Wall $STRICT_PROTO"
6475 else
6476 OPT="-g -O0 -Wall $STRICT_PROTO"
6477 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006478 else
6479 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6480 fi
6481 ;;
6482 *)
6483 OPT="-O3 -Wall $STRICT_PROTO"
6484 ;;
6485 esac
6486 case $ac_sys_system in
6487 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6488 ;;
6489 esac
6490 ;;
6491
6492 *)
6493 OPT="-O"
6494 ;;
6495 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496fi
6497
6498
6499
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501# The -arch flags for universal builds on OSX
6502UNIVERSAL_ARCH_FLAGS=
6503
6504
6505# tweak BASECFLAGS based on compiler and platform
6506case $GCC in
6507yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006508 # Python doesn't violate C99 aliasing rules, but older versions of
6509 # GCC produce warnings for legal Python code. Enable
6510 # -fno-strict-aliasing on versions of GCC that support but produce
6511 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6513$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006514 ac_save_cc="$CC"
6515 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006516 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006517 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006518 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006519else
Matthias Kloseb9621712010-04-24 17:59:49 +00006520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006522
Matthias Kloseb159a552010-04-25 21:00:44 +00006523
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006524int
6525main ()
6526{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006527
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006528 ;
6529 return 0;
6530}
Matthias Kloseb159a552010-04-25 21:00:44 +00006531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006533if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006534
6535 CC="$ac_save_cc -fstrict-aliasing"
6536 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006538/* end confdefs.h. */
6539
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006540 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006541int
6542main ()
6543{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006544double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006545 ;
6546 return 0;
6547}
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006550if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006551
6552 ac_cv_no_strict_aliasing=no
6553
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554else
Matthias Kloseb159a552010-04-25 21:00:44 +00006555
6556 ac_cv_no_strict_aliasing=yes
6557
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006558fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006560
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006561else
Matthias Kloseb159a552010-04-25 21:00:44 +00006562
6563 ac_cv_no_strict_aliasing=no
6564
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006565fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006567fi
6568
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006569 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6572$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006573 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574 then
6575 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6576 fi
6577
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6579$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6580 ac_save_cc="$CC"
6581 CC="$CC -Wunused-result -Werror"
6582 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006583 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006584 $as_echo_n "(cached) " >&6
6585else
6586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6587/* end confdefs.h. */
6588
6589
6590int
6591main ()
6592{
6593
6594 ;
6595 return 0;
6596}
6597
6598_ACEOF
6599if ac_fn_c_try_compile "$LINENO"; then :
6600
6601 ac_cv_disable_unused_result_warning=yes
6602
6603else
6604
6605 ac_cv_disable_unused_result_warning=no
6606
6607fi
6608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6609fi
6610
6611 CFLAGS="$save_CFLAGS"
6612 CC="$ac_save_cc"
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6614$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6615
6616 if test $ac_cv_disable_unused_result_warning = yes
6617 then
6618 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6619 fi
6620
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6622$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6623 ac_save_cc="$CC"
6624 CC="$CC -Werror=declaration-after-statement"
6625 save_CFLAGS="$CFLAGS"
6626 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628else
6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630/* end confdefs.h. */
6631
6632
6633int
6634main ()
6635{
6636
6637 ;
6638 return 0;
6639}
6640
6641_ACEOF
6642if ac_fn_c_try_compile "$LINENO"; then :
6643
6644 ac_cv_declaration_after_statement_warning=yes
6645
6646else
6647
6648 ac_cv_declaration_after_statement_warning=no
6649
6650fi
6651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6652fi
6653
6654 CFLAGS="$save_CFLAGS"
6655 CC="$ac_save_cc"
6656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6657$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6658
6659 if test $ac_cv_declaration_after_statement_warning = yes
6660 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006661 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006662 fi
6663
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6665$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6666 ac_save_cc="$CC"
6667 CC="$CC -Wsign-compare"
6668 save_CFLAGS="$CFLAGS"
6669 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6670 $as_echo_n "(cached) " >&6
6671else
6672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6673/* end confdefs.h. */
6674
6675
6676int
6677main ()
6678{
6679
6680 ;
6681 return 0;
6682}
6683
6684_ACEOF
6685if ac_fn_c_try_compile "$LINENO"; then :
6686
6687 ac_cv_enable_sign_compare_warning=yes
6688
6689else
6690
6691 ac_cv_enable_sign_compare_warning=no
6692
6693fi
6694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6695fi
6696
6697 CFLAGS="$save_CFLAGS"
6698 CC="$ac_save_cc"
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6700$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6701
6702 if test $ac_cv_enable_sign_compare_warning = yes
6703 then
6704 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6705 fi
6706
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6708$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6709 ac_save_cc="$CC"
6710 CC="$CC -Wunreachable-code"
6711 save_CFLAGS="$CFLAGS"
6712 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6713 $as_echo_n "(cached) " >&6
6714else
6715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6716/* end confdefs.h. */
6717
6718
6719int
6720main ()
6721{
6722
6723 ;
6724 return 0;
6725}
6726
6727_ACEOF
6728if ac_fn_c_try_compile "$LINENO"; then :
6729
6730 ac_cv_enable_unreachable_code_warning=yes
6731
6732else
6733
6734 ac_cv_enable_unreachable_code_warning=no
6735
6736fi
6737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6738fi
6739
6740 CFLAGS="$save_CFLAGS"
6741 CC="$ac_save_cc"
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6743$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
6744
6745 # Don't enable unreachable code warning in debug mode, since it usually
6746 # results in non-standard code paths.
6747 if test $ac_cv_enable_unreachable_code_warning = yes && test "$Py_DEBUG" != "true"
6748 then
6749 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
6750 fi
6751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6753 # support. Without this, treatment of subnormals doesn't follow
6754 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006755 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756 alpha*)
6757 BASECFLAGS="$BASECFLAGS -mieee"
6758 ;;
6759 esac
6760
6761 case $ac_sys_system in
6762 SCO_SV*)
6763 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6764 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006765
6766 # is there any other compiler on Darwin besides gcc?
6767 Darwin*)
6768 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6769 # used to be here, but non-Apple gcc doesn't accept them.
6770 if test "${CC}" = gcc
6771 then
6772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006773$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006774 case "${UNIVERSALSDK}" in
6775 */MacOSX10.4u.sdk)
6776 # Build using 10.4 SDK, force usage of gcc when the
6777 # compiler is gcc, otherwise the user will get very
6778 # confusing error messages when building on OSX 10.6
6779 CC=gcc-4.0
6780 CPP=cpp-4.0
6781 ;;
6782 esac
6783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006784$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006785 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786
Ned Deily87adb6e2013-10-18 21:09:56 -07006787 if test "${enable_universalsdk}"
6788 then
6789 case "$UNIVERSAL_ARCHS" in
6790 32-bit)
6791 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6792 LIPO_32BIT_FLAGS=""
6793 ARCH_RUN_32BIT=""
6794 ;;
6795 64-bit)
6796 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6797 LIPO_32BIT_FLAGS=""
6798 ARCH_RUN_32BIT="true"
6799 ;;
6800 all)
6801 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6802 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6803 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6804 ;;
6805 intel)
6806 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6807 LIPO_32BIT_FLAGS="-extract i386"
6808 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6809 ;;
6810 intel-32)
6811 UNIVERSAL_ARCH_FLAGS="-arch i386"
6812 LIPO_32BIT_FLAGS=""
6813 ARCH_RUN_32BIT=""
6814 ;;
6815 3-way)
6816 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6817 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6818 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6819 ;;
6820 *)
6821 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6822 ;;
6823 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824
Ned Deily87adb6e2013-10-18 21:09:56 -07006825 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6826 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6827 if test "${UNIVERSALSDK}" != "/"
6828 then
6829 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6830 fi
6831 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832
Ned Deily87adb6e2013-10-18 21:09:56 -07006833 # Calculate an appropriate deployment target for this build:
6834 # The deployment target value is used explicitly to enable certain
6835 # features are enabled (such as builtin libedit support for readline)
6836 # through the use of Apple's Availabiliy Macros and is used as a
6837 # component of the string returned by distutils.get_platform().
6838 #
6839 # Use the value from:
6840 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6841 # 2. the operating system version of the build machine if >= 10.6
6842 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6843 # below to pick either 10.3, 10.4, or 10.5 as the target.
6844 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845
Ned Deily87adb6e2013-10-18 21:09:56 -07006846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6847$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006848 cur_target_major=`sw_vers -productVersion | \
6849 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6850 cur_target_minor=`sw_vers -productVersion | \
6851 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6852 cur_target="${cur_target_major}.${cur_target_minor}"
6853 if test ${cur_target_major} -eq 10 && \
6854 test ${cur_target_minor} -ge 3 && \
6855 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006856 then
Ned Deily36820b62014-06-25 13:44:22 -07006857 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006858 cur_target=10.3
6859 if test ${enable_universalsdk}
6860 then
6861 case "$UNIVERSAL_ARCHS" in
6862 all|3-way|intel|64-bit)
6863 # These configurations were first supported in 10.5
6864 cur_target='10.5'
6865 ;;
6866 esac
6867 else
6868 if test `/usr/bin/arch` = "i386"
6869 then
6870 # 10.4 was the first release to support Intel archs
6871 cur_target="10.4"
6872 fi
6873 fi
6874 fi
6875 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006876
Ned Deily87adb6e2013-10-18 21:09:56 -07006877 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6878 # environment with a value that is the same as what we'll use
6879 # in the Makefile to ensure that we'll get the same compiler
6880 # environment during configure and build time.
6881 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6882 export MACOSX_DEPLOYMENT_TARGET
6883 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6885$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006886
Ned Deily87adb6e2013-10-18 21:09:56 -07006887 # end of Darwin* tests
6888 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 esac
6890 ;;
6891
6892*)
6893 case $ac_sys_system in
6894 OpenUNIX*|UnixWare*)
6895 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6896 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 SCO_SV*)
6898 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6899 ;;
6900 esac
6901 ;;
6902esac
6903
6904if test "$Py_DEBUG" = 'true'; then
6905 :
6906else
6907 OPT="-DNDEBUG $OPT"
6908fi
6909
6910if test "$ac_arch_flags"
6911then
6912 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6913fi
6914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915# On some compilers, pthreads are available without further options
6916# (e.g. MacOS X). On some of these systems, the compiler will not
6917# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6918# So we have to see first whether pthreads are available without
6919# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6921$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006922if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924else
Matthias Kloseb9621712010-04-24 17:59:49 +00006925 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926 ac_cv_pthread_is_default=no
6927else
Matthias Kloseb9621712010-04-24 17:59:49 +00006928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929/* end confdefs.h. */
6930
Stefan Krah7dba5942012-11-22 22:49:11 +01006931#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932#include <pthread.h>
6933
6934void* routine(void* p){return NULL;}
6935
6936int main(){
6937 pthread_t p;
6938 if(pthread_create(&p,NULL,routine,NULL)!=0)
6939 return 1;
6940 (void)pthread_detach(p);
6941 return 0;
6942}
6943
6944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946
6947 ac_cv_pthread_is_default=yes
6948 ac_cv_kthread=no
6949 ac_cv_pthread=no
6950
6951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006954rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6955 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956fi
6957
6958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959fi
6960
Matthias Kloseb9621712010-04-24 17:59:49 +00006961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6962$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006963
6964
6965if test $ac_cv_pthread_is_default = yes
6966then
6967 ac_cv_kpthread=no
6968else
6969# -Kpthread, if available, provides the right #defines
6970# and linker options to make pthread_create available
6971# Some compilers won't report that they do not support -Kpthread,
6972# so we need to run a program to see whether it really made the
6973# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6975$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006976if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006977 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978else
6979 ac_save_cc="$CC"
6980CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006981if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982 ac_cv_kpthread=no
6983else
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985/* end confdefs.h. */
6986
Stefan Krah7dba5942012-11-22 22:49:11 +01006987#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988#include <pthread.h>
6989
6990void* routine(void* p){return NULL;}
6991
6992int main(){
6993 pthread_t p;
6994 if(pthread_create(&p,NULL,routine,NULL)!=0)
6995 return 1;
6996 (void)pthread_detach(p);
6997 return 0;
6998}
6999
7000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007001if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007002 ac_cv_kpthread=yes
7003else
Matthias Kloseb9621712010-04-24 17:59:49 +00007004 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7007 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008fi
7009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010CC="$ac_save_cc"
7011fi
7012
Matthias Kloseb9621712010-04-24 17:59:49 +00007013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7014$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007015fi
7016
7017if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7018then
7019# -Kthread, if available, provides the right #defines
7020# and linker options to make pthread_create available
7021# Some compilers won't report that they do not support -Kthread,
7022# so we need to run a program to see whether it really made the
7023# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7025$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007026if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028else
7029 ac_save_cc="$CC"
7030CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007032 ac_cv_kthread=no
7033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035/* end confdefs.h. */
7036
Stefan Krah7dba5942012-11-22 22:49:11 +01007037#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038#include <pthread.h>
7039
7040void* routine(void* p){return NULL;}
7041
7042int main(){
7043 pthread_t p;
7044 if(pthread_create(&p,NULL,routine,NULL)!=0)
7045 return 1;
7046 (void)pthread_detach(p);
7047 return 0;
7048}
7049
7050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007051if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052 ac_cv_kthread=yes
7053else
Matthias Kloseb9621712010-04-24 17:59:49 +00007054 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058fi
7059
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007060CC="$ac_save_cc"
7061fi
7062
Matthias Kloseb9621712010-04-24 17:59:49 +00007063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7064$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065fi
7066
7067if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7068then
7069# -pthread, if available, provides the right #defines
7070# and linker options to make pthread_create available
7071# Some compilers won't report that they do not support -pthread,
7072# so we need to run a program to see whether it really made the
7073# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7075$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007076if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007077 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007078else
7079 ac_save_cc="$CC"
7080CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007081if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007082 ac_cv_pthread=no
7083else
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007085/* end confdefs.h. */
7086
Stefan Krah7dba5942012-11-22 22:49:11 +01007087#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088#include <pthread.h>
7089
7090void* routine(void* p){return NULL;}
7091
7092int main(){
7093 pthread_t p;
7094 if(pthread_create(&p,NULL,routine,NULL)!=0)
7095 return 1;
7096 (void)pthread_detach(p);
7097 return 0;
7098}
7099
7100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007101if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007102 ac_cv_pthread=yes
7103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007108fi
7109
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007110CC="$ac_save_cc"
7111fi
7112
Matthias Kloseb9621712010-04-24 17:59:49 +00007113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7114$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007115fi
7116
7117# If we have set a CC compiler flag for thread support then
7118# check if it works for CXX, too.
7119ac_cv_cxx_thread=no
7120if test ! -z "$CXX"
7121then
Matthias Kloseb9621712010-04-24 17:59:49 +00007122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7123$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124ac_save_cxx="$CXX"
7125
7126if test "$ac_cv_kpthread" = "yes"
7127then
7128 CXX="$CXX -Kpthread"
7129 ac_cv_cxx_thread=yes
7130elif test "$ac_cv_kthread" = "yes"
7131then
7132 CXX="$CXX -Kthread"
7133 ac_cv_cxx_thread=yes
7134elif test "$ac_cv_pthread" = "yes"
7135then
7136 CXX="$CXX -pthread"
7137 ac_cv_cxx_thread=yes
7138fi
7139
7140if test $ac_cv_cxx_thread = yes
7141then
7142 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7143 $CXX -c conftest.$ac_ext 2>&5
7144 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7145 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7146 then
7147 ac_cv_cxx_thread=yes
7148 else
7149 ac_cv_cxx_thread=no
7150 fi
7151 rm -fr conftest*
7152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7154$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007155fi
7156CXX="$ac_save_cxx"
7157
7158
7159# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7161$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007162if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164else
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166/* end confdefs.h. */
7167#include <stdlib.h>
7168#include <stdarg.h>
7169#include <string.h>
7170#include <float.h>
7171
7172int
7173main ()
7174{
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007180if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007181 ac_cv_header_stdc=yes
7182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007184fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7186
7187if test $ac_cv_header_stdc = yes; then
7188 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190/* end confdefs.h. */
7191#include <string.h>
7192
7193_ACEOF
7194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007195 $EGREP "memchr" >/dev/null 2>&1; then :
7196
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197else
7198 ac_cv_header_stdc=no
7199fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007200rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201
7202fi
7203
7204if test $ac_cv_header_stdc = yes; then
7205 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007207/* end confdefs.h. */
7208#include <stdlib.h>
7209
7210_ACEOF
7211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 $EGREP "free" >/dev/null 2>&1; then :
7213
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214else
7215 ac_cv_header_stdc=no
7216fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007217rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218
7219fi
7220
7221if test $ac_cv_header_stdc = yes; then
7222 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224 :
7225else
Matthias Kloseb9621712010-04-24 17:59:49 +00007226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227/* end confdefs.h. */
7228#include <ctype.h>
7229#include <stdlib.h>
7230#if ((' ' & 0x0FF) == 0x020)
7231# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7232# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7233#else
7234# define ISLOWER(c) \
7235 (('a' <= (c) && (c) <= 'i') \
7236 || ('j' <= (c) && (c) <= 'r') \
7237 || ('s' <= (c) && (c) <= 'z'))
7238# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7239#endif
7240
7241#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7242int
7243main ()
7244{
7245 int i;
7246 for (i = 0; i < 256; i++)
7247 if (XOR (islower (i), ISLOWER (i))
7248 || toupper (i) != TOUPPER (i))
7249 return 2;
7250 return 0;
7251}
7252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007253if ac_fn_c_try_run "$LINENO"; then :
7254
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255else
Matthias Kloseb9621712010-04-24 17:59:49 +00007256 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260fi
7261
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262fi
7263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7265$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266if test $ac_cv_header_stdc = yes; then
7267
Matthias Kloseb9621712010-04-24 17:59:49 +00007268$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269
7270fi
7271
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007272for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007273fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007274ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007275sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007276unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007277poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007278sys/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 +01007279sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007280sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007281sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007282sys/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 -07007283libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007284bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7285sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007286do :
7287 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7288ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007289if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007290 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007291#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007292_ACEOF
7293
7294fi
7295
Guido van Rossum627b2d71993-12-24 10:39:16 +00007296done
7297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007298ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007299for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7302$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007303if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305else
Matthias Kloseb9621712010-04-24 17:59:49 +00007306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007307/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007308#include <sys/types.h>
7309#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
Martin v. Löwis11437992002-04-12 09:54:03 +00007311int
7312main ()
7313{
7314if ((DIR *) 0)
7315return 0;
7316 ;
7317 return 0;
7318}
7319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007320if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007321 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007322else
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007327eval ac_res=\$$as_ac_Header
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7329$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007330if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007332#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007333_ACEOF
7334
7335ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007336fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007337
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007338done
7339# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7340if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7342$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007343if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007344 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007345else
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007350/* Override any GCC internal prototype to avoid an error.
7351 Use char because int might match the return type of a GCC
7352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007353#ifdef __cplusplus
7354extern "C"
7355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007356char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007357int
7358main ()
7359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007360return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 ;
7362 return 0;
7363}
7364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007365for ac_lib in '' dir; do
7366 if test -z "$ac_lib"; then
7367 ac_res="none required"
7368 else
7369 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007370 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007371 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007372 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007373 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007375rm -f core conftest.err conftest.$ac_objext \
7376 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007377 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007378 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007380done
Victor Stinnere0be4232011-10-25 13:06:09 +02007381if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007382
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007383else
7384 ac_cv_search_opendir=no
7385fi
7386rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007387LIBS=$ac_func_search_save_LIBS
7388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7390$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007391ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007392if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007393 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007395fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007396
Michael W. Hudson54241132001-12-07 15:38:26 +00007397else
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7399$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007402else
7403 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007405/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007407/* Override any GCC internal prototype to avoid an error.
7408 Use char because int might match the return type of a GCC
7409 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007410#ifdef __cplusplus
7411extern "C"
7412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007413char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007414int
7415main ()
7416{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007417return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007418 ;
7419 return 0;
7420}
7421_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007422for ac_lib in '' x; do
7423 if test -z "$ac_lib"; then
7424 ac_res="none required"
7425 else
7426 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007427 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007428 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007430 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007432rm -f core conftest.err conftest.$ac_objext \
7433 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007434 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007435 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007437done
Victor Stinnere0be4232011-10-25 13:06:09 +02007438if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007440else
7441 ac_cv_search_opendir=no
7442fi
7443rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007444LIBS=$ac_func_search_save_LIBS
7445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7447$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007448ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007449if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007450 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452fi
7453
7454fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007455
Matthias Kloseb9621712010-04-24 17:59:49 +00007456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7457$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007458if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007459 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007462/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007463#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007464int
7465main ()
7466{
7467return makedev(0, 0);
7468 ;
7469 return 0;
7470}
7471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007473 ac_cv_header_sys_types_h_makedev=yes
7474else
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007477rm -f core conftest.err conftest.$ac_objext \
7478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007479
7480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7482$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007483
7484if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007485ac_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 +02007486if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007489
7490fi
7491
7492
7493
7494 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 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 +02007496if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007497
Matthias Kloseb9621712010-04-24 17:59:49 +00007498$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007499
7500fi
7501
7502
7503 fi
7504fi
7505
Michael W. Hudson54241132001-12-07 15:38:26 +00007506
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007507# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7508for ac_header in net/if.h
7509do :
7510 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7511#ifdef STDC_HEADERS
7512# include <stdlib.h>
7513# include <stddef.h>
7514#else
7515# ifdef HAVE_STDLIB_H
7516# include <stdlib.h>
7517# endif
7518#endif
7519#ifdef HAVE_SYS_SOCKET_H
7520# include <sys/socket.h>
7521#endif
7522
7523"
Victor Stinnere0be4232011-10-25 13:06:09 +02007524if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007525 cat >>confdefs.h <<_ACEOF
7526#define HAVE_NET_IF_H 1
7527_ACEOF
7528
7529fi
7530
7531done
7532
7533
Martin v. Löwis11017b12006-01-14 18:12:57 +00007534# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007535for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007536do :
7537 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 +00007538#ifdef HAVE_ASM_TYPES_H
7539#include <asm/types.h>
7540#endif
7541#ifdef HAVE_SYS_SOCKET_H
7542#include <sys/socket.h>
7543#endif
7544
Matthias Kloseb9621712010-04-24 17:59:49 +00007545"
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007547 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007548#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007549_ACEOF
7550
7551fi
7552
7553done
7554
7555
Charles-François Natali47413c12011-10-06 19:47:44 +02007556# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007557for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007558do :
7559 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7560ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7561#ifdef HAVE_SYS_SOCKET_H
7562#include <sys/socket.h>
7563#endif
7564
7565"
7566if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7567 cat >>confdefs.h <<_ACEOF
7568#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7569_ACEOF
7570
7571fi
7572
7573done
7574
7575
Guido van Rossum627b2d71993-12-24 10:39:16 +00007576# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007577was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7579$as_echo_n "checking for clock_t in time.h... " >&6; }
7580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007582#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007583
7584_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007587 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007588else
Martin v. Löwis11437992002-04-12 09:54:03 +00007589
7590
Matthias Kloseb9621712010-04-24 17:59:49 +00007591$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007592
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007593
Guido van Rossum627b2d71993-12-24 10:39:16 +00007594fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007595rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007596
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7598$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007599
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7601$as_echo_n "checking for makedev... " >&6; }
7602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007603/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007604
Jesus Cea740f53a2010-04-28 11:35:30 +00007605#if defined(MAJOR_IN_MKDEV)
7606#include <sys/mkdev.h>
7607#elif defined(MAJOR_IN_SYSMACROS)
7608#include <sys/sysmacros.h>
7609#else
7610#include <sys/types.h>
7611#endif
7612
Neal Norwitz11690112002-07-30 01:08:28 +00007613int
7614main ()
7615{
Jesus Cea740f53a2010-04-28 11:35:30 +00007616
7617 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007618 ;
7619 return 0;
7620}
Matthias Kloseb159a552010-04-25 21:00:44 +00007621
Neal Norwitz11690112002-07-30 01:08:28 +00007622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007623if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007624 ac_cv_has_makedev=yes
7625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007628rm -f core conftest.err conftest.$ac_objext \
7629 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7631$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007632if test "$ac_cv_has_makedev" = "yes"; then
7633
Matthias Kloseb9621712010-04-24 17:59:49 +00007634$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007635
7636fi
7637
Christian Heimes985ecdc2013-11-20 11:46:18 +01007638# byte swapping
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7640$as_echo_n "checking for le64toh... " >&6; }
7641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7642/* end confdefs.h. */
7643
7644#ifdef HAVE_ENDIAN_H
7645#include <endian.h>
7646#elif defined(HAVE_SYS_ENDIAN_H)
7647#include <sys/endian.h>
7648#endif
7649
7650int
7651main ()
7652{
7653
7654 le64toh(1)
7655 ;
7656 return 0;
7657}
7658
7659_ACEOF
7660if ac_fn_c_try_link "$LINENO"; then :
7661 ac_cv_has_le64toh=yes
7662else
7663 ac_cv_has_le64toh=no
7664fi
7665rm -f core conftest.err conftest.$ac_objext \
7666 conftest$ac_exeext conftest.$ac_ext
7667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7668$as_echo "$ac_cv_has_le64toh" >&6; }
7669if test "$ac_cv_has_le64toh" = "yes"; then
7670
7671$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7672
7673fi
7674
Martin v. Löwis399a6892002-10-04 10:22:02 +00007675# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7676# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7677# defined, but the compiler does not support pragma redefine_extname,
7678# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7679# structures (such as rlimit64) without declaring them. As a
7680# work-around, disable LFS on such configurations
7681
7682use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7684$as_echo_n "checking Solaris LFS bug... " >&6; }
7685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007686/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007687
7688#define _LARGEFILE_SOURCE 1
7689#define _FILE_OFFSET_BITS 64
7690#include <sys/resource.h>
7691
Martin v. Löwis399a6892002-10-04 10:22:02 +00007692int
7693main ()
7694{
7695struct rlimit foo;
7696 ;
7697 return 0;
7698}
7699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007701 sol_lfs_bug=no
7702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7707$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007708if test "$sol_lfs_bug" = "yes"; then
7709 use_lfs=no
7710fi
7711
7712if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007713# Two defines needed to enable largefile support on various platforms
7714# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007715case $ac_sys_system/$ac_sys_release in
7716AIX*)
7717
7718$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7719
7720 ;;
7721esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007722
Matthias Kloseb9621712010-04-24 17:59:49 +00007723$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
7725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007727
Martin v. Löwis399a6892002-10-04 10:22:02 +00007728fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007729
Guido van Rossum84e7b241996-08-19 21:59:00 +00007730# Add some code to confdefs.h so that the test for off_t works on SCO
7731cat >> confdefs.h <<\EOF
7732#if defined(SCO_DS)
7733#undef _OFF_T
7734#endif
7735EOF
7736
Guido van Rossumef2255b2000-03-10 22:30:29 +00007737# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007738ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007739if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007740
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741else
Martin v. Löwis11437992002-04-12 09:54:03 +00007742
7743cat >>confdefs.h <<_ACEOF
7744#define mode_t int
7745_ACEOF
7746
7747fi
7748
Matthias Kloseb9621712010-04-24 17:59:49 +00007749ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007750if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752else
Martin v. Löwis11437992002-04-12 09:54:03 +00007753
7754cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007755#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007756_ACEOF
7757
7758fi
7759
Matthias Kloseb9621712010-04-24 17:59:49 +00007760ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007761if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007762
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007763else
Martin v. Löwis11437992002-04-12 09:54:03 +00007764
7765cat >>confdefs.h <<_ACEOF
7766#define pid_t int
7767_ACEOF
7768
7769fi
7770
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007773#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007774_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007775
Matthias Kloseb9621712010-04-24 17:59:49 +00007776ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007777if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007779else
Martin v. Löwis11437992002-04-12 09:54:03 +00007780
7781cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007783_ACEOF
7784
7785fi
7786
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7788$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007789if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007794#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007795
7796_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007798 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007799 ac_cv_type_uid_t=yes
7800else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007801 ac_cv_type_uid_t=no
7802fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007803rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007804
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7807$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007808if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007809
Matthias Kloseb9621712010-04-24 17:59:49 +00007810$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007811
7812
Matthias Kloseb9621712010-04-24 17:59:49 +00007813$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814
7815fi
7816
Mark Dickinson983bc162012-12-02 12:11:38 +00007817
7818# There are two separate checks for each of the exact-width integer types we
7819# need. First we check whether the type is available using the usual
7820# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7821# and <stdint.h> where available). We then also use the special type checks of
7822# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7823# directly, #define's uint32_t to be a suitable type.
7824
7825ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7826if test "x$ac_cv_type_uint32_t" = xyes; then :
7827
7828$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7829
7830fi
7831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7833case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007834 no|yes) ;; #(
7835 *)
7836
Matthias Kloseb9621712010-04-24 17:59:49 +00007837$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007838
7839
7840cat >>confdefs.h <<_ACEOF
7841#define uint32_t $ac_cv_c_uint32_t
7842_ACEOF
7843;;
7844 esac
7845
Mark Dickinson983bc162012-12-02 12:11:38 +00007846
7847ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7848if test "x$ac_cv_type_uint64_t" = xyes; then :
7849
7850$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7851
7852fi
7853
Matthias Kloseb9621712010-04-24 17:59:49 +00007854ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7855case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007856 no|yes) ;; #(
7857 *)
7858
Matthias Kloseb9621712010-04-24 17:59:49 +00007859$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007860
7861
7862cat >>confdefs.h <<_ACEOF
7863#define uint64_t $ac_cv_c_uint64_t
7864_ACEOF
7865;;
7866 esac
7867
Mark Dickinson983bc162012-12-02 12:11:38 +00007868
7869ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7870if test "x$ac_cv_type_int32_t" = xyes; then :
7871
7872$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7873
7874fi
7875
Matthias Kloseb9621712010-04-24 17:59:49 +00007876ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7877case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007878 no|yes) ;; #(
7879 *)
7880
7881cat >>confdefs.h <<_ACEOF
7882#define int32_t $ac_cv_c_int32_t
7883_ACEOF
7884;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007885esac
7886
Mark Dickinson983bc162012-12-02 12:11:38 +00007887
7888ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7889if test "x$ac_cv_type_int64_t" = xyes; then :
7890
7891$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7892
7893fi
7894
Matthias Kloseb9621712010-04-24 17:59:49 +00007895ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7896case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007897 no|yes) ;; #(
7898 *)
7899
7900cat >>confdefs.h <<_ACEOF
7901#define int64_t $ac_cv_c_int64_t
7902_ACEOF
7903;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007904esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007905
Mark Dickinson983bc162012-12-02 12:11:38 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007908if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007911
7912fi
7913
Stefan Krah1919b7e2012-03-21 18:25:23 +01007914ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7915if test "x$ac_cv_type___uint128_t" = xyes; then :
7916
7917$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7918
7919fi
7920
Jack Jansendd19cf82001-12-06 22:36:17 +00007921
Michael W. Hudson54241132001-12-07 15:38:26 +00007922# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007923# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007924# The cast to long int works around a bug in the HP C Compiler
7925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7927# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7929$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Martin v. Löwis11437992002-04-12 09:54:03 +00007935else
Matthias Kloseb9621712010-04-24 17:59:49 +00007936 if test "$ac_cv_type_int" = yes; then
7937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7938$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007939as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007940See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941 else
7942 ac_cv_sizeof_int=0
7943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945
Martin v. Löwis11437992002-04-12 09:54:03 +00007946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7948$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007949
7950
7951
Martin v. Löwis11437992002-04-12 09:54:03 +00007952cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007953#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007954_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007955
7956
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957# The cast to long int works around a bug in the HP C Compiler
7958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7960# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7962$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007963if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007964 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007965else
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968else
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 if test "$ac_cv_type_long" = yes; then
7970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007972as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007973See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974 else
7975 ac_cv_sizeof_long=0
7976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007978
Martin v. Löwis11437992002-04-12 09:54:03 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7981$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982
7983
7984
Martin v. Löwis11437992002-04-12 09:54:03 +00007985cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007986#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007987_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007988
7989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990# The cast to long int works around a bug in the HP C Compiler
7991# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7992# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7993# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7995$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007997 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007998else
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008000
Martin v. Löwis11437992002-04-12 09:54:03 +00008001else
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if test "$ac_cv_type_void_p" = yes; then
8003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008005as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008006See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007 else
8008 ac_cv_sizeof_void_p=0
8009 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008011
Martin v. Löwis11437992002-04-12 09:54:03 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8014$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015
8016
8017
Martin v. Löwis11437992002-04-12 09:54:03 +00008018cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008019#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008020_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008021
8022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023# The cast to long int works around a bug in the HP C Compiler
8024# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8025# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8026# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8028$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008029if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 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 +00008033
Martin v. Löwis11437992002-04-12 09:54:03 +00008034else
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 if test "$ac_cv_type_short" = yes; then
8036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008038as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008039See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008040 else
8041 ac_cv_sizeof_short=0
8042 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008044
Martin v. Löwis11437992002-04-12 09:54:03 +00008045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8047$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048
8049
8050
Martin v. Löwis11437992002-04-12 09:54:03 +00008051cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008052#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008053_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008054
8055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056# The cast to long int works around a bug in the HP C Compiler
8057# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8058# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8059# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8061$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008063 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008064else
Matthias Kloseb9621712010-04-24 17:59:49 +00008065 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 +00008066
Martin v. Löwis11437992002-04-12 09:54:03 +00008067else
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 if test "$ac_cv_type_float" = yes; then
8069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008071as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008072See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073 else
8074 ac_cv_sizeof_float=0
8075 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008077
Martin v. Löwis11437992002-04-12 09:54:03 +00008078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8080$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008081
8082
8083
Martin v. Löwis11437992002-04-12 09:54:03 +00008084cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008085#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008086_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008087
8088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089# The cast to long int works around a bug in the HP C Compiler
8090# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8091# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8092# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8094$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008095if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008097else
Matthias Kloseb9621712010-04-24 17:59:49 +00008098 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 +00008099
Martin v. Löwis11437992002-04-12 09:54:03 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 if test "$ac_cv_type_double" = yes; then
8102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008104as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008105See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008106 else
8107 ac_cv_sizeof_double=0
8108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110
Martin v. Löwis11437992002-04-12 09:54:03 +00008111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8113$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008114
8115
8116
Martin v. Löwis11437992002-04-12 09:54:03 +00008117cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008118#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008119_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008120
8121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122# The cast to long int works around a bug in the HP C Compiler
8123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8125# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8127$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008128if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008129 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008130else
Matthias Kloseb9621712010-04-24 17:59:49 +00008131 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 +00008132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133else
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 if test "$ac_cv_type_fpos_t" = yes; then
8135 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008137as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008138See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 else
8140 ac_cv_sizeof_fpos_t=0
8141 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008143
Martin v. Löwis11437992002-04-12 09:54:03 +00008144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8146$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147
8148
8149
Martin v. Löwis11437992002-04-12 09:54:03 +00008150cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008151#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008152_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008153
Michael W. Hudson54241132001-12-07 15:38:26 +00008154
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155# The cast to long int works around a bug in the HP C Compiler
8156# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8157# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8158# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8160$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008162 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 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 +00008165
Martin v. Löwis18e16552006-02-15 17:27:45 +00008166else
Matthias Kloseb9621712010-04-24 17:59:49 +00008167 if test "$ac_cv_type_size_t" = yes; then
8168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008170as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008171See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008172 else
8173 ac_cv_sizeof_size_t=0
8174 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008176
Martin v. Löwis18e16552006-02-15 17:27:45 +00008177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8179$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180
8181
8182
Martin v. Löwis18e16552006-02-15 17:27:45 +00008183cat >>confdefs.h <<_ACEOF
8184#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8185_ACEOF
8186
8187
Christian Heimes400adb02008-02-01 08:12:03 +00008188# The cast to long int works around a bug in the HP C Compiler
8189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8191# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8193$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008194if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008195 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008196else
Matthias Kloseb9621712010-04-24 17:59:49 +00008197 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 +00008198
Christian Heimes400adb02008-02-01 08:12:03 +00008199else
Matthias Kloseb9621712010-04-24 17:59:49 +00008200 if test "$ac_cv_type_pid_t" = yes; then
8201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8202$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008203as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008204See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008205 else
8206 ac_cv_sizeof_pid_t=0
8207 fi
8208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008209
Christian Heimes400adb02008-02-01 08:12:03 +00008210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8212$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008213
8214
8215
8216cat >>confdefs.h <<_ACEOF
8217#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8218_ACEOF
8219
8220
Michael W. Hudson54241132001-12-07 15:38:26 +00008221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8223$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008224have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008227
Martin v. Löwis11437992002-04-12 09:54:03 +00008228int
8229main ()
8230{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008231long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ;
8233 return 0;
8234}
8235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008237
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008241 have_long_long=yes
8242
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8246$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008247if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008248# The cast to long int works around a bug in the HP C Compiler
8249# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8250# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8251# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8253$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008254if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008256else
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 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 +00008258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259else
Matthias Kloseb9621712010-04-24 17:59:49 +00008260 if test "$ac_cv_type_long_long" = yes; then
8261 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8262$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008263as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008264See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 else
8266 ac_cv_sizeof_long_long=0
8267 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269
Martin v. Löwis11437992002-04-12 09:54:03 +00008270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8272$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273
8274
8275
Martin v. Löwis11437992002-04-12 09:54:03 +00008276cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008277#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008279
Michael W. Hudson54241132001-12-07 15:38:26 +00008280
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008281fi
8282
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8284$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008285have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008287/* end confdefs.h. */
8288
8289int
8290main ()
8291{
8292long double x; x = (long double)0;
8293 ;
8294 return 0;
8295}
8296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008297if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008298
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008301
8302 have_long_double=yes
8303
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008304fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8307$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008308if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008309# The cast to long int works around a bug in the HP C Compiler
8310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8314$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 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 +00008319
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 if test "$ac_cv_type_long_double" = yes; then
8322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008324as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008325See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008326 else
8327 ac_cv_sizeof_long_double=0
8328 fi
8329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8333$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008334
8335
8336
8337cat >>confdefs.h <<_ACEOF
8338#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8339_ACEOF
8340
8341
8342fi
8343
8344
Matthias Kloseb9621712010-04-24 17:59:49 +00008345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8346$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008347have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008349/* end confdefs.h. */
8350
8351int
8352main ()
8353{
8354_Bool x; x = (_Bool)0;
8355 ;
8356 return 0;
8357}
8358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008359if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008360
8361
Matthias Kloseb9621712010-04-24 17:59:49 +00008362$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008363
8364 have_c99_bool=yes
8365
Thomas Woutersb2137042007-02-01 18:02:27 +00008366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8369$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008370if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371# The cast to long int works around a bug in the HP C Compiler
8372# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8373# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8374# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8376$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008379else
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 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 +00008381
Thomas Woutersb2137042007-02-01 18:02:27 +00008382else
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 if test "$ac_cv_type__Bool" = yes; then
8384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8385$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008386as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008387See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008388 else
8389 ac_cv_sizeof__Bool=0
8390 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392
Thomas Woutersb2137042007-02-01 18:02:27 +00008393fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8395$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396
8397
8398
Thomas Woutersb2137042007-02-01 18:02:27 +00008399cat >>confdefs.h <<_ACEOF
8400#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8401_ACEOF
8402
8403
8404fi
8405
Matthias Kloseb9621712010-04-24 17:59:49 +00008406ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008407 #include <stdint.h>
8408 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008409 #ifdef HAVE_INTTYPES_H
8410 #include <inttypes.h>
8411 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008412"
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008414
8415cat >>confdefs.h <<_ACEOF
8416#define HAVE_UINTPTR_T 1
8417_ACEOF
8418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419# The cast to long int works around a bug in the HP C Compiler
8420# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8421# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8422# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8424$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008425if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008426 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008427else
Matthias Kloseb9621712010-04-24 17:59:49 +00008428 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 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430else
Matthias Kloseb9621712010-04-24 17:59:49 +00008431 if test "$ac_cv_type_uintptr_t" = yes; then
8432 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8433$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008434as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008435See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436 else
8437 ac_cv_sizeof_uintptr_t=0
8438 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008440
Martin v. Löwis11437992002-04-12 09:54:03 +00008441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8443$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444
8445
8446
Martin v. Löwis11437992002-04-12 09:54:03 +00008447cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008448#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008449_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008450
Michael W. Hudson54241132001-12-07 15:38:26 +00008451
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008452fi
8453
Thomas Wouters89f507f2006-12-13 04:49:30 +00008454
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008455# The cast to long int works around a bug in the HP C Compiler
8456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8458# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8460$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008465#ifdef HAVE_SYS_TYPES_H
8466#include <sys/types.h>
8467#endif
8468
Matthias Kloseb9621712010-04-24 17:59:49 +00008469"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008470
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008471else
Matthias Kloseb9621712010-04-24 17:59:49 +00008472 if test "$ac_cv_type_off_t" = yes; then
8473 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008475as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008476See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008477 else
8478 ac_cv_sizeof_off_t=0
8479 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008481
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8484$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008485
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008486
8487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008489#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008490_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008491
Michael W. Hudson54241132001-12-07 15:38:26 +00008492
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8495$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008496if test "$have_long_long" = yes
8497then
8498if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008499 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8504$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008508fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8511$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008512fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008513
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008514# The cast to long int works around a bug in the HP C Compiler
8515# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8516# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8517# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8519$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008520if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008524#ifdef HAVE_SYS_TYPES_H
8525#include <sys/types.h>
8526#endif
8527#ifdef HAVE_TIME_H
8528#include <time.h>
8529#endif
8530
Matthias Kloseb9621712010-04-24 17:59:49 +00008531"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008532
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 if test "$ac_cv_type_time_t" = yes; then
8535 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008537as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008538See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008539 else
8540 ac_cv_sizeof_time_t=0
8541 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8546$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008548
8549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008551#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008552_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008553
Michael W. Hudson54241132001-12-07 15:38:26 +00008554
8555
Trent Mick635f6fb2000-08-23 21:33:05 +00008556# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008557ac_save_cc="$CC"
8558if test "$ac_cv_kpthread" = "yes"
8559then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008560elif test "$ac_cv_kthread" = "yes"
8561then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008562elif test "$ac_cv_pthread" = "yes"
8563then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008564fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008565
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8567$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008568have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008570/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008571
8572 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008573int
8574main ()
8575{
Guido van Rossum12580492000-09-24 16:47:19 +00008576pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 ;
8578 return 0;
8579}
Matthias Kloseb159a552010-04-25 21:00:44 +00008580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008582if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008583 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8587$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008588if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008590# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8591# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8592# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8594$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008595if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008597else
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008599#ifdef HAVE_PTHREAD_H
8600#include <pthread.h>
8601#endif
8602
Matthias Kloseb9621712010-04-24 17:59:49 +00008603"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008604
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008605else
Matthias Kloseb9621712010-04-24 17:59:49 +00008606 if test "$ac_cv_type_pthread_t" = yes; then
8607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008609as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008610See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008611 else
8612 ac_cv_sizeof_pthread_t=0
8613 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615
Trent Mick635f6fb2000-08-23 21:33:05 +00008616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8618$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008620
8621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008623#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008624_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008625
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008626
Trent Mick635f6fb2000-08-23 21:33:05 +00008627fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008628CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008629
Michael W. Hudson54241132001-12-07 15:38:26 +00008630
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008631case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008632 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008633 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8634 ;;
8635 Darwin/*)
8636 OTHER_LIBTOOL_OPT=""
8637 ;;
8638esac
8639
8640
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008641
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008642case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008643 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008644 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8645 if test "${enable_universalsdk}"; then
8646 :
8647 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008648 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008649 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008650 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008651 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008652 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008653 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008654 if test ${gcc_version} '<' 4.0
8655 then
8656 LIBTOOL_CRUFT="-lcc_dynamic"
8657 else
8658 LIBTOOL_CRUFT=""
8659 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008661 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008664/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008665
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008666 #include <unistd.h>
8667 int main(int argc, char*argv[])
8668 {
8669 if (sizeof(long) == 4) {
8670 return 0;
8671 } else {
8672 return 1;
8673 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008674 }
8675
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008677if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008678 ac_osx_32bit=yes
8679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008684fi
8685
8686
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008687 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008688 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008689 i386)
8690 MACOSX_DEFAULT_ARCH="i386"
8691 ;;
8692 ppc)
8693 MACOSX_DEFAULT_ARCH="ppc"
8694 ;;
8695 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008696 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008697 ;;
8698 esac
8699 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008700 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008701 i386)
8702 MACOSX_DEFAULT_ARCH="x86_64"
8703 ;;
8704 ppc)
8705 MACOSX_DEFAULT_ARCH="ppc64"
8706 ;;
8707 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008708 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008709 ;;
8710 esac
8711
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008712 fi
8713
8714 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008715 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008716 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008717esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8719$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008720if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008721then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008722 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008724 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008725
Matthias Kloseb9621712010-04-24 17:59:49 +00008726$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008727
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8729$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008730 if test $enable_shared = "yes"
8731 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008732 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 +00008733 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008734else
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8736$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008737fi
8738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8740$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008741case $ac_sys_system/$ac_sys_release in
8742 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008743
Matthias Kloseb9621712010-04-24 17:59:49 +00008744$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008745
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8747$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008748 ;;
8749 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008752 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008753esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008754
Guido van Rossum0a516c91994-09-12 10:58:40 +00008755# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008756
Michael W. Hudson54241132001-12-07 15:38:26 +00008757
8758
8759
8760
Benjamin Peterson99f03762010-04-11 22:15:28 +00008761
Thomas Wouters477c8d52006-05-27 19:21:47 +00008762
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008763# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8764# -- usually .so, .sl on HP-UX, .dll on Cygwin
8765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8766$as_echo_n "checking the extension of shared libraries... " >&6; }
8767if test -z "$SHLIB_SUFFIX"; then
8768 case $ac_sys_system in
8769 hp*|HP*)
8770 case `uname -m` in
8771 ia64) SHLIB_SUFFIX=.so;;
8772 *) SHLIB_SUFFIX=.sl;;
8773 esac
8774 ;;
8775 CYGWIN*) SHLIB_SUFFIX=.dll;;
8776 *) SHLIB_SUFFIX=.so;;
8777 esac
8778fi
8779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8780$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008781
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008783# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008784# (Shared libraries in this instance are shared modules to be loaded into
8785# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8787$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008788if test -z "$LDSHARED"
8789then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008790 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008791 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008792 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008793 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008794 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008795 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008796 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008798 if test "$GCC" = "yes" ; then
8799 LDSHARED='$(CC) -shared'
8800 LDCXXSHARED='$(CXX) -shared'
8801 else
8802 LDSHARED='$(CC) -G'
8803 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008804 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008805 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008806 if test "$GCC" = "yes" ; then
8807 LDSHARED='$(CC) -shared'
8808 LDCXXSHARED='$(CXX) -shared'
8809 else
8810 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008811 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008812 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008813 LDSHARED='$(CC) -bundle'
8814 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008815 if test "$enable_framework" ; then
8816 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008817 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8818 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008819 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008820 else
8821 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008822 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008823 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008824 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008825 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008826 LDSHARED='$(CC) -bundle'
8827 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008828 if test "$enable_framework" ; then
8829 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008830 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8831 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008832 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008833 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008834 # No framework, use the Python app as bundle-loader
8835 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008836 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008837 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008838 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008839 Darwin/*)
8840 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8841 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008842
Ned Deily36820b62014-06-25 13:44:22 -07008843 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8844 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8845 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8846 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8847 if test ${dep_target_major} -eq 10 && \
8848 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008849 then
Ned Deily36820b62014-06-25 13:44:22 -07008850 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008851 LDSHARED='$(CC) -bundle'
8852 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008853 if test "$enable_framework" ; then
8854 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008855 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8856 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008857 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008858 else
8859 # No framework, use the Python app as bundle-loader
8860 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8861 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008862 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008863 fi
Ned Deily36820b62014-06-25 13:44:22 -07008864 else
8865 # building for OS X 10.3 and later
8866 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8867 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8868 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008869 fi
8870 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008871 Linux*|GNU*|QNX*)
8872 LDSHARED='$(CC) -shared'
8873 LDCXXSHARED='$(CXX) -shared';;
8874 BSD/OS*/4*)
8875 LDSHARED="gcc -shared"
8876 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008877 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008878 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008879 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008880 LDSHARED='$(CC) -shared'
8881 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008882 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008883 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008884 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008885 OpenBSD*)
8886 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8887 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008888 LDSHARED='$(CC) -shared $(CCSHARED)'
8889 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008890 else
8891 case `uname -r` in
8892 [01].* | 2.[0-7] | 2.[0-7].*)
8893 LDSHARED="ld -Bshareable ${LDFLAGS}"
8894 ;;
8895 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008896 LDSHARED='$(CC) -shared $(CCSHARED)'
8897 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008898 ;;
8899 esac
8900 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008901 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008902 LDSHARED='$(CC) -shared'
8903 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008904 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008905 if test "$GCC" = "yes" ; then
8906 LDSHARED='$(CC) -shared'
8907 LDCXXSHARED='$(CXX) -shared'
8908 else
8909 LDSHARED='$(CC) -G'
8910 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008911 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008912 SCO_SV*)
8913 LDSHARED='$(CC) -Wl,-G,-Bexport'
8914 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8915 CYGWIN*)
8916 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8917 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008918 *) LDSHARED="ld";;
8919 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8922$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008923LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008924BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008925# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008926# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8928$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008929if test -z "$CCSHARED"
8930then
Guido van Rossum07397971997-04-29 21:49:50 +00008931 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008932 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008933 then CCSHARED="-fPIC";
8934 elif test `uname -p` = sparc;
8935 then CCSHARED="-xcode=pic32";
8936 else CCSHARED="-Kpic";
8937 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008938 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008939 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008940 else CCSHARED="+z";
8941 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008942 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008943 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008944 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008945 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008946 if test "$GCC" = "yes"
8947 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008948 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008949 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008950 SCO_SV*)
8951 if test "$GCC" = "yes"
8952 then CCSHARED="-fPIC"
8953 else CCSHARED="-Kpic -belf"
8954 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008955 IRIX*/6*) case $CC in
8956 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008957 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008958 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008959 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8962$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008963# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008964# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8966$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008967if test -z "$LINKFORSHARED"
8968then
Guido van Rossum07397971997-04-29 21:49:50 +00008969 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008970 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008971 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008972 LINKFORSHARED="-Wl,-E -Wl,+s";;
8973# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008974 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008975 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008976 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008977 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008978 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008979
8980 # Issue #18075: the default maximum stack size (8MBytes) is too
8981 # small for the default recursion limit. Increase the stack size
8982 # to ensure that tests don't crash
8983 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8984
Jack Jansene578a632001-08-15 01:27:14 +00008985 if test "$enable_framework"
8986 then
Jack Jansenda49e192005-01-07 13:08:22 +00008987 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008988 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008989 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008990 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008991 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008992 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008993 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008994 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8995 then
8996 LINKFORSHARED="-Wl,--export-dynamic"
8997 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008998 SunOS/5*) case $CC in
8999 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009000 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009001 then
9002 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009003 fi;;
9004 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009005 CYGWIN*)
9006 if test $enable_shared = "no"
9007 then
9008 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9009 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009010 QNX*)
9011 # -Wl,-E causes the symbols to be added to the dynamic
9012 # symbol table so that they can be found when a module
9013 # is loaded. -N 2048K causes the stack size to be set
9014 # to 2048 kilobytes so that the stack doesn't overflow
9015 # when running test_compile.py.
9016 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009017 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9020$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009021
Michael W. Hudson54241132001-12-07 15:38:26 +00009022
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009023
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9025$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009026if test ! "$LIBRARY" = "$LDLIBRARY"
9027then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009028 case $ac_sys_system in
9029 CYGWIN*)
9030 # Cygwin needs CCSHARED when building extension DLLs
9031 # but not when building the interpreter DLL.
9032 CFLAGSFORSHARED='';;
9033 *)
9034 CFLAGSFORSHARED='$(CCSHARED)'
9035 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9038$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009039
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009040# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9041# library (with --enable-shared).
9042# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009043# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9044# if it is not required, since it creates a dependency of the shared library
9045# to LIBS. This, in turn, means that applications linking the shared libpython
9046# don't need to link LIBS explicitly. The default should be only changed
9047# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009048
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9050$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009051case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009052 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009053 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009054esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9056$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009057
9058
Guido van Rossum627b2d71993-12-24 10:39:16 +00009059# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9061$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009062if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009063 $as_echo_n "(cached) " >&6
9064else
9065 ac_check_lib_save_LIBS=$LIBS
9066LIBS="-lsendfile $LIBS"
9067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9068/* end confdefs.h. */
9069
9070/* Override any GCC internal prototype to avoid an error.
9071 Use char because int might match the return type of a GCC
9072 builtin and then its argument prototype would still apply. */
9073#ifdef __cplusplus
9074extern "C"
9075#endif
9076char sendfile ();
9077int
9078main ()
9079{
9080return sendfile ();
9081 ;
9082 return 0;
9083}
9084_ACEOF
9085if ac_fn_c_try_link "$LINENO"; then :
9086 ac_cv_lib_sendfile_sendfile=yes
9087else
9088 ac_cv_lib_sendfile_sendfile=no
9089fi
9090rm -f core conftest.err conftest.$ac_objext \
9091 conftest$ac_exeext conftest.$ac_ext
9092LIBS=$ac_check_lib_save_LIBS
9093fi
9094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9095$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009096if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009097 cat >>confdefs.h <<_ACEOF
9098#define HAVE_LIBSENDFILE 1
9099_ACEOF
9100
9101 LIBS="-lsendfile $LIBS"
9102
9103fi
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9106$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009107if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009109else
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009111LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009118#ifdef __cplusplus
9119extern "C"
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009122int
9123main ()
9124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009125return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ;
9127 return 0;
9128}
9129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009132else
Matthias Kloseb9621712010-04-24 17:59:49 +00009133 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009135rm -f core conftest.err conftest.$ac_objext \
9136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9140$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009141if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 cat >>confdefs.h <<_ACEOF
9143#define HAVE_LIBDL 1
9144_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009145
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009146 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009147
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009148fi
9149 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9151$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009152if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009153 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009154else
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009156LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160/* Override any GCC internal prototype to avoid an error.
9161 Use char because int might match the return type of a GCC
9162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009163#ifdef __cplusplus
9164extern "C"
9165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009166char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009167int
9168main ()
9169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ;
9172 return 0;
9173}
9174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009175if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009177else
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009180rm -f core conftest.err conftest.$ac_objext \
9181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009182LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9185$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009186if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 cat >>confdefs.h <<_ACEOF
9188#define HAVE_LIBDLD 1
9189_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009190
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009191 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009192
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009193fi
9194 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9196$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9197if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9198 $as_echo_n "(cached) " >&6
9199else
9200 ac_check_lib_save_LIBS=$LIBS
9201LIBS="-lcrypto $LIBS"
9202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9203/* end confdefs.h. */
9204
9205/* Override any GCC internal prototype to avoid an error.
9206 Use char because int might match the return type of a GCC
9207 builtin and then its argument prototype would still apply. */
9208#ifdef __cplusplus
9209extern "C"
9210#endif
9211char RAND_egd ();
9212int
9213main ()
9214{
9215return RAND_egd ();
9216 ;
9217 return 0;
9218}
9219_ACEOF
9220if ac_fn_c_try_link "$LINENO"; then :
9221 ac_cv_lib_crypto_RAND_egd=yes
9222else
9223 ac_cv_lib_crypto_RAND_egd=no
9224fi
9225rm -f core conftest.err conftest.$ac_objext \
9226 conftest$ac_exeext conftest.$ac_ext
9227LIBS=$ac_check_lib_save_LIBS
9228fi
9229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9230$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9231if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9232
9233$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9234
9235fi
9236
Martin v. Löwis519adae2003-09-20 10:47:47 +00009237
Georg Brandlb1441c72009-01-03 22:33:39 +00009238# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009239if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9241$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009242if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009244else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009245 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009248
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009249/* Override any GCC internal prototype to avoid an error.
9250 Use char because int might match the return type of a GCC
9251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009252#ifdef __cplusplus
9253extern "C"
9254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009255char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009256int
9257main ()
9258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 ;
9261 return 0;
9262}
9263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264for ac_lib in '' pthread rt posix4; do
9265 if test -z "$ac_lib"; then
9266 ac_res="none required"
9267 else
9268 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009269 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009274rm -f core conftest.err conftest.$ac_objext \
9275 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009276 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009279done
Victor Stinnere0be4232011-10-25 13:06:09 +02009280if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282else
9283 ac_cv_search_sem_init=no
9284fi
9285rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009286LIBS=$ac_func_search_save_LIBS
9287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9289$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009291if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009293
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009294fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009295 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009296 # posix4 on Solaris 2.6
9297 # pthread (first!) on Linux
9298fi
9299
Martin v. Löwis19d17342003-06-14 21:03:05 +00009300# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9302$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009303if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009304 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009305else
9306 ac_check_lib_save_LIBS=$LIBS
9307LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009309/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009311/* Override any GCC internal prototype to avoid an error.
9312 Use char because int might match the return type of a GCC
9313 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009314#ifdef __cplusplus
9315extern "C"
9316#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009317char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009318int
9319main ()
9320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009322 ;
9323 return 0;
9324}
9325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009327 ac_cv_lib_intl_textdomain=yes
9328else
Matthias Kloseb9621712010-04-24 17:59:49 +00009329 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331rm -f core conftest.err conftest.$ac_objext \
9332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333LIBS=$ac_check_lib_save_LIBS
9334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9336$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009337if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009338
Matthias Kloseb9621712010-04-24 17:59:49 +00009339$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009340
Brett Cannonc6d936e2009-06-07 20:09:53 +00009341 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009342fi
9343
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009344
9345# checks for system dependent C++ extensions support
9346case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9348$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009350/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009351
Georg Brandl59e87bd2011-02-15 19:48:59 +00009352 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009353int
9354main ()
9355{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009356loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 ;
9358 return 0;
9359}
Matthias Kloseb159a552010-04-25 21:00:44 +00009360
Martin v. Löwis11437992002-04-12 09:54:03 +00009361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009362if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009363
Matthias Kloseb159a552010-04-25 21:00:44 +00009364
Matthias Kloseb9621712010-04-24 17:59:49 +00009365$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009366
Matthias Kloseb159a552010-04-25 21:00:44 +00009367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009368$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009369
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009370else
Matthias Kloseb159a552010-04-25 21:00:44 +00009371
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009373$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009374
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009375fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009376rm -f core conftest.err conftest.$ac_objext \
9377 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009378 *) ;;
9379esac
9380
Christian Heimes985ecdc2013-11-20 11:46:18 +01009381# check for systems that require aligned memory access
9382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9383$as_echo_n "checking aligned memory access is required... " >&6; }
9384if test "$cross_compiling" = yes; then :
9385 aligned_required=yes
9386else
9387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9388/* end confdefs.h. */
9389
9390int main()
9391{
9392 char s[16];
9393 int i, *p1, *p2;
9394 for (i=0; i < 16; i++)
9395 s[i] = i;
9396 p1 = (int*)(s+1);
9397 p2 = (int*)(s+2);
9398 if (*p1 == *p2)
9399 return 1;
9400 return 0;
9401}
9402
9403_ACEOF
9404if ac_fn_c_try_run "$LINENO"; then :
9405 aligned_required=no
9406else
9407 aligned_required=yes
9408fi
9409rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9410 conftest.$ac_objext conftest.beam conftest.$ac_ext
9411fi
9412
9413
9414if test "$aligned_required" = yes ; then
9415
9416$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9417
9418fi
9419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9420$as_echo "$aligned_required" >&6; }
9421
9422
9423# str, bytes and memoryview hash algorithm
9424
9425
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9427$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9428
9429# Check whether --with-hash_algorithm was given.
9430if test "${with_hash_algorithm+set}" = set; then :
9431 withval=$with_hash_algorithm;
9432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9433$as_echo "$withval" >&6; }
9434case "$withval" in
9435 siphash24)
9436 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9437
9438 ;;
9439 fnv)
9440 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9441
9442 ;;
9443 *)
9444 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9445 ;;
9446esac
9447
9448else
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9450$as_echo "default" >&6; }
9451fi
9452
9453
Charles-François Natalid30b0222014-05-08 23:08:51 +01009454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9455$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9456
9457# Check whether --with-address_sanitizer was given.
9458if test "${with_address_sanitizer+set}" = set; then :
9459 withval=$with_address_sanitizer;
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9461$as_echo "$withval" >&6; }
9462BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9463LDFLAGS="-fsanitize=address $LDFLAGS"
9464
9465else
9466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
9468fi
9469
9470
Guido van Rossum70c7f481998-03-26 18:44:10 +00009471# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9473$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009476else
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009478LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482/* Override any GCC internal prototype to avoid an error.
9483 Use char because int might match the return type of a GCC
9484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485#ifdef __cplusplus
9486extern "C"
9487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009488char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ;
9494 return 0;
9495}
9496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009499else
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502rm -f core conftest.err conftest.$ac_objext \
9503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9507$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009508if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009509 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009510fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009511 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9513$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009514if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009516else
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009518LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009522/* Override any GCC internal prototype to avoid an error.
9523 Use char because int might match the return type of a GCC
9524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525#ifdef __cplusplus
9526extern "C"
9527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009528char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009529int
9530main ()
9531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009532return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ;
9534 return 0;
9535}
9536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009537if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009539else
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009542rm -f core conftest.err conftest.$ac_objext \
9543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009544LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9547$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009548if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009549 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009550fi
9551 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009552
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9554$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009555
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009557if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9560$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009561LIBS="$withval $LIBS"
9562
9563else
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9565$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566fi
9567
Guido van Rossum7f43da71994-08-01 12:15:30 +00009568
Victor Stinner8291b5e2015-03-20 16:03:14 +01009569
9570
9571
9572
9573
9574
9575
9576if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9577 if test -n "$ac_tool_prefix"; then
9578 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9579set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9581$as_echo_n "checking for $ac_word... " >&6; }
9582if ${ac_cv_path_PKG_CONFIG+:} false; then :
9583 $as_echo_n "(cached) " >&6
9584else
9585 case $PKG_CONFIG in
9586 [\\/]* | ?:[\\/]*)
9587 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9588 ;;
9589 *)
9590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9591for as_dir in $PATH
9592do
9593 IFS=$as_save_IFS
9594 test -z "$as_dir" && as_dir=.
9595 for ac_exec_ext in '' $ac_executable_extensions; do
9596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9597 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9599 break 2
9600 fi
9601done
9602 done
9603IFS=$as_save_IFS
9604
9605 ;;
9606esac
9607fi
9608PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9609if test -n "$PKG_CONFIG"; then
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9611$as_echo "$PKG_CONFIG" >&6; }
9612else
9613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9614$as_echo "no" >&6; }
9615fi
9616
9617
9618fi
9619if test -z "$ac_cv_path_PKG_CONFIG"; then
9620 ac_pt_PKG_CONFIG=$PKG_CONFIG
9621 # Extract the first word of "pkg-config", so it can be a program name with args.
9622set dummy pkg-config; ac_word=$2
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9624$as_echo_n "checking for $ac_word... " >&6; }
9625if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9626 $as_echo_n "(cached) " >&6
9627else
9628 case $ac_pt_PKG_CONFIG in
9629 [\\/]* | ?:[\\/]*)
9630 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9631 ;;
9632 *)
9633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9634for as_dir in $PATH
9635do
9636 IFS=$as_save_IFS
9637 test -z "$as_dir" && as_dir=.
9638 for ac_exec_ext in '' $ac_executable_extensions; do
9639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9640 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9642 break 2
9643 fi
9644done
9645 done
9646IFS=$as_save_IFS
9647
9648 ;;
9649esac
9650fi
9651ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9652if test -n "$ac_pt_PKG_CONFIG"; then
9653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9654$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9655else
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9657$as_echo "no" >&6; }
9658fi
9659
9660 if test "x$ac_pt_PKG_CONFIG" = x; then
9661 PKG_CONFIG=""
9662 else
9663 case $cross_compiling:$ac_tool_warned in
9664yes:)
9665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9667ac_tool_warned=yes ;;
9668esac
9669 PKG_CONFIG=$ac_pt_PKG_CONFIG
9670 fi
9671else
9672 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9673fi
9674
9675fi
9676if test -n "$PKG_CONFIG"; then
9677 _pkg_min_version=0.9.0
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9679$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9680 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9682$as_echo "yes" >&6; }
9683 else
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9685$as_echo "no" >&6; }
9686 PKG_CONFIG=""
9687 fi
9688fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009689
9690# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9692$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009693
9694# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009696 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009697else
9698 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009699fi
9700
9701
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9703$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009704
9705# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9707$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009708
9709# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009710if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009711 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009712else
9713 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009714fi
9715
9716
9717if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009718 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9719else
9720 LIBFFI_INCLUDEDIR=""
9721fi
9722
9723
Matthias Kloseb9621712010-04-24 17:59:49 +00009724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9725$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009726
Stefan Krah60187b52012-03-23 19:06:27 +01009727# Check for use of the system libmpdec library
9728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9729$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9730
9731# Check whether --with-system_libmpdec was given.
9732if test "${with_system_libmpdec+set}" = set; then :
9733 withval=$with_system_libmpdec;
9734else
9735 with_system_libmpdec="no"
9736fi
9737
9738
9739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9740$as_echo "$with_system_libmpdec" >&6; }
9741
Benjamin Peterson076ed002010-10-31 17:11:02 +00009742# Check for support for loadable sqlite extensions
9743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9744$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9745# Check whether --enable-loadable-sqlite-extensions was given.
9746if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9747 enableval=$enable_loadable_sqlite_extensions;
9748else
9749 enable_loadable_sqlite_extensions="no"
9750fi
9751
9752
9753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9754$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9755
Ned Deilyd819b932013-09-06 01:07:05 -07009756# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9757
9758
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9760$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9761
9762# Check whether --with-tcltk-includes was given.
9763if test "${with_tcltk_includes+set}" = set; then :
9764 withval=$with_tcltk_includes;
9765else
9766 with_tcltk_includes="default"
9767fi
9768
9769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9770$as_echo "$with_tcltk_includes" >&6; }
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9772$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9773
9774# Check whether --with-tcltk-libs was given.
9775if test "${with_tcltk_libs+set}" = set; then :
9776 withval=$with_tcltk_libs;
9777else
9778 with_tcltk_libs="default"
9779fi
9780
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9782$as_echo "$with_tcltk_libs" >&6; }
9783if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9784then
9785 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9786 then
9787 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9788 fi
9789 TCLTK_INCLUDES=""
9790 TCLTK_LIBS=""
9791else
9792 TCLTK_INCLUDES="$with_tcltk_includes"
9793 TCLTK_LIBS="$with_tcltk_libs"
9794fi
9795
Matthias Klose55708cc2009-04-30 08:06:49 +00009796# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9798$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009799
9800# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009801if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009802 withval=$with_dbmliborder;
9803if test x$with_dbmliborder = xyes
9804then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009805as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009806else
9807 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9808 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9809 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009810 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009811 fi
9812 done
9813fi
9814fi
9815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9817$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009818
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009819# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009820
9821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9823$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009826if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009827 withval=$with_signal_module;
9828fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009829
9830
9831if test -z "$with_signal_module"
9832then with_signal_module="yes"
9833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9835$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009836
9837if test "${with_signal_module}" = "yes"; then
9838 USE_SIGNAL_MODULE=""
9839 SIGNAL_OBJS=""
9840else
9841 USE_SIGNAL_MODULE="#"
9842 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9843fi
9844
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009845# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009846
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009847USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009848
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849
Martin v. Löwis11437992002-04-12 09:54:03 +00009850
9851# Templates for things AC_DEFINEd more than once.
9852# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009853
9854
Martin v. Löwis11437992002-04-12 09:54:03 +00009855
Matthias Kloseb9621712010-04-24 17:59:49 +00009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9857$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009860if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861 withval=$with_threads;
9862fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009863
9864
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009865# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009866
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009868if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 withval=$with_thread; with_threads=$with_thread
9870fi
9871
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009872
9873if test -z "$with_threads"
9874then with_threads="yes"
9875fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9877$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009878
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009879
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009880if test "$with_threads" = "no"
9881then
9882 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009883elif test "$ac_cv_pthread_is_default" = yes
9884then
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009886
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009887 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009888 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009889
9890 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009892elif test "$ac_cv_kpthread" = "yes"
9893then
9894 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009895 if test "$ac_cv_cxx_thread" = "yes"; then
9896 CXX="$CXX -Kpthread"
9897 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009899
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009900 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009901 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009902elif test "$ac_cv_kthread" = "yes"
9903then
9904 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009905 if test "$ac_cv_cxx_thread" = "yes"; then
9906 CXX="$CXX -Kthread"
9907 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009909
9910 posix_threads=yes
9911 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009912elif test "$ac_cv_pthread" = "yes"
9913then
9914 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009915 if test "$ac_cv_cxx_thread" = "yes"; then
9916 CXX="$CXX -pthread"
9917 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009919
9920 posix_threads=yes
9921 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009922else
9923 if test ! -z "$with_threads" -a -d "$with_threads"
9924 then LDFLAGS="$LDFLAGS -L$with_threads"
9925 fi
9926 if test ! -z "$withval" -a -d "$withval"
9927 then LDFLAGS="$LDFLAGS -L$withval"
9928 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009929
9930 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009931 # define _POSIX_THREADS in unistd.h. Some apparently don't
9932 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9934$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009937
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009938#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009939#ifdef _POSIX_THREADS
9940yes
9941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009942
9943_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009946 unistd_defines_pthreads=yes
9947else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009948 unistd_defines_pthreads=no
9949fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009950rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009951
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9953$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009954
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009956
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009957 # Just looking for pthread_create in libpthread is not enough:
9958 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9959 # So we really have to include pthread.h, and then link.
9960 _libs=$LIBS
9961 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9963$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009965/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009966
9967#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009968#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009969
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009970void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009971int
9972main ()
9973{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009974
9975pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009976 ;
9977 return 0;
9978}
9979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009981
Matthias Kloseb9621712010-04-24 17:59:49 +00009982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9983$as_echo "yes" >&6; }
9984 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009985
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009986 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009987 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009988else
Martin v. Löwis11437992002-04-12 09:54:03 +00009989
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009990 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009992if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009993 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009994
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009995 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009996 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009997else
Guido van Rossumad678af1998-10-02 14:42:15 +00009998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10000$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010001if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010002 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010003else
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010005LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009/* Override any GCC internal prototype to avoid an error.
10010 Use char because int might match the return type of a GCC
10011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010012#ifdef __cplusplus
10013extern "C"
10014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010015char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010016int
10017main ()
10018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010019return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010026else
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010029rm -f core conftest.err conftest.$ac_objext \
10030 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010031LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10034$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010035if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010036 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010037
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010038 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010039 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010040 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010041else
Greg Steinadf63d62000-07-05 10:38:09 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10044$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010045if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010049LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053/* Override any GCC internal prototype to avoid an error.
10054 Use char because int might match the return type of a GCC
10055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056#ifdef __cplusplus
10057extern "C"
10058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010059char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073rm -f core conftest.err conftest.$ac_objext \
10074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010075LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10078$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010082 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010083 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010084 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010085else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10088$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010089if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010091else
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010093LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097/* Override any GCC internal prototype to avoid an error.
10098 Use char because int might match the return type of a GCC
10099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010100#ifdef __cplusplus
10101extern "C"
10102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010103char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010104int
10105main ()
10106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ;
10109 return 0;
10110}
10111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010117rm -f core conftest.err conftest.$ac_objext \
10118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010119LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10122$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010123if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010126 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010127 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010128 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010129else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010130
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10132$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010133if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010135else
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010137LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141/* Override any GCC internal prototype to avoid an error.
10142 Use char because int might match the return type of a GCC
10143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144#ifdef __cplusplus
10145extern "C"
10146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010147char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ;
10153 return 0;
10154}
10155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010161rm -f core conftest.err conftest.$ac_objext \
10162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010163LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10166$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010167if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010173else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010174
Martin v. Löwis130fb172001-07-19 11:00:41 +000010175 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010176fi
10177
Guido van Rossum627b2d71993-12-24 10:39:16 +000010178
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010179fi
10180
Guido van Rossum0be3e491997-05-22 20:33:33 +000010181fi
10182
Guido van Rossum49545951997-12-02 19:28:29 +000010183fi
10184
Guido van Rossumb93a8621998-05-07 13:27:32 +000010185fi
10186
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010188rm -f core conftest.err conftest.$ac_objext \
10189 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10192$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010193if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010195else
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010197LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201/* Override any GCC internal prototype to avoid an error.
10202 Use char because int might match the return type of a GCC
10203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204#ifdef __cplusplus
10205extern "C"
10206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010207char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
10210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010211return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ;
10213 return 0;
10214}
10215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010218else
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010220fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010221rm -f core conftest.err conftest.$ac_objext \
10222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10226$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010227if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010229
Martin v. Löwis130fb172001-07-19 11:00:41 +000010230 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010231 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010232 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010233fi
10234
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010235
Neal Norwitza978ab02002-11-02 16:58:05 +000010236 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10238$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010239if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010241else
Martin v. Löwis11437992002-04-12 09:54:03 +000010242 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010243LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010245/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247/* Override any GCC internal prototype to avoid an error.
10248 Use char because int might match the return type of a GCC
10249 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010250#ifdef __cplusplus
10251extern "C"
10252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010253char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010254int
10255main ()
10256{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 ;
10259 return 0;
10260}
10261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010263 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010264else
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010267rm -f core conftest.err conftest.$ac_objext \
10268 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010269LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10272$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010273if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010275
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010276 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010277 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010278 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010279fi
10280
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010281 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010282fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010283
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010284if test "$posix_threads" = "yes"; then
10285 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010286
Matthias Kloseb9621712010-04-24 17:59:49 +000010287$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010288
10289 fi
10290
10291 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10292 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010293 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010294$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010295
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010296 ;;
10297 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010298$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010299
10300 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010301 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010302$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010303
10304 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010305 esac
10306
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10308$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010309 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010311else
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010313 ac_cv_pthread_system_supported=no
10314else
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010316/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010317
10318 #include <stdio.h>
10319 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010320 void *foo(void *parm) {
10321 return NULL;
10322 }
10323 main() {
10324 pthread_attr_t attr;
10325 pthread_t id;
10326 if (pthread_attr_init(&attr)) exit(-1);
10327 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10328 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10329 exit(0);
10330 }
10331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010333 ac_cv_pthread_system_supported=yes
10334else
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010339fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341
Guido van Rossum627b2d71993-12-24 10:39:16 +000010342fi
10343
Matthias Kloseb9621712010-04-24 17:59:49 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10345$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010346 if test "$ac_cv_pthread_system_supported" = "yes"; then
10347
Matthias Kloseb9621712010-04-24 17:59:49 +000010348$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010349
10350 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 for ac_func in pthread_sigmask
10352do :
10353 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010354if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010355 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010356#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010357_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010358 case $ac_sys_system in
10359 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010360
Matthias Kloseb9621712010-04-24 17:59:49 +000010361$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010362
10363 ;;
10364 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010365fi
10366done
10367
Christian Heimesf77b4b22013-08-21 13:26:05 +020010368 for ac_func in pthread_atfork
10369do :
10370 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10371if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10372 cat >>confdefs.h <<_ACEOF
10373#define HAVE_PTHREAD_ATFORK 1
10374_ACEOF
10375
10376fi
10377done
10378
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010379fi
10380
10381
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010382# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10385$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010387if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010389 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010392 ipv6=no
10393 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010394 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10395$as_echo "yes" >&6; }
10396 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010397
10398 ipv6=yes
10399 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010401else
Martin v. Löwis11437992002-04-12 09:54:03 +000010402
Matthias Kloseb9621712010-04-24 17:59:49 +000010403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010405 /* AF_INET6 available check */
10406#include <sys/types.h>
10407#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010408int
10409main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010410{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010411int domain = AF_INET6;
10412 ;
10413 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010414}
Martin v. Löwis11437992002-04-12 09:54:03 +000010415_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010416if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010417
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10419$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010420 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010421
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010422else
Matthias Kloseb159a552010-04-25 21:00:44 +000010423
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010426 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010427
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010428fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010431if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10433$as_echo_n "checking if RFC2553 API is available... " >&6; }
10434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010435/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010436
10437 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010438#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010439int
10440main ()
10441{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010442struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010443 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ;
10445 return 0;
10446}
Matthias Kloseb159a552010-04-25 21:00:44 +000010447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010449if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010450
10451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010452$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010453 ipv6=yes
10454
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010455else
Matthias Kloseb159a552010-04-25 21:00:44 +000010456
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010458$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010459 ipv6=no
10460
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010463fi
10464
10465if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010467
10468fi
10469
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470fi
10471
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472
10473ipv6type=unknown
10474ipv6lib=none
10475ipv6trylibc=no
10476
10477if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10479$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010480 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10481 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010482 case $i in
10483 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010485/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010486
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010487#include <netinet/in.h>
10488#ifdef IPV6_INRIA_VERSION
10489yes
10490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010491_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010493 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010494 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010495fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010496rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010497
10498 ;;
10499 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010501/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010502
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010503#include <netinet/in.h>
10504#ifdef __KAME__
10505yes
10506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010507_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010510 ipv6type=$i;
10511 ipv6lib=inet6
10512 ipv6libdir=/usr/local/v6/lib
10513 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010514fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010515rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010516
10517 ;;
10518 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010521
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010522#include <features.h>
10523#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10524yes
10525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010526_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010529 ipv6type=$i;
10530 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010532rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010533
10534 ;;
10535 linux-inet6)
10536 if test -d /usr/inet6; then
10537 ipv6type=$i
10538 ipv6lib=inet6
10539 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010540 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010541 fi
10542 ;;
10543 solaris)
10544 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010545 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010546 ipv6type=$i
10547 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010548 fi
10549 fi
10550 ;;
10551 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010554
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555#include <sys/param.h>
10556#ifdef _TOSHIBA_INET6
10557yes
10558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010559_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010562 ipv6type=$i;
10563 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010564 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010565fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010566rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010567
10568 ;;
10569 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010572
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573#include </usr/local/v6/include/sys/v6config.h>
10574#ifdef __V6D__
10575yes
10576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010577_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010580 ipv6type=$i;
10581 ipv6lib=v6;
10582 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010583 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010584fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010585rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010586
10587 ;;
10588 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010591
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010592#include <sys/param.h>
10593#ifdef _ZETA_MINAMI_INET6
10594yes
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010599 ipv6type=$i;
10600 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010601 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010603rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604
10605 ;;
10606 esac
10607 if test "$ipv6type" != "unknown"; then
10608 break
10609 fi
10610 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10612$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613fi
10614
10615if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10616 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10617 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10618 echo "using lib$ipv6lib"
10619 else
10620 if test $ipv6trylibc = "yes"; then
10621 echo "using libc"
10622 else
10623 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10624 echo "You need to fetch lib$ipv6lib.a from appropriate"
10625 echo 'ipv6 kit and compile beforehand.'
10626 exit 1
10627 fi
10628 fi
10629fi
10630
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10632$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634/* end confdefs.h. */
10635 /* CAN_RAW_FD_FRAMES available check */
10636#include <linux/can/raw.h>
10637int
10638main ()
10639{
10640int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10641 ;
10642 return 0;
10643}
10644_ACEOF
10645if ac_fn_c_try_compile "$LINENO"; then :
10646
10647
10648$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10649
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10651$as_echo "yes" >&6; }
10652
10653else
10654
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
10657
10658fi
10659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10660
Matthias Kloseb9621712010-04-24 17:59:49 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10662$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010664/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010665
10666 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010667int
10668main ()
10669{
10670FSIORefNum fRef = 0
10671 ;
10672 return 0;
10673}
Matthias Kloseb159a552010-04-25 21:00:44 +000010674
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010677
Matthias Kloseb159a552010-04-25 21:00:44 +000010678
Matthias Kloseb9621712010-04-24 17:59:49 +000010679$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10682$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010683
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010684else
Matthias Kloseb159a552010-04-25 21:00:44 +000010685
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010688
10689fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10691
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010692# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10694$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010696# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010697if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698 withval=$with_doc_strings;
10699fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010700
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010701
10702if test -z "$with_doc_strings"
10703then with_doc_strings="yes"
10704fi
10705if test "$with_doc_strings" != "no"
10706then
10707
Matthias Kloseb9621712010-04-24 17:59:49 +000010708$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010709
10710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10712$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010713
Antoine Pitrou042b1282010-08-13 21:15:58 +000010714# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10716$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010717
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010719if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010721if test "$withval" != no
10722then
10723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10727$as_echo "yes" >&6; }
10728else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10729$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010730fi
10731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734fi
10735
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010736
10737# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10739$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010741# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743 withval=$with_pymalloc;
10744fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010745
Neil Schemenauera35c6882001-02-27 04:45:05 +000010746
Neil Schemenauer16c22972002-03-22 15:34:49 +000010747if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010748then
10749 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010750fi
10751if test "$with_pymalloc" != "no"
10752then
Martin v. Löwis11437992002-04-12 09:54:03 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010755
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010756 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10759$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010760
Benjamin Peterson05159c42009-12-03 03:01:27 +000010761# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10763$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010764
10765# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010766if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010767 withval=$with_valgrind;
10768else
10769 with_valgrind=no
10770fi
10771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10773$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010774if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 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 +020010776if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010779
10780else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010781 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010782
10783fi
10784
10785
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010786 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010787fi
10788
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010789# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010790
Guido van Rossum98935bf2001-09-05 19:13:16 +000010791DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010792
Guido van Rossume97ee181999-12-20 21:27:22 +000010793# the dlopen() function means we might want to use dynload_shlib.o. some
10794# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010795for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010796do :
10797 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010798if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010801_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010802
Guido van Rossume97ee181999-12-20 21:27:22 +000010803fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010804done
Guido van Rossume97ee181999-12-20 21:27:22 +000010805
Michael W. Hudson54241132001-12-07 15:38:26 +000010806
Guido van Rossume97ee181999-12-20 21:27:22 +000010807# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10808# loading of modules.
10809
Matthias Kloseb9621712010-04-24 17:59:49 +000010810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10811$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010812if test -z "$DYNLOADFILE"
10813then
10814 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010815 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10816 if test "$ac_cv_func_dlopen" = yes
10817 then DYNLOADFILE="dynload_shlib.o"
10818 else DYNLOADFILE="dynload_aix.o"
10819 fi
10820 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010821 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010822 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10823 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010824 *)
10825 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10826 # out any dynamic loading
10827 if test "$ac_cv_func_dlopen" = yes
10828 then DYNLOADFILE="dynload_shlib.o"
10829 else DYNLOADFILE="dynload_stub.o"
10830 fi
10831 ;;
10832 esac
10833fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10835$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010836if test "$DYNLOADFILE" != "dynload_stub.o"
10837then
Martin v. Löwis11437992002-04-12 09:54:03 +000010838
Matthias Kloseb9621712010-04-24 17:59:49 +000010839$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010840
10841fi
10842
Neil Schemenauer4e425612001-06-19 15:44:15 +000010843# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10844
Michael W. Hudson54241132001-12-07 15:38:26 +000010845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10847$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010848if test -z "$MACHDEP_OBJS"
10849then
Jack Jansene578a632001-08-15 01:27:14 +000010850 MACHDEP_OBJS=$extra_machdep_objs
10851else
10852 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010853fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010854if test -z "$MACHDEP_OBJS"; then
10855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10856$as_echo "none" >&6; }
10857else
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10859$as_echo "$MACHDEP_OBJS" >&6; }
10860fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010861
Guido van Rossum627b2d71993-12-24 10:39:16 +000010862# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010863for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010864 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010865 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010866 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010867 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010868 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010869 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010870 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10871 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010872 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010873 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010874 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010875 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010876 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010877 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010878 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10879 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010880 sigaction sigaltstack siginterrupt sigpending sigrelse \
10881 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010882 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010883 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010884 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010885do :
10886 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10887ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010888if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010891_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010892
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010893fi
10894done
10895
Michael W. Hudson54241132001-12-07 15:38:26 +000010896
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010897ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10898 #include <dirent.h>
10899"
10900if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10901
10902$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10903
10904fi
10905
10906
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010907# For some functions, having a definition is not sufficient, since
10908# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10910$as_echo_n "checking for chroot... " >&6; }
10911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010912/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010913#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010914int
10915main ()
10916{
10917void *x=chroot
10918 ;
10919 return 0;
10920}
10921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010922if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010925
Matthias Kloseb159a552010-04-25 21:00:44 +000010926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010927$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010928else
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10930$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010931
10932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10935$as_echo_n "checking for link... " >&6; }
10936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010937/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010938#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010939int
10940main ()
10941{
10942void *x=link
10943 ;
10944 return 0;
10945}
10946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010948
Matthias Kloseb9621712010-04-24 17:59:49 +000010949$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010950
Matthias Kloseb159a552010-04-25 21:00:44 +000010951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010956
10957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10960$as_echo_n "checking for symlink... " >&6; }
10961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010962/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010963#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010964int
10965main ()
10966{
10967void *x=symlink
10968 ;
10969 return 0;
10970}
10971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010975
Matthias Kloseb159a552010-04-25 21:00:44 +000010976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010978else
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010981
10982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10985$as_echo_n "checking for fchdir... " >&6; }
10986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010987/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010988#include <unistd.h>
10989int
10990main ()
10991{
10992void *x=fchdir
10993 ;
10994 return 0;
10995}
10996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010998
Matthias Kloseb9621712010-04-24 17:59:49 +000010999$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011000
Matthias Kloseb159a552010-04-25 21:00:44 +000011001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011003else
Matthias Kloseb9621712010-04-24 17:59:49 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011006
11007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11010$as_echo_n "checking for fsync... " >&6; }
11011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011012/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011013#include <unistd.h>
11014int
11015main ()
11016{
11017void *x=fsync
11018 ;
11019 return 0;
11020}
11021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011022if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011025
Matthias Kloseb159a552010-04-25 21:00:44 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011031
11032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11035$as_echo_n "checking for fdatasync... " >&6; }
11036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011038#include <unistd.h>
11039int
11040main ()
11041{
11042void *x=fdatasync
11043 ;
11044 return 0;
11045}
11046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011050
Matthias Kloseb159a552010-04-25 21:00:44 +000011051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011053else
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11055$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011056
11057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11060$as_echo_n "checking for epoll... " >&6; }
11061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011062/* end confdefs.h. */
11063#include <sys/epoll.h>
11064int
11065main ()
11066{
11067void *x=epoll_create
11068 ;
11069 return 0;
11070}
11071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011075
Matthias Kloseb159a552010-04-25 21:00:44 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011078else
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11080$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011081
11082fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11085$as_echo_n "checking for epoll_create1... " >&6; }
11086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11087/* end confdefs.h. */
11088#include <sys/epoll.h>
11089int
11090main ()
11091{
11092void *x=epoll_create1
11093 ;
11094 return 0;
11095}
11096_ACEOF
11097if ac_fn_c_try_compile "$LINENO"; then :
11098
11099$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11100
11101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11102$as_echo "yes" >&6; }
11103else
11104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11105$as_echo "no" >&6; }
11106
11107fi
11108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11110$as_echo_n "checking for kqueue... " >&6; }
11111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011112/* end confdefs.h. */
11113
11114#include <sys/types.h>
11115#include <sys/event.h>
11116
11117int
11118main ()
11119{
11120int x=kqueue()
11121 ;
11122 return 0;
11123}
11124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011125if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011126
Matthias Kloseb9621712010-04-24 17:59:49 +000011127$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011128
Matthias Kloseb159a552010-04-25 21:00:44 +000011129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011130$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011131else
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011134
11135fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11138$as_echo_n "checking for prlimit... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11140/* end confdefs.h. */
11141
11142#include <sys/time.h>
11143#include <sys/resource.h>
11144
11145int
11146main ()
11147{
11148void *x=prlimit
11149 ;
11150 return 0;
11151}
11152_ACEOF
11153if ac_fn_c_try_compile "$LINENO"; then :
11154
11155$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11156
11157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11158$as_echo "yes" >&6; }
11159else
11160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161$as_echo "no" >&6; }
11162
11163fi
11164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11165
Martin v. Löwisd5843682002-11-21 20:41:28 +000011166# On some systems (eg. FreeBSD 5), we would find a definition of the
11167# functions ctermid_r, setgroups in the library, but no prototype
11168# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11169# address to avoid compiler warnings and potential miscompilations
11170# because of the missing prototypes.
11171
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11173$as_echo_n "checking for ctermid_r... " >&6; }
11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011175/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011176
Martin v. Löwisd5843682002-11-21 20:41:28 +000011177#include <stdio.h>
11178
Martin v. Löwisd5843682002-11-21 20:41:28 +000011179int
11180main ()
11181{
11182void* p = ctermid_r
11183 ;
11184 return 0;
11185}
11186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011187if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011188
Matthias Kloseb9621712010-04-24 17:59:49 +000011189$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011190
Matthias Kloseb159a552010-04-25 21:00:44 +000011191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011193else
Matthias Kloseb9621712010-04-24 17:59:49 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011196
11197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11201$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011202if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011203 $as_echo_n "(cached) " >&6
11204else
11205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011206/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011207#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011208int
11209main ()
11210{
11211void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011212
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011213 ;
11214 return 0;
11215}
11216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011217if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011218 ac_cv_flock_decl=yes
11219else
11220 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011221
11222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011224
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011225fi
11226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11227$as_echo "$ac_cv_flock_decl" >&6; }
11228if test "x${ac_cv_flock_decl}" = xyes; then
11229 for ac_func in flock
11230do :
11231 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011232if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011233 cat >>confdefs.h <<_ACEOF
11234#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011235_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011236
Antoine Pitroua3000072010-09-07 14:52:42 +000011237else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011239$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011240if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011241 $as_echo_n "(cached) " >&6
11242else
11243 ac_check_lib_save_LIBS=$LIBS
11244LIBS="-lbsd $LIBS"
11245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11246/* end confdefs.h. */
11247
11248/* Override any GCC internal prototype to avoid an error.
11249 Use char because int might match the return type of a GCC
11250 builtin and then its argument prototype would still apply. */
11251#ifdef __cplusplus
11252extern "C"
11253#endif
11254char flock ();
11255int
11256main ()
11257{
11258return flock ();
11259 ;
11260 return 0;
11261}
11262_ACEOF
11263if ac_fn_c_try_link "$LINENO"; then :
11264 ac_cv_lib_bsd_flock=yes
11265else
11266 ac_cv_lib_bsd_flock=no
11267fi
11268rm -f core conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
11270LIBS=$ac_check_lib_save_LIBS
11271fi
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11273$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011274if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011275 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011276
11277
11278$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11279
11280
11281fi
11282
11283
11284fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011285done
11286
Antoine Pitroua3000072010-09-07 14:52:42 +000011287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288
Matthias Kloseb9621712010-04-24 17:59:49 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11290$as_echo_n "checking for getpagesize... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011293
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011294#include <unistd.h>
11295
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011296int
11297main ()
11298{
11299void* p = getpagesize
11300 ;
11301 return 0;
11302}
11303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011307
Matthias Kloseb159a552010-04-25 21:00:44 +000011308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011310else
Matthias Kloseb9621712010-04-24 17:59:49 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11312$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011313
11314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011316
Victor Stinner984890f2011-11-24 13:53:38 +010011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11318$as_echo_n "checking for broken unsetenv... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320/* end confdefs.h. */
11321
11322#include <stdlib.h>
11323
11324int
11325main ()
11326{
11327int res = unsetenv("DUMMY")
11328 ;
11329 return 0;
11330}
11331_ACEOF
11332if ac_fn_c_try_compile "$LINENO"; then :
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335else
11336
11337$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11338
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11340$as_echo "yes" >&6; }
11341
11342fi
11343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11344
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011345for ac_prog in true
11346do
11347 # Extract the first word of "$ac_prog", so it can be a program name with args.
11348set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11350$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011351if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011352 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011353else
11354 if test -n "$TRUE"; then
11355 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11356else
11357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11358for as_dir in $PATH
11359do
11360 IFS=$as_save_IFS
11361 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011362 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011364 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 $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 +000011366 break 2
11367 fi
11368done
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011370IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011371
11372fi
11373fi
11374TRUE=$ac_cv_prog_TRUE
11375if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11377$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011381fi
11382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011383
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011384 test -n "$TRUE" && break
11385done
11386test -n "$TRUE" || TRUE="/bin/true"
11387
11388
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11390$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011391if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011392 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011393else
11394 ac_check_lib_save_LIBS=$LIBS
11395LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011399/* Override any GCC internal prototype to avoid an error.
11400 Use char because int might match the return type of a GCC
11401 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011402#ifdef __cplusplus
11403extern "C"
11404#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011405char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011406int
11407main ()
11408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011415 ac_cv_lib_c_inet_aton=yes
11416else
Matthias Kloseb9621712010-04-24 17:59:49 +000011417 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011419rm -f core conftest.err conftest.$ac_objext \
11420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011421LIBS=$ac_check_lib_save_LIBS
11422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11424$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011426 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11429$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011430if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011432else
11433 ac_check_lib_save_LIBS=$LIBS
11434LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011436/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438/* Override any GCC internal prototype to avoid an error.
11439 Use char because int might match the return type of a GCC
11440 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011441#ifdef __cplusplus
11442extern "C"
11443#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011444char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011445int
11446main ()
11447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011448return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011454 ac_cv_lib_resolv_inet_aton=yes
11455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011457fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011458rm -f core conftest.err conftest.$ac_objext \
11459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011460LIBS=$ac_check_lib_save_LIBS
11461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11463$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011464if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011465 cat >>confdefs.h <<_ACEOF
11466#define HAVE_LIBRESOLV 1
11467_ACEOF
11468
11469 LIBS="-lresolv $LIBS"
11470
11471fi
11472
11473
11474fi
11475
11476
Christian Heimesd0764e22007-12-04 15:00:33 +000011477# On Tru64, chflags seems to be present, but calling it will
11478# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11480$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011481if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011482 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011483else
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011485 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011486else
Matthias Kloseb9621712010-04-24 17:59:49 +000011487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011488/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011489
Christian Heimesd0764e22007-12-04 15:00:33 +000011490#include <sys/stat.h>
11491#include <unistd.h>
11492int main(int argc, char*argv[])
11493{
11494 if(chflags(argv[0], 0) != 0)
11495 return 1;
11496 return 0;
11497}
Ned Deily3eb67d52011-06-28 00:00:28 -070011498
Christian Heimesd0764e22007-12-04 15:00:33 +000011499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011500if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011501 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011507fi
11508
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011509
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11512$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011513if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011514 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011515if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011516 ac_cv_have_chflags="yes"
11517else
11518 ac_cv_have_chflags="no"
11519fi
11520
11521fi
11522if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011525
11526fi
11527
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11529$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011530if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011532else
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011534 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011537/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011538
Christian Heimesd0764e22007-12-04 15:00:33 +000011539#include <sys/stat.h>
11540#include <unistd.h>
11541int main(int argc, char*argv[])
11542{
11543 if(lchflags(argv[0], 0) != 0)
11544 return 1;
11545 return 0;
11546}
Ned Deily3eb67d52011-06-28 00:00:28 -070011547
Christian Heimesd0764e22007-12-04 15:00:33 +000011548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011550 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011551else
Matthias Kloseb9621712010-04-24 17:59:49 +000011552 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011554rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11555 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011556fi
11557
11558
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011559fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11561$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011562if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011563 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011564if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011565 ac_cv_have_lchflags="yes"
11566else
11567 ac_cv_have_lchflags="no"
11568fi
11569
11570fi
11571if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011574
11575fi
11576
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011577case $ac_sys_system/$ac_sys_release in
11578Darwin/*)
11579 _CUR_CFLAGS="${CFLAGS}"
11580 _CUR_LDFLAGS="${LDFLAGS}"
11581 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11582 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11583 ;;
11584esac
11585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11587$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011588if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011590else
11591 ac_check_lib_save_LIBS=$LIBS
11592LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011594/* end confdefs.h. */
11595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596/* Override any GCC internal prototype to avoid an error.
11597 Use char because int might match the return type of a GCC
11598 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011599#ifdef __cplusplus
11600extern "C"
11601#endif
11602char inflateCopy ();
11603int
11604main ()
11605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011607 ;
11608 return 0;
11609}
11610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011612 ac_cv_lib_z_inflateCopy=yes
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011618LIBS=$ac_check_lib_save_LIBS
11619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11621$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011625
11626fi
11627
11628
11629case $ac_sys_system/$ac_sys_release in
11630Darwin/*)
11631 CFLAGS="${_CUR_CFLAGS}"
11632 LDFLAGS="${_CUR_LDFLAGS}"
11633 ;;
11634esac
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11637$as_echo_n "checking for hstrerror... " >&6; }
11638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011640
Martin v. Löwise9416172003-05-03 10:12:45 +000011641#include <netdb.h>
11642
Martin v. Löwise9416172003-05-03 10:12:45 +000011643int
11644main ()
11645{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011647 ;
11648 return 0;
11649}
11650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011652
Matthias Kloseb9621712010-04-24 17:59:49 +000011653$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011654
Matthias Kloseb159a552010-04-25 21:00:44 +000011655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11659$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011660
11661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011662rm -f core conftest.err conftest.$ac_objext \
11663 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011664
Matthias Kloseb9621712010-04-24 17:59:49 +000011665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11666$as_echo_n "checking for inet_aton... " >&6; }
11667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011668/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011669
Martin v. Löwis86d66262006-02-17 08:40:11 +000011670#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011671#include <sys/socket.h>
11672#include <netinet/in.h>
11673#include <arpa/inet.h>
11674
Martin v. Löwise9416172003-05-03 10:12:45 +000011675int
11676main ()
11677{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011678void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011679 ;
11680 return 0;
11681}
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011686
Matthias Kloseb159a552010-04-25 21:00:44 +000011687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011688$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011689else
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011692
11693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011694rm -f core conftest.err conftest.$ac_objext \
11695 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11698$as_echo_n "checking for inet_pton... " >&6; }
11699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011700/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011701
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011702#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011703#include <sys/socket.h>
11704#include <netinet/in.h>
11705#include <arpa/inet.h>
11706
Martin v. Löwise9416172003-05-03 10:12:45 +000011707int
11708main ()
11709{
11710void* p = inet_pton
11711 ;
11712 return 0;
11713}
11714_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011715if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011718
Matthias Kloseb159a552010-04-25 21:00:44 +000011719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011721else
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011724
11725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011727
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011728# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11730$as_echo_n "checking for setgroups... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011732/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011733
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011734#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011735#ifdef HAVE_GRP_H
11736#include <grp.h>
11737#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011738
Martin v. Löwisd5843682002-11-21 20:41:28 +000011739int
11740main ()
11741{
11742void* p = setgroups
11743 ;
11744 return 0;
11745}
11746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011747if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011748
Matthias Kloseb9621712010-04-24 17:59:49 +000011749$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011750
Matthias Kloseb159a552010-04-25 21:00:44 +000011751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011752$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011753else
Matthias Kloseb9621712010-04-24 17:59:49 +000011754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011756
11757fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011759
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011760# check for openpty and forkpty
11761
11762for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011763do :
11764 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011765if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011766 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011768_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011769
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011770else
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11772$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011773if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011774 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011777LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011780
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781/* Override any GCC internal prototype to avoid an error.
11782 Use char because int might match the return type of a GCC
11783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011784#ifdef __cplusplus
11785extern "C"
11786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011787char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011788int
11789main ()
11790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011797 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801rm -f core conftest.err conftest.$ac_objext \
11802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011803LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11806$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011807if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011808 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011809 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11812$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011813if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011815else
11816 ac_check_lib_save_LIBS=$LIBS
11817LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011819/* end confdefs.h. */
11820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821/* Override any GCC internal prototype to avoid an error.
11822 Use char because int might match the return type of a GCC
11823 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011824#ifdef __cplusplus
11825extern "C"
11826#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011827char openpty ();
11828int
11829main ()
11830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011832 ;
11833 return 0;
11834}
11835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011837 ac_cv_lib_bsd_openpty=yes
11838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011841rm -f core conftest.err conftest.$ac_objext \
11842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011843LIBS=$ac_check_lib_save_LIBS
11844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11846$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011849 LIBS="$LIBS -lbsd"
11850fi
11851
11852
11853fi
11854
Fred Drake8cef4cf2000-06-28 16:40:38 +000011855
11856fi
11857done
11858
11859for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011860do :
11861 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011865_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011866
Fred Drake8cef4cf2000-06-28 16:40:38 +000011867else
Matthias Kloseb9621712010-04-24 17:59:49 +000011868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11869$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011870if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011871 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011872else
Martin v. Löwis11437992002-04-12 09:54:03 +000011873 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011874LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878/* Override any GCC internal prototype to avoid an error.
11879 Use char because int might match the return type of a GCC
11880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011881#ifdef __cplusplus
11882extern "C"
11883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011884char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011885int
11886main ()
11887{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011889 ;
11890 return 0;
11891}
11892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011894 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011898rm -f core conftest.err conftest.$ac_objext \
11899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011900LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11903$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011904if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011906 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011907else
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11909$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011912else
11913 ac_check_lib_save_LIBS=$LIBS
11914LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011916/* end confdefs.h. */
11917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011918/* Override any GCC internal prototype to avoid an error.
11919 Use char because int might match the return type of a GCC
11920 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011921#ifdef __cplusplus
11922extern "C"
11923#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011924char forkpty ();
11925int
11926main ()
11927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011929 ;
11930 return 0;
11931}
11932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011934 ac_cv_lib_bsd_forkpty=yes
11935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011938rm -f core conftest.err conftest.$ac_objext \
11939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011940LIBS=$ac_check_lib_save_LIBS
11941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11943$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011944if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011945 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011946 LIBS="$LIBS -lbsd"
11947fi
11948
11949
11950fi
11951
Fred Drake8cef4cf2000-06-28 16:40:38 +000011952
11953fi
11954done
11955
Jack Jansendd19cf82001-12-06 22:36:17 +000011956
Christian Heimesb186d002008-03-18 15:15:01 +000011957# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011958for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011959do :
11960 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011961if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011962 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011963#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011964_ACEOF
11965
11966fi
11967done
11968
11969
Michael W. Hudson54241132001-12-07 15:38:26 +000011970# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011971for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011972do :
11973 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11974ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011975if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011976 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011977#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011978_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011980fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981done
11982
Michael W. Hudson54241132001-12-07 15:38:26 +000011983
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011984ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011986 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011987
Martin v. Löwis1142de32002-03-29 16:28:31 +000011988else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011990 *" dup2.$ac_objext "* ) ;;
11991 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011992 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011993esac
11994
Martin v. Löwis1142de32002-03-29 16:28:31 +000011995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011996
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011997ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011998if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011999 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12000
12001else
12002 case " $LIBOBJS " in
12003 *" strdup.$ac_objext "* ) ;;
12004 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12005 ;;
12006esac
12007
12008fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012009
12010
12011for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012012do :
12013 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012014if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012015 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012016#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012017_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012021int
12022main ()
12023{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012025 ;
12026 return 0;
12027}
12028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012032
Guido van Rossum627b2d71993-12-24 10:39:16 +000012033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012035
Guido van Rossum627b2d71993-12-24 10:39:16 +000012036fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012037done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012038
Jack Jansen150753c2003-03-29 22:07:47 +000012039for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012040do :
12041 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012048#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012049int
12050main ()
12051{
12052setpgrp(0,0);
12053 ;
12054 return 0;
12055}
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012060
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012063
12064fi
12065done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012066
Thomas Wouters3a584202000-08-05 23:28:51 +000012067for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012068do :
12069 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012076#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012077int
12078main ()
12079{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ;
12082 return 0;
12083}
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_compile "$LINENO"; then :
12086
Guido van Rossum627b2d71993-12-24 10:39:16 +000012087else
Skip Montanaro6dead952003-09-25 14:50:04 +000012088
Matthias Kloseb9621712010-04-24 17:59:49 +000012089$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012090
Martin v. Löwis11437992002-04-12 09:54:03 +000012091
Guido van Rossum627b2d71993-12-24 10:39:16 +000012092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012096done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012097
Michael W. Hudson54241132001-12-07 15:38:26 +000012098
Victor Stinnere0be4232011-10-25 13:06:09 +020012099for ac_func in clock_gettime
12100do :
12101 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12102if test "x$ac_cv_func_clock_gettime" = xyes; then :
12103 cat >>confdefs.h <<_ACEOF
12104#define HAVE_CLOCK_GETTIME 1
12105_ACEOF
12106
12107else
12108
12109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12110$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12111if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12112 $as_echo_n "(cached) " >&6
12113else
12114 ac_check_lib_save_LIBS=$LIBS
12115LIBS="-lrt $LIBS"
12116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12117/* end confdefs.h. */
12118
12119/* Override any GCC internal prototype to avoid an error.
12120 Use char because int might match the return type of a GCC
12121 builtin and then its argument prototype would still apply. */
12122#ifdef __cplusplus
12123extern "C"
12124#endif
12125char clock_gettime ();
12126int
12127main ()
12128{
12129return clock_gettime ();
12130 ;
12131 return 0;
12132}
12133_ACEOF
12134if ac_fn_c_try_link "$LINENO"; then :
12135 ac_cv_lib_rt_clock_gettime=yes
12136else
12137 ac_cv_lib_rt_clock_gettime=no
12138fi
12139rm -f core conftest.err conftest.$ac_objext \
12140 conftest$ac_exeext conftest.$ac_ext
12141LIBS=$ac_check_lib_save_LIBS
12142fi
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12144$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12145if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12146
Victor Stinner7efb8332014-08-29 15:41:08 +020012147 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012148 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12149
12150
12151$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12152
12153
12154fi
12155
12156
12157fi
12158done
12159
12160
12161for ac_func in clock_getres
12162do :
12163 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12164if test "x$ac_cv_func_clock_getres" = xyes; then :
12165 cat >>confdefs.h <<_ACEOF
12166#define HAVE_CLOCK_GETRES 1
12167_ACEOF
12168
12169else
12170
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12172$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12173if ${ac_cv_lib_rt_clock_getres+:} false; then :
12174 $as_echo_n "(cached) " >&6
12175else
12176 ac_check_lib_save_LIBS=$LIBS
12177LIBS="-lrt $LIBS"
12178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12179/* end confdefs.h. */
12180
12181/* Override any GCC internal prototype to avoid an error.
12182 Use char because int might match the return type of a GCC
12183 builtin and then its argument prototype would still apply. */
12184#ifdef __cplusplus
12185extern "C"
12186#endif
12187char clock_getres ();
12188int
12189main ()
12190{
12191return clock_getres ();
12192 ;
12193 return 0;
12194}
12195_ACEOF
12196if ac_fn_c_try_link "$LINENO"; then :
12197 ac_cv_lib_rt_clock_getres=yes
12198else
12199 ac_cv_lib_rt_clock_getres=no
12200fi
12201rm -f core conftest.err conftest.$ac_objext \
12202 conftest$ac_exeext conftest.$ac_ext
12203LIBS=$ac_check_lib_save_LIBS
12204fi
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12206$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12207if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12208
12209 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12210
12211
12212fi
12213
12214
12215fi
12216done
12217
12218
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12220$as_echo_n "checking for major... " >&6; }
12221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012222/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012223
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012224#if defined(MAJOR_IN_MKDEV)
12225#include <sys/mkdev.h>
12226#elif defined(MAJOR_IN_SYSMACROS)
12227#include <sys/sysmacros.h>
12228#else
12229#include <sys/types.h>
12230#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012231
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012232int
12233main ()
12234{
12235
12236 makedev(major(0),minor(0));
12237
12238 ;
12239 return 0;
12240}
12241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012243
12244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12248$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012249
12250else
Skip Montanaro6dead952003-09-25 14:50:04 +000012251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12253$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012254
12255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012256rm -f core conftest.err conftest.$ac_objext \
12257 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012258
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012259# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012260# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12262$as_echo_n "checking for getaddrinfo... " >&6; }
12263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012264/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012265
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012266#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012267#include <sys/socket.h>
12268#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012269#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271int
12272main ()
12273{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012274getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 ;
12276 return 0;
12277}
12278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012279if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012280 have_getaddrinfo=yes
12281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284rm -f core conftest.err conftest.$ac_objext \
12285 conftest$ac_exeext conftest.$ac_ext
12286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12287$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012288if test $have_getaddrinfo = yes
12289then
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12291$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012292 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012296
12297if test "${enable_ipv6+set}" = set; then
12298 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12299else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012300 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012301fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012304/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012305
Stefan Krah19c21392012-11-22 23:47:32 +010012306#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012307#include <sys/types.h>
12308#include <netdb.h>
12309#include <string.h>
12310#include <sys/socket.h>
12311#include <netinet/in.h>
12312
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012313int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314{
12315 int passive, gaierr, inet4 = 0, inet6 = 0;
12316 struct addrinfo hints, *ai, *aitop;
12317 char straddr[INET6_ADDRSTRLEN], strport[16];
12318
12319 for (passive = 0; passive <= 1; passive++) {
12320 memset(&hints, 0, sizeof(hints));
12321 hints.ai_family = AF_UNSPEC;
12322 hints.ai_flags = passive ? AI_PASSIVE : 0;
12323 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012324 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12326 (void)gai_strerror(gaierr);
12327 goto bad;
12328 }
12329 for (ai = aitop; ai; ai = ai->ai_next) {
12330 if (ai->ai_addr == NULL ||
12331 ai->ai_addrlen == 0 ||
12332 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12333 straddr, sizeof(straddr), strport, sizeof(strport),
12334 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12335 goto bad;
12336 }
12337 switch (ai->ai_family) {
12338 case AF_INET:
12339 if (strcmp(strport, "54321") != 0) {
12340 goto bad;
12341 }
12342 if (passive) {
12343 if (strcmp(straddr, "0.0.0.0") != 0) {
12344 goto bad;
12345 }
12346 } else {
12347 if (strcmp(straddr, "127.0.0.1") != 0) {
12348 goto bad;
12349 }
12350 }
12351 inet4++;
12352 break;
12353 case AF_INET6:
12354 if (strcmp(strport, "54321") != 0) {
12355 goto bad;
12356 }
12357 if (passive) {
12358 if (strcmp(straddr, "::") != 0) {
12359 goto bad;
12360 }
12361 } else {
12362 if (strcmp(straddr, "::1") != 0) {
12363 goto bad;
12364 }
12365 }
12366 inet6++;
12367 break;
12368 case AF_UNSPEC:
12369 goto bad;
12370 break;
12371 default:
12372 /* another family support? */
12373 break;
12374 }
12375 }
12376 }
12377
12378 if (!(inet4 == 0 || inet4 == 2))
12379 goto bad;
12380 if (!(inet6 == 0 || inet6 == 2))
12381 goto bad;
12382
12383 if (aitop)
12384 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012385 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386
12387 bad:
12388 if (aitop)
12389 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012390 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391}
12392
Martin v. Löwis11437992002-04-12 09:54:03 +000012393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012395 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012396else
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12400 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012403fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12408$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12409
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012410if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012411then
12412 if test $ipv6 = yes
12413 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012414 echo 'Fatal: You must get working getaddrinfo() function.'
12415 echo ' or you can specify "--disable-ipv6"'.
12416 exit 1
12417 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012418else
Martin v. Löwis11437992002-04-12 09:54:03 +000012419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012421
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012423
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012424for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012425do :
12426 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012427if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012430_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432fi
12433done
12434
Michael W. Hudson54241132001-12-07 15:38:26 +000012435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12438$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012439if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012441else
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012443/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012444#include <sys/types.h>
12445#include <sys/time.h>
12446#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Martin v. Löwis11437992002-04-12 09:54:03 +000012448int
12449main ()
12450{
12451if ((struct tm *) 0)
12452return 0;
12453 ;
12454 return 0;
12455}
12456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012457if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012459else
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12465$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012466if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Matthias Kloseb9621712010-04-24 17:59:49 +000012468$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469
12470fi
12471
Matthias Kloseb9621712010-04-24 17:59:49 +000012472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12473$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012474if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476else
Matthias Kloseb9621712010-04-24 17:59:49 +000012477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012478/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479#include <sys/types.h>
12480#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482int
12483main ()
12484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485struct tm tm;
12486 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ;
12489 return 0;
12490}
12491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012492if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493 ac_cv_struct_tm=time.h
12494else
Matthias Kloseb9621712010-04-24 17:59:49 +000012495 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12500$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012501if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504
12505fi
12506
Matthias Kloseb9621712010-04-24 17:59:49 +000012507ac_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 +000012508#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
Matthias Kloseb9621712010-04-24 17:59:49 +000012510"
Victor Stinnere0be4232011-10-25 13:06:09 +020012511if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012512
12513cat >>confdefs.h <<_ACEOF
12514#define HAVE_STRUCT_TM_TM_ZONE 1
12515_ACEOF
12516
12517
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012518fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12521
Matthias Kloseb9621712010-04-24 17:59:49 +000012522$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523
12524else
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12526"
Victor Stinnere0be4232011-10-25 13:06:09 +020012527if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529else
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531fi
12532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012534#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012535_ACEOF
12536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12538$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012539if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012543/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012544#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545#if !HAVE_DECL_TZNAME
12546extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012547#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012548
Martin v. Löwis11437992002-04-12 09:54:03 +000012549int
12550main ()
12551{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
12555}
12556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558 ac_cv_var_tzname=yes
12559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562rm -f core conftest.err conftest.$ac_objext \
12563 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012564fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12566$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012567 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012571 fi
12572fi
12573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574ac_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 +020012575if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
12577cat >>confdefs.h <<_ACEOF
12578#define HAVE_STRUCT_STAT_ST_RDEV 1
12579_ACEOF
12580
12581
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012582fi
12583
Matthias Kloseb9621712010-04-24 17:59:49 +000012584ac_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 +020012585if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012586
Martin v. Löwis11437992002-04-12 09:54:03 +000012587cat >>confdefs.h <<_ACEOF
12588#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12589_ACEOF
12590
12591
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012592fi
12593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594ac_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 +020012595if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012596
12597cat >>confdefs.h <<_ACEOF
12598#define HAVE_STRUCT_STAT_ST_FLAGS 1
12599_ACEOF
12600
12601
12602fi
12603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604ac_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 +020012605if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012606
12607cat >>confdefs.h <<_ACEOF
12608#define HAVE_STRUCT_STAT_ST_GEN 1
12609_ACEOF
12610
12611
12612fi
12613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614ac_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 +020012615if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012616
12617cat >>confdefs.h <<_ACEOF
12618#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12619_ACEOF
12620
12621
12622fi
12623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624ac_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 +020012625if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627cat >>confdefs.h <<_ACEOF
12628#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12629_ACEOF
12630
12631
Matthias Kloseb9621712010-04-24 17:59:49 +000012632$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012633
12634else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012635 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012636 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12638 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012639esac
12640
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012641fi
12642
Michael W. Hudson54241132001-12-07 15:38:26 +000012643
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Matthias Kloseb9621712010-04-24 17:59:49 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12646$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012647if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649else
Matthias Kloseb159a552010-04-25 21:00:44 +000012650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012652/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012653#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012654int
12655main ()
12656{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012657return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ;
12659 return 0;
12660}
12661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012663 ac_cv_header_time_altzone=yes
12664else
Matthias Kloseb9621712010-04-24 17:59:49 +000012665 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669fi
12670
Matthias Kloseb9621712010-04-24 17:59:49 +000012671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12672$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012673if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Matthias Kloseb9621712010-04-24 17:59:49 +000012675$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676
12677fi
12678
Guido van Rossumda88dad1995-01-26 00:46:29 +000012679was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12681$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012683/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012684
12685#include <sys/types.h>
12686#include <sys/select.h>
12687#include <sys/time.h>
12688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689int
12690main ()
12691{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692;
Martin v. Löwis11437992002-04-12 09:54:03 +000012693 ;
12694 return 0;
12695}
12696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
12699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012702 was_it_defined=yes
12703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12707$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708
Matthias Kloseb9621712010-04-24 17:59:49 +000012709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12710$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012711if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713else
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012716#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012717int
12718main ()
12719{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 ;
12722 return 0;
12723}
12724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012726 ac_cv_struct_addrinfo=yes
12727else
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12731fi
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12734$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012735if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
Matthias Kloseb9621712010-04-24 17:59:49 +000012737$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012738
12739fi
12740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12742$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012743if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012744 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012747/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012748
12749# include <sys/types.h>
12750# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012751int
12752main ()
12753{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012754struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 ;
12756 return 0;
12757}
12758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760 ac_cv_struct_sockaddr_storage=yes
12761else
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12765fi
12766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12768$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012769if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012772
12773fi
12774
Guido van Rossum627b2d71993-12-24 10:39:16 +000012775# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12778$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012779if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012785int
12786main ()
12787{
12788static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012789test_array [0] = 0;
12790return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
12792 ;
12793 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012794}
Martin v. Löwis11437992002-04-12 09:54:03 +000012795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012797 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12804$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807
12808fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12811$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012812if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012814else
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012817
Martin v. Löwis11437992002-04-12 09:54:03 +000012818int
12819main ()
12820{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012821
Martin v. Löwis11437992002-04-12 09:54:03 +000012822#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012823 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012824 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012825 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012826 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827 char const *const *pcpcc;
12828 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 /* NEC SVR4.0.2 mips cc rejects this. */
12830 struct point {int x, y;};
12831 static struct point const zero = {0,0};
12832 /* AIX XL C 1.02.0.0 rejects this.
12833 It does not let you subtract one const X* pointer from another in
12834 an arm of an if-expression whose if-part is not a constant
12835 expression */
12836 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012837 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012838 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839 ++pcpcc;
12840 ppc = (char**) pcpcc;
12841 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012842 { /* SCO 3.2v4 cc rejects this sort of thing. */
12843 char tx;
12844 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012848 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 }
12850 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12851 int x[] = {25, 17};
12852 const int *foo = &x[0];
12853 ++foo;
12854 }
12855 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12856 typedef const int *iptr;
12857 iptr p = 0;
12858 ++p;
12859 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012860 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012862 struct s { int j; const int *ap[3]; } bx;
12863 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 }
12865 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12866 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012869 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012870#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012871
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ;
12873 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012874}
Martin v. Löwis11437992002-04-12 09:54:03 +000012875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012877 ac_cv_c_const=yes
12878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12884$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012885if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012888
12889fi
12890
Michael W. Hudson54241132001-12-07 15:38:26 +000012891
Guido van Rossumda88dad1995-01-26 00:46:29 +000012892works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12894$as_echo_n "checking for working volatile... " >&6; }
12895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012896/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012897
Martin v. Löwis11437992002-04-12 09:54:03 +000012898int
12899main ()
12900{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012901volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 ;
12903 return 0;
12904}
12905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012906if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012907 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012908else
Skip Montanaro6dead952003-09-25 14:50:04 +000012909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012911
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012912
Guido van Rossum627b2d71993-12-24 10:39:16 +000012913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12916$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012917
Guido van Rossumda88dad1995-01-26 00:46:29 +000012918works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12920$as_echo_n "checking for working signed char... " >&6; }
12921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012922/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012923
Martin v. Löwis11437992002-04-12 09:54:03 +000012924int
12925main ()
12926{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012928 ;
12929 return 0;
12930}
12931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012932if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012933 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012934else
Skip Montanaro6dead952003-09-25 14:50:04 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012937
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012938
Guido van Rossum7f43da71994-08-01 12:15:30 +000012939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12942$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012943
Guido van Rossumda88dad1995-01-26 00:46:29 +000012944have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12946$as_echo_n "checking for prototypes... " >&6; }
12947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012948/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012949int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
12956}
12957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Matthias Kloseb159a552010-04-25 21:00:44 +000012962 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12966$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967
Guido van Rossumda88dad1995-01-26 00:46:29 +000012968works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12970$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012972/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012973
12974#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012975int foo(int x, ...) {
12976 va_list va;
12977 va_start(va, x);
12978 va_arg(va, int);
12979 va_arg(va, char *);
12980 va_arg(va, double);
12981 return 0;
12982}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012983
Martin v. Löwis11437992002-04-12 09:54:03 +000012984int
12985main ()
12986{
Guido van Rossum90eea071996-08-30 20:58:57 +000012987return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012988 ;
12989 return 0;
12990}
12991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012993
12994
Matthias Kloseb9621712010-04-24 17:59:49 +000012995$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012996
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012997 works=yes
12998
Guido van Rossum627b2d71993-12-24 10:39:16 +000012999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13002$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003
Martin v. Löwisd6320502004-08-12 13:45:08 +000013004# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13006$as_echo_n "checking for socketpair... " >&6; }
13007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013008/* end confdefs.h. */
13009
13010#include <sys/types.h>
13011#include <sys/socket.h>
13012
13013int
13014main ()
13015{
13016void *x=socketpair
13017 ;
13018 return 0;
13019}
13020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013022
Matthias Kloseb9621712010-04-24 17:59:49 +000013023$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013024
Matthias Kloseb159a552010-04-25 21:00:44 +000013025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013026$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013027else
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013030
13031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013033
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013034# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13036$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013038/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039#include <sys/types.h>
13040#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013041int
13042main ()
13043{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013044struct sockaddr x;
13045x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013046 ;
13047 return 0;
13048}
13049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013050if ac_fn_c_try_compile "$LINENO"; then :
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13052$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013055
13056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13058$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013059
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013062
Guido van Rossumda88dad1995-01-26 00:46:29 +000013063va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13065$as_echo_n "checking whether va_list is an array... " >&6; }
13066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013067/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068
13069#ifdef HAVE_STDARG_PROTOTYPES
13070#include <stdarg.h>
13071#else
13072#include <varargs.h>
13073#endif
13074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075int
13076main ()
13077{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ;
13080 return 0;
13081}
13082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013083if ac_fn_c_try_compile "$LINENO"; then :
13084
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085else
Skip Montanaro6dead952003-09-25 14:50:04 +000013086
Martin v. Löwis11437992002-04-12 09:54:03 +000013087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Guido van Rossumda88dad1995-01-26 00:46:29 +000013090 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013091
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13095$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013096
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013097# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013098
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013101if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13106$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013107 OLD_CFLAGS=$CFLAGS
13108 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013110/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013111
13112# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
Martin v. Löwis11437992002-04-12 09:54:03 +000013114int
13115main ()
13116{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013117
13118 char *name;
13119 struct hostent *he, *res;
13120 char buffer[2048];
13121 int buflen = 2048;
13122 int h_errnop;
13123
13124 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013125
13126 ;
13127 return 0;
13128}
13129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013133
Martin v. Löwis11437992002-04-12 09:54:03 +000013134
Matthias Kloseb9621712010-04-24 17:59:49 +000013135$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013136
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13138$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013140else
Skip Montanaro6dead952003-09-25 14:50:04 +000013141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13143$as_echo "no" >&6; }
13144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13145$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013147/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013148
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013149# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
Martin v. Löwis11437992002-04-12 09:54:03 +000013151int
13152main ()
13153{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013154
13155 char *name;
13156 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013157 char buffer[2048];
13158 int buflen = 2048;
13159 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013160
Matthias Kloseb159a552010-04-25 21:00:44 +000013161 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
13163 ;
13164 return 0;
13165}
13166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013168
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171
Matthias Kloseb159a552010-04-25 21:00:44 +000013172$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13175$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013177else
Skip Montanaro6dead952003-09-25 14:50:04 +000013178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13180$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13182$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13184/* end confdefs.h. */
13185
13186# include <netdb.h>
13187
13188int
13189main ()
13190{
13191
13192 char *name;
13193 struct hostent *he;
13194 struct hostent_data data;
13195
13196 (void) gethostbyname_r(name, he, &data);
13197
13198 ;
13199 return 0;
13200}
13201_ACEOF
13202if ac_fn_c_try_compile "$LINENO"; then :
13203
13204 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13205
13206
13207$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13208
13209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13210$as_echo "yes" >&6; }
13211
13212else
13213
13214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013225 CFLAGS=$OLD_CFLAGS
13226
13227else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013228
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 for ac_func in gethostbyname
13230do :
13231 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013232if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013235_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013236
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013237fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013238done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013239
Michael W. Hudson54241132001-12-07 15:38:26 +000013240
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013241fi
13242
Michael W. Hudson54241132001-12-07 15:38:26 +000013243
13244
13245
13246
13247
13248
Guido van Rossum627b2d71993-12-24 10:39:16 +000013249# checks for system services
13250# (none yet)
13251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013252# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013253ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013254if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013255
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013256else
Matthias Kloseb9621712010-04-24 17:59:49 +000013257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13258$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261else
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013263LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267/* Override any GCC internal prototype to avoid an error.
13268 Use char because int might match the return type of a GCC
13269 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013270#ifdef __cplusplus
13271extern "C"
13272#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013273char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013274int
13275main ()
13276{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013277return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013278 ;
13279 return 0;
13280}
13281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013286fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013287rm -f core conftest.err conftest.$ac_objext \
13288 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013289LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13292$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013293if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013294 cat >>confdefs.h <<_ACEOF
13295#define HAVE_LIBIEEE 1
13296_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013297
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013298 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299
Guido van Rossum627b2d71993-12-24 10:39:16 +000013300fi
13301
Michael W. Hudson54241132001-12-07 15:38:26 +000013302
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013303fi
13304
Michael W. Hudson54241132001-12-07 15:38:26 +000013305
Guido van Rossum7f253911997-05-09 02:42:48 +000013306# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13308$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013310# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013311if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013312 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013313if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013314then
13315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13319$as_echo "yes" >&6; }
13320else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13321$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013322fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013323else
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13325$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326fi
13327
Guido van Rossum7f253911997-05-09 02:42:48 +000013328
Guido van Rossum7f43da71994-08-01 12:15:30 +000013329# check for --with-libm=...
13330
Guido van Rossum563e7081996-09-10 18:20:48 +000013331case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013332Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013333*) LIBM=-lm
13334esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13336$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013339if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013341if test "$withval" = no
13342then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13344$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013345elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013346then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13348$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013349else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013350fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013351else
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13353$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013354fi
13355
Guido van Rossum7f43da71994-08-01 12:15:30 +000013356
13357# check for --with-libc=...
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13360$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013362# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013363if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013365if test "$withval" = no
13366then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13368$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013369elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013370then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13372$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013373else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013374fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013375else
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13377$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378fi
13379
Guido van Rossum7f43da71994-08-01 12:15:30 +000013380
Stefan Krah1919b7e2012-03-21 18:25:23 +010013381# **************************************
13382# * Check for gcc x64 inline assembler *
13383# **************************************
13384
13385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13386$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13388/* end confdefs.h. */
13389
13390int
13391main ()
13392{
13393
13394 __asm__ __volatile__ ("movq %rcx, %rax");
13395
13396 ;
13397 return 0;
13398}
13399_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013400if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013401 have_gcc_asm_for_x64=yes
13402else
13403 have_gcc_asm_for_x64=no
13404fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013405rm -f core conftest.err conftest.$ac_objext \
13406 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13408$as_echo "$have_gcc_asm_for_x64" >&6; }
13409if test "$have_gcc_asm_for_x64" = yes
13410then
13411
13412$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13413
13414fi
13415
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013416# **************************************************
13417# * Check for various properties of floating point *
13418# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13421$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013422if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013423 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013424else
13425
Matthias Kloseb9621712010-04-24 17:59:49 +000013426if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013427 ac_cv_little_endian_double=no
13428else
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013430/* end confdefs.h. */
13431
13432#include <string.h>
13433int main() {
13434 double x = 9006104071832581.0;
13435 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13436 return 0;
13437 else
13438 return 1;
13439}
13440
13441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013443 ac_cv_little_endian_double=yes
13444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013449fi
13450
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013451fi
13452
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13454$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013455if test "$ac_cv_little_endian_double" = yes
13456then
13457
Matthias Kloseb9621712010-04-24 17:59:49 +000013458$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013459
13460fi
13461
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13463$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013464if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013466else
13467
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013469 ac_cv_big_endian_double=no
13470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013472/* end confdefs.h. */
13473
13474#include <string.h>
13475int main() {
13476 double x = 9006104071832581.0;
13477 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13478 return 0;
13479 else
13480 return 1;
13481}
13482
13483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013484if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013485 ac_cv_big_endian_double=yes
13486else
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013491fi
13492
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013493fi
13494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13496$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013497if test "$ac_cv_big_endian_double" = yes
13498then
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013501
13502fi
13503
13504# Some ARM platforms use a mixed-endian representation for doubles.
13505# While Python doesn't currently have full support for these platforms
13506# (see e.g., issue 1762561), we can at least make sure that float <-> string
13507# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13509$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013510if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013512else
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013515 ac_cv_mixed_endian_double=no
13516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013518/* end confdefs.h. */
13519
13520#include <string.h>
13521int main() {
13522 double x = 9006104071832581.0;
13523 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13524 return 0;
13525 else
13526 return 1;
13527}
13528
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013531 ac_cv_mixed_endian_double=yes
13532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013537fi
13538
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013539fi
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13542$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013543if test "$ac_cv_mixed_endian_double" = yes
13544then
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013547
13548fi
13549
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013550# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013551# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013552# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013553# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013554# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013555# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013556
13557# This inline assembler syntax may also work for suncc and icc,
13558# so we try it on all platforms.
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13561$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013563/* end confdefs.h. */
13564
13565int
13566main ()
13567{
13568
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013569 unsigned short cw;
13570 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13571 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013572
13573 ;
13574 return 0;
13575}
13576_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013577if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013578 have_gcc_asm_for_x87=yes
13579else
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013581fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013582rm -f core conftest.err conftest.$ac_objext \
13583 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13585$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013586if test "$have_gcc_asm_for_x87" = yes
13587then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013588
Matthias Kloseb9621712010-04-24 17:59:49 +000013589$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013590
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013591fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13594$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596/* end confdefs.h. */
13597
13598int
13599main ()
13600{
13601
13602 unsigned int fpcr;
13603 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13604 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13605
13606 ;
13607 return 0;
13608}
13609_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013610if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013611 have_gcc_asm_for_mc68881=yes
13612else
13613 have_gcc_asm_for_mc68881=no
13614fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013615rm -f core conftest.err conftest.$ac_objext \
13616 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13618$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13619if test "$have_gcc_asm_for_mc68881" = yes
13620then
13621
13622$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13623
13624fi
13625
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013626# Detect whether system arithmetic is subject to x87-style double
13627# rounding issues. The result of this test has little meaning on non
13628# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13629# mode is round-to-nearest and double rounding issues are present, and
13630# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13632$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013633# $BASECFLAGS may affect the result
13634ac_save_cc="$CC"
13635CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013636if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013637 ac_cv_x87_double_rounding=no
13638else
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013640/* end confdefs.h. */
13641
13642#include <stdlib.h>
13643#include <math.h>
13644int main() {
13645 volatile double x, y, z;
13646 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13647 x = 0.99999999999999989; /* 1-2**-53 */
13648 y = 1./x;
13649 if (y != 1.)
13650 exit(0);
13651 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13652 x = 1e16;
13653 y = 2.99999;
13654 z = x + y;
13655 if (z != 1e16+4.)
13656 exit(0);
13657 /* both tests show evidence of double rounding */
13658 exit(1);
13659}
13660
13661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013662if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013663 ac_cv_x87_double_rounding=no
13664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013666fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13668 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013669fi
13670
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13673$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013674if test "$ac_cv_x87_double_rounding" = yes
13675then
13676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013678
13679fi
13680
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013681# ************************************
13682# * Check for mathematical functions *
13683# ************************************
13684
13685LIBS_SAVE=$LIBS
13686LIBS="$LIBS $LIBM"
13687
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013688for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13689do :
13690 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13691ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013692if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013693 cat >>confdefs.h <<_ACEOF
13694#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13695_ACEOF
13696
13697fi
13698done
13699
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013700for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013701do :
13702 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13703ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013704if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013705 cat >>confdefs.h <<_ACEOF
13706#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13707_ACEOF
13708
13709fi
13710done
13711
13712ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13713"
Victor Stinnere0be4232011-10-25 13:06:09 +020013714if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013715 ac_have_decl=1
13716else
13717 ac_have_decl=0
13718fi
13719
13720cat >>confdefs.h <<_ACEOF
13721#define HAVE_DECL_ISINF $ac_have_decl
13722_ACEOF
13723ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13724"
Victor Stinnere0be4232011-10-25 13:06:09 +020013725if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013726 ac_have_decl=1
13727else
13728 ac_have_decl=0
13729fi
13730
13731cat >>confdefs.h <<_ACEOF
13732#define HAVE_DECL_ISNAN $ac_have_decl
13733_ACEOF
13734ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13735"
Victor Stinnere0be4232011-10-25 13:06:09 +020013736if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013737 ac_have_decl=1
13738else
13739 ac_have_decl=0
13740fi
13741
13742cat >>confdefs.h <<_ACEOF
13743#define HAVE_DECL_ISFINITE $ac_have_decl
13744_ACEOF
13745
13746
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013747# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13748# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13750$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013751if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013753else
13754
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013756 ac_cv_tanh_preserves_zero_sign=no
13757else
Matthias Kloseb9621712010-04-24 17:59:49 +000013758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013759/* end confdefs.h. */
13760
13761#include <math.h>
13762#include <stdlib.h>
13763int main() {
13764 /* return 0 if either negative zeros don't exist
13765 on this platform or if negative zeros exist
13766 and tanh(-0.) == -0. */
13767 if (atan2(0., -1.) == atan2(-0., -1.) ||
13768 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13769 else exit(1);
13770}
13771
13772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013774 ac_cv_tanh_preserves_zero_sign=yes
13775else
Matthias Kloseb9621712010-04-24 17:59:49 +000013776 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013780fi
13781
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013782fi
13783
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13785$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013786if test "$ac_cv_tanh_preserves_zero_sign" = yes
13787then
13788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013790
13791fi
13792
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013793if test "$ac_cv_func_log1p" = yes
13794then
13795 # On some versions of AIX, log1p(-0.) returns 0. instead of
13796 # -0. See issue #9920.
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13798$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013799 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013800 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013801else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013802
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013803 if test "$cross_compiling" = yes; then :
13804 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013805else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13807/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013808
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013809 #include <math.h>
13810 #include <stdlib.h>
13811 int main() {
13812 /* Fail if the signs of log1p(-0.) and -0. can be
13813 distinguished. */
13814 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13815 return 0;
13816 else
13817 return 1;
13818 }
13819
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013820_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013821if ac_fn_c_try_run "$LINENO"; then :
13822 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013823else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013824 ac_cv_log1p_drops_zero_sign=yes
13825fi
13826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013828fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013829
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013830fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013831
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13833$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13834fi
13835if test "$ac_cv_log1p_drops_zero_sign" = yes
13836then
13837
13838$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13839
13840fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013841
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013842LIBS=$LIBS_SAVE
13843
Mark Dickinsona614f042009-11-28 12:48:43 +000013844# For multiprocessing module, check that sem_open
13845# actually works. For FreeBSD versions <= 7.2,
13846# the kernel module that provides POSIX semaphores
13847# isn't loaded by default, so an attempt to call
13848# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13850$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013851if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013853else
Matthias Kloseb9621712010-04-24 17:59:49 +000013854 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013855 ac_cv_posix_semaphores_enabled=yes
13856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013858/* end confdefs.h. */
13859
13860#include <unistd.h>
13861#include <fcntl.h>
13862#include <stdio.h>
13863#include <semaphore.h>
13864#include <sys/stat.h>
13865
13866int main(void) {
13867 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13868 if (a == SEM_FAILED) {
13869 perror("sem_open");
13870 return 1;
13871 }
13872 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013873 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013874 return 0;
13875}
13876
13877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013879 ac_cv_posix_semaphores_enabled=yes
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013885fi
13886
13887
Mark Dickinsona614f042009-11-28 12:48:43 +000013888fi
13889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13891$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013892if test $ac_cv_posix_semaphores_enabled = no
13893then
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013896
13897fi
13898
Mark Dickinson10683072009-04-18 21:18:19 +000013899# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13901$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013902if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013904else
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013906 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013907else
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013909/* end confdefs.h. */
13910
13911#include <unistd.h>
13912#include <fcntl.h>
13913#include <stdio.h>
13914#include <semaphore.h>
13915#include <sys/stat.h>
13916
13917int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013918 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013919 int count;
13920 int res;
13921 if(a==SEM_FAILED){
13922 perror("sem_open");
13923 return 1;
13924
13925 }
13926 res = sem_getvalue(a, &count);
13927 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013928 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013929 return res==-1 ? 1 : 0;
13930}
13931
Mark Dickinson10683072009-04-18 21:18:19 +000013932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013934 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013935else
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013940fi
13941
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013942
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013943fi
13944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13946$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013947if test $ac_cv_broken_sem_getvalue = yes
13948then
13949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013951
13952fi
13953
Mark Dickinsonbd792642009-03-18 20:06:12 +000013954# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13956$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013957# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013958if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013959 enableval=$enable_big_digits; case $enable_big_digits in
13960yes)
13961 enable_big_digits=30 ;;
13962no)
13963 enable_big_digits=15 ;;
1396415|30)
13965 ;;
13966*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013967 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 +000013968esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13970$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013971
13972cat >>confdefs.h <<_ACEOF
13973#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13974_ACEOF
13975
13976
13977else
Matthias Kloseb9621712010-04-24 17:59:49 +000013978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13979$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013980fi
13981
13982
Guido van Rossumef2255b2000-03-10 22:30:29 +000013983# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013984ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013985if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013990 wchar_h="yes"
13991
Guido van Rossumef2255b2000-03-10 22:30:29 +000013992else
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013994
13995fi
13996
Michael W. Hudson54241132001-12-07 15:38:26 +000013997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013999# determine wchar_t size
14000if test "$wchar_h" = yes
14001then
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14005# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14007$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014008if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014010else
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14012"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
Martin v. Löwis11437992002-04-12 09:54:03 +000014014else
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 if test "$ac_cv_type_wchar_t" = yes; then
14016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014018as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014019See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020 else
14021 ac_cv_sizeof_wchar_t=0
14022 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014023fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014024
Martin v. Löwis11437992002-04-12 09:54:03 +000014025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14027$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014028
14029
14030
Martin v. Löwis11437992002-04-12 09:54:03 +000014031cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014032#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014033_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014034
Michael W. Hudson54241132001-12-07 15:38:26 +000014035
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014036fi
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14039$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014040have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014042/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014043
14044#include <tcl.h>
14045#if TCL_UTF_MAX != 6
14046# error "NOT UCS4_TCL"
14047#endif
14048int
14049main ()
14050{
14051
14052 ;
14053 return 0;
14054}
14055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014057
14058
Matthias Kloseb9621712010-04-24 17:59:49 +000014059$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014060
14061 have_ucs4_tcl=yes
14062
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14066$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014067
Skip Montanaro6dead952003-09-25 14:50:04 +000014068# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014069if test "$wchar_h" = yes
14070then
14071 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14073$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014074 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014076else
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014079 ac_cv_wchar_t_signed=yes
14080else
Matthias Kloseb9621712010-04-24 17:59:49 +000014081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014083
14084 #include <wchar.h>
14085 int main()
14086 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014087 /* Success: exit code 0 */
14088 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014089 }
14090
14091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014093 ac_cv_wchar_t_signed=yes
14094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014099fi
14100
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014101fi
14102
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14104$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014105fi
14106
Georg Brandl52d168a2008-01-07 18:10:24 +000014107# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014108if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014109 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014110then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014111 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
Georg Brandl52d168a2008-01-07 18:10:24 +000014115else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014116 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014117fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14119$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014120
14121# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14123$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014126else
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 ac_cv_c_bigendian=unknown
14128 # See if we're dealing with a universal compiler.
14129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14130/* end confdefs.h. */
14131#ifndef __APPLE_CC__
14132 not a universal capable compiler
14133 #endif
14134 typedef int dummy;
14135
Skip Montanaro6dead952003-09-25 14:50:04 +000014136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014137if ac_fn_c_try_compile "$LINENO"; then :
14138
14139 # Check for potential -arch flags. It is not universal unless
14140 # there are at least two -arch flags with different values.
14141 ac_arch=
14142 ac_prev=
14143 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14144 if test -n "$ac_prev"; then
14145 case $ac_word in
14146 i?86 | x86_64 | ppc | ppc64)
14147 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14148 ac_arch=$ac_word
14149 else
14150 ac_cv_c_bigendian=universal
14151 break
14152 fi
14153 ;;
14154 esac
14155 ac_prev=
14156 elif test "x$ac_word" = "x-arch"; then
14157 ac_prev=arch
14158 fi
14159 done
14160fi
14161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14162 if test $ac_cv_c_bigendian = unknown; then
14163 # See if sys/param.h defines the BYTE_ORDER macro.
14164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014165/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014166#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014168
Martin v. Löwis11437992002-04-12 09:54:03 +000014169int
14170main ()
14171{
Matthias Kloseb9621712010-04-24 17:59:49 +000014172#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14173 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14174 && LITTLE_ENDIAN)
14175 bogus endian macros
14176 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
14178 ;
14179 return 0;
14180}
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014183 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014185/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014186#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014188
Martin v. Löwis11437992002-04-12 09:54:03 +000014189int
14190main ()
14191{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014192#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 not big endian
14194 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
14196 ;
14197 return 0;
14198}
14199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014201 ac_cv_c_bigendian=yes
14202else
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014206fi
14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208 fi
14209 if test $ac_cv_c_bigendian = unknown; then
14210 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014212/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014213#include <limits.h>
14214
Martin v. Löwis11437992002-04-12 09:54:03 +000014215int
14216main ()
14217{
Matthias Kloseb9621712010-04-24 17:59:49 +000014218#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14219 bogus endian macros
14220 #endif
14221
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 ;
14223 return 0;
14224}
14225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014226if ac_fn_c_try_compile "$LINENO"; then :
14227 # It does; now see whether it defined to _BIG_ENDIAN or not.
14228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14229/* end confdefs.h. */
14230#include <limits.h>
14231
14232int
14233main ()
14234{
14235#ifndef _BIG_ENDIAN
14236 not big endian
14237 #endif
14238
14239 ;
14240 return 0;
14241}
14242_ACEOF
14243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014244 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14249fi
14250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14251 fi
14252 if test $ac_cv_c_bigendian = unknown; then
14253 # Compile a test program.
14254 if test "$cross_compiling" = yes; then :
14255 # Try to guess by grepping values from an object file.
14256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14257/* end confdefs.h. */
14258short int ascii_mm[] =
14259 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14260 short int ascii_ii[] =
14261 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14262 int use_ascii (int i) {
14263 return ascii_mm[i] + ascii_ii[i];
14264 }
14265 short int ebcdic_ii[] =
14266 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14267 short int ebcdic_mm[] =
14268 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14269 int use_ebcdic (int i) {
14270 return ebcdic_mm[i] + ebcdic_ii[i];
14271 }
14272 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274int
14275main ()
14276{
14277return use_ascii (foo) == use_ebcdic (foo);
14278 ;
14279 return 0;
14280}
14281_ACEOF
14282if ac_fn_c_try_compile "$LINENO"; then :
14283 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14284 ac_cv_c_bigendian=yes
14285 fi
14286 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14287 if test "$ac_cv_c_bigendian" = unknown; then
14288 ac_cv_c_bigendian=no
14289 else
14290 # finding both strings is unlikely to happen, but who knows?
14291 ac_cv_c_bigendian=unknown
14292 fi
14293 fi
14294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014296else
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014298/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014300int
14301main ()
14302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 /* Are we little or big endian? From Harbison&Steele. */
14305 union
14306 {
14307 long int l;
14308 char c[sizeof (long int)];
14309 } u;
14310 u.l = 1;
14311 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312
14313 ;
14314 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014315}
Martin v. Löwis11437992002-04-12 09:54:03 +000014316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014317if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014318 ac_cv_c_bigendian=no
14319else
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14323 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014325
Matthias Kloseb9621712010-04-24 17:59:49 +000014326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14329$as_echo "$ac_cv_c_bigendian" >&6; }
14330 case $ac_cv_c_bigendian in #(
14331 yes)
14332 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14333;; #(
14334 no)
14335 ;; #(
14336 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014339
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 ;; #(
14341 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014342 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014343 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014345
Michael W. Hudson54241132001-12-07 15:38:26 +000014346
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014347# ABI version string for Python extension modules. This appears between the
14348# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14349# from the following attributes which affect the ABI of this Python build (in
14350# this order):
14351#
14352# * The Python implementation (always 'cpython-' for us)
14353# * The major and minor version numbers
14354# * --with-pydebug (adds a 'd')
14355# * --with-pymalloc (adds a 'm')
14356# * --with-wide-unicode (adds a 'u')
14357#
14358# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014359# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14360# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014361
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14363$as_echo_n "checking ABIFLAGS... " >&6; }
14364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14365$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14367$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014368SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14370$as_echo "$SOABI" >&6; }
14371
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014372
14373case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014374 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014375 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14376 *)
14377 EXT_SUFFIX=${SHLIB_SUFFIX};;
14378esac
14379
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14381$as_echo_n "checking LDVERSION... " >&6; }
14382LDVERSION='$(VERSION)$(ABIFLAGS)'
14383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14384$as_echo "$LDVERSION" >&6; }
14385
doko@python.org87421192013-01-26 11:39:31 +010014386
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014387LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014388
14389
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014390# Check whether right shifting a negative integer extends the sign bit
14391# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14393$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014394if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014396else
Martin v. Löwis11437992002-04-12 09:54:03 +000014397
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014399 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014402/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014403
14404int main()
14405{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014406 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014407}
14408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014410if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014411 ac_cv_rshift_extends_sign=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014417fi
14418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419fi
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14422$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014423if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014424then
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014427
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014428fi
14429
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014430# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14432$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014433if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014435else
Martin v. Löwis11437992002-04-12 09:54:03 +000014436
Matthias Kloseb9621712010-04-24 17:59:49 +000014437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014438/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014439#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014440int
14441main ()
14442{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014443
14444 FILE *f = fopen("/dev/null", "r");
14445 flockfile(f);
14446 getc_unlocked(f);
14447 funlockfile(f);
14448
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 ;
14450 return 0;
14451}
14452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014454 ac_cv_have_getc_unlocked=yes
14455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 ac_cv_have_getc_unlocked=no
14457fi
14458rm -f core conftest.err conftest.$ac_objext \
14459 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14463$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014464if test "$ac_cv_have_getc_unlocked" = yes
14465then
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014468
14469fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014470
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014471# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014472# save the value of LIBS so we don't actually link Python with readline
14473LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014474
Gregory P. Smith18820942008-09-07 06:24:49 +000014475# On some systems we need to link readline to a termcap compatible
14476# library. NOTE: Keep the precedence of listed libraries synchronised
14477# with setup.py.
14478py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14480$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014481for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014482 if test -z "$py_libtermcap"; then
14483 READLINE_LIBS="-lreadline"
14484 else
14485 READLINE_LIBS="-lreadline -l$py_libtermcap"
14486 fi
14487 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014489/* end confdefs.h. */
14490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014491/* Override any GCC internal prototype to avoid an error.
14492 Use char because int might match the return type of a GCC
14493 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014494#ifdef __cplusplus
14495extern "C"
14496#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014497char readline ();
14498int
14499main ()
14500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014502 ;
14503 return 0;
14504}
14505_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014506if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014507 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014509rm -f core conftest.err conftest.$ac_objext \
14510 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014511 if test $py_cv_lib_readline = yes; then
14512 break
14513 fi
14514done
14515# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14516#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014517if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14519$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14522$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014525
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014526fi
14527
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014528# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14530$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014531if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014532 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014533else
14534 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014535LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014537/* end confdefs.h. */
14538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014539/* Override any GCC internal prototype to avoid an error.
14540 Use char because int might match the return type of a GCC
14541 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014542#ifdef __cplusplus
14543extern "C"
14544#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014545char rl_callback_handler_install ();
14546int
14547main ()
14548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014550 ;
14551 return 0;
14552}
14553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014555 ac_cv_lib_readline_rl_callback_handler_install=yes
14556else
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014559rm -f core conftest.err conftest.$ac_objext \
14560 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014561LIBS=$ac_check_lib_save_LIBS
14562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14564$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014565if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014566
Matthias Kloseb9621712010-04-24 17:59:49 +000014567$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014568
14569fi
14570
14571
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014572# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014574/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014575#include <readline/readline.h>
14576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014577if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014578 have_readline=yes
14579else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014580 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014581
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014582fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014583rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014584if test $have_readline = yes
14585then
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014588#include <readline/readline.h>
14589
14590_ACEOF
14591if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014595
14596fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014597rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014600/* end confdefs.h. */
14601#include <readline/readline.h>
14602
14603_ACEOF
14604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014608
14609fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014610rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014611
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014612fi
14613
Martin v. Löwis0daad592001-09-30 21:09:59 +000014614# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14616$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014617if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014618 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014621LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014625/* Override any GCC internal prototype to avoid an error.
14626 Use char because int might match the return type of a GCC
14627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014628#ifdef __cplusplus
14629extern "C"
14630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014631char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014632int
14633main ()
14634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ;
14637 return 0;
14638}
14639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014640if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014641 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014645rm -f core conftest.err conftest.$ac_objext \
14646 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014647LIBS=$ac_check_lib_save_LIBS
14648fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14650$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014651if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014654
Martin v. Löwis0daad592001-09-30 21:09:59 +000014655fi
14656
Michael W. Hudson54241132001-12-07 15:38:26 +000014657
Thomas Wouters89d996e2007-09-08 17:39:28 +000014658# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14660$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014661if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014662 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014663else
14664 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014665LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014667/* end confdefs.h. */
14668
14669/* Override any GCC internal prototype to avoid an error.
14670 Use char because int might match the return type of a GCC
14671 builtin and then its argument prototype would still apply. */
14672#ifdef __cplusplus
14673extern "C"
14674#endif
14675char rl_completion_display_matches_hook ();
14676int
14677main ()
14678{
14679return rl_completion_display_matches_hook ();
14680 ;
14681 return 0;
14682}
14683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014684if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014685 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14686else
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014688fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014689rm -f core conftest.err conftest.$ac_objext \
14690 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014691LIBS=$ac_check_lib_save_LIBS
14692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14694$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014695if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014698
14699fi
14700
14701
Martin v. Löwis0daad592001-09-30 21:09:59 +000014702# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14704$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014705if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014707else
Martin v. Löwis11437992002-04-12 09:54:03 +000014708 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014709LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014713/* Override any GCC internal prototype to avoid an error.
14714 Use char because int might match the return type of a GCC
14715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014716#ifdef __cplusplus
14717extern "C"
14718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014719char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014720int
14721main ()
14722{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 ;
14725 return 0;
14726}
14727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014728if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014730else
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014733rm -f core conftest.err conftest.$ac_objext \
14734 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014735LIBS=$ac_check_lib_save_LIBS
14736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14738$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014739if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014742
Guido van Rossum353ae582001-07-10 16:45:32 +000014743fi
14744
Jack Jansendd19cf82001-12-06 22:36:17 +000014745
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014746# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748/* end confdefs.h. */
14749#include <readline/readline.h>
14750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014751if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014752 have_readline=yes
14753else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014754 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014755
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014756fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014757rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014758if test $have_readline = yes
14759then
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014761/* end confdefs.h. */
14762#include <readline/readline.h>
14763
14764_ACEOF
14765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014769
14770fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014771rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014772
14773fi
14774
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14776$as_echo_n "checking for append_history in -lreadline... " >&6; }
14777if ${ac_cv_lib_readline_append_history+:} false; then :
14778 $as_echo_n "(cached) " >&6
14779else
14780 ac_check_lib_save_LIBS=$LIBS
14781LIBS="-lreadline $READLINE_LIBS $LIBS"
14782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14783/* end confdefs.h. */
14784
14785/* Override any GCC internal prototype to avoid an error.
14786 Use char because int might match the return type of a GCC
14787 builtin and then its argument prototype would still apply. */
14788#ifdef __cplusplus
14789extern "C"
14790#endif
14791char append_history ();
14792int
14793main ()
14794{
14795return append_history ();
14796 ;
14797 return 0;
14798}
14799_ACEOF
14800if ac_fn_c_try_link "$LINENO"; then :
14801 ac_cv_lib_readline_append_history=yes
14802else
14803 ac_cv_lib_readline_append_history=no
14804fi
14805rm -f core conftest.err conftest.$ac_objext \
14806 conftest$ac_exeext conftest.$ac_ext
14807LIBS=$ac_check_lib_save_LIBS
14808fi
14809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
14810$as_echo "$ac_cv_lib_readline_append_history" >&6; }
14811if test "x$ac_cv_lib_readline_append_history" = xyes; then :
14812
14813$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
14814
14815fi
14816
14817
Martin v. Löwis82bca632006-02-10 20:49:30 +000014818# End of readline checks: restore LIBS
14819LIBS=$LIBS_no_readline
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14822$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014823if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014825else
Martin v. Löwis11437992002-04-12 09:54:03 +000014826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014828 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014831/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014832
14833int main()
14834{
14835 int val1 = nice(1);
14836 if (val1 != -1 && val1 == nice(2))
14837 exit(0);
14838 exit(1);
14839}
14840
Martin v. Löwis11437992002-04-12 09:54:03 +000014841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014842if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014843 ac_cv_broken_nice=yes
14844else
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014849fi
14850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851fi
14852
Matthias Kloseb9621712010-04-24 17:59:49 +000014853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14854$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014855if test "$ac_cv_broken_nice" = yes
14856then
Martin v. Löwis11437992002-04-12 09:54:03 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014859
14860fi
14861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14863$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014864if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014866else
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014868 ac_cv_broken_poll=no
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014871/* end confdefs.h. */
14872
14873#include <poll.h>
14874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014875int main()
14876{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014877 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014878 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014879
14880 close (42);
14881
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014882 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014883 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014884 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014885 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014886 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014887 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014888 return 1;
14889}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014890
14891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014892if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014893 ac_cv_broken_poll=yes
14894else
Matthias Kloseb9621712010-04-24 17:59:49 +000014895 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014897rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14898 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014901fi
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14904$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014905if test "$ac_cv_broken_poll" = yes
14906then
14907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014909
14910fi
14911
Brett Cannon43802422005-02-10 20:48:03 +000014912# 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 +000014913# (which is not required by ISO C or UNIX spec) and/or if we support
14914# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014915ac_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 +000014916#include <$ac_cv_struct_tm>
14917
Matthias Kloseb9621712010-04-24 17:59:49 +000014918"
Victor Stinnere0be4232011-10-25 13:06:09 +020014919if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014920
14921cat >>confdefs.h <<_ACEOF
14922#define HAVE_STRUCT_TM_TM_ZONE 1
14923_ACEOF
14924
14925
14926fi
14927
14928if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014931
14932else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14934"
Victor Stinnere0be4232011-10-25 13:06:09 +020014935if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014939fi
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014942#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943_ACEOF
14944
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14946$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014947if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949else
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014951/* end confdefs.h. */
14952#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953#if !HAVE_DECL_TZNAME
14954extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014955#endif
14956
14957int
14958main ()
14959{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014960return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014961 ;
14962 return 0;
14963}
14964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014965if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014966 ac_cv_var_tzname=yes
14967else
Matthias Kloseb9621712010-04-24 17:59:49 +000014968 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014970rm -f core conftest.err conftest.$ac_objext \
14971 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14974$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014975 if test $ac_cv_var_tzname = yes; then
14976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014978
14979 fi
14980fi
14981
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014982
Martin v. Löwis1d459062005-03-14 21:23:33 +000014983# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14985$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014986if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014988else
14989
Matthias Kloseb9621712010-04-24 17:59:49 +000014990if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014991 ac_cv_working_tzset=no
14992else
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014994/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014995
14996#include <stdlib.h>
14997#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014998#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014999
15000#if HAVE_TZNAME
15001extern char *tzname[];
15002#endif
15003
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015004int main()
15005{
Brett Cannon18367812003-09-19 00:59:16 +000015006 /* Note that we need to ensure that not only does tzset(3)
15007 do 'something' with localtime, but it works as documented
15008 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015009 This includes making sure that tzname is set properly if
15010 tm->tm_zone does not exist since it is the alternative way
15011 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015012
15013 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015014 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015015 */
15016
Martin v. Löwis1d459062005-03-14 21:23:33 +000015017 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015018 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15019
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015020 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015021 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015022 if (localtime(&groundhogday)->tm_hour != 0)
15023 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015024#if HAVE_TZNAME
15025 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15026 if (strcmp(tzname[0], "UTC") ||
15027 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15028 exit(1);
15029#endif
Brett Cannon18367812003-09-19 00:59:16 +000015030
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015031 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015032 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015033 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015034 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015035#if HAVE_TZNAME
15036 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15037 exit(1);
15038#endif
Brett Cannon18367812003-09-19 00:59:16 +000015039
15040 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15041 tzset();
15042 if (localtime(&groundhogday)->tm_hour != 11)
15043 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015044#if HAVE_TZNAME
15045 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15046 exit(1);
15047#endif
15048
15049#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015050 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15051 exit(1);
15052 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15053 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015054#endif
Brett Cannon18367812003-09-19 00:59:16 +000015055
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015056 exit(0);
15057}
15058
15059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015060if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015061 ac_cv_working_tzset=yes
15062else
Matthias Kloseb9621712010-04-24 17:59:49 +000015063 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015067fi
15068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069fi
15070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15072$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015073if test "$ac_cv_working_tzset" = yes
15074then
15075
Matthias Kloseb9621712010-04-24 17:59:49 +000015076$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015077
15078fi
15079
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015080# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15082$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015083if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015088#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015089int
15090main ()
15091{
15092
15093struct stat st;
15094st.st_mtim.tv_nsec = 1;
15095
15096 ;
15097 return 0;
15098}
15099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015101 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015102else
Matthias Kloseb9621712010-04-24 17:59:49 +000015103 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015104fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15106fi
15107
Matthias Kloseb9621712010-04-24 17:59:49 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15109$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015110if test "$ac_cv_stat_tv_nsec" = yes
15111then
15112
Matthias Kloseb9621712010-04-24 17:59:49 +000015113$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015114
15115fi
15116
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015117# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15119$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015120if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015122else
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015124/* end confdefs.h. */
15125#include <sys/stat.h>
15126int
15127main ()
15128{
15129
15130struct stat st;
15131st.st_mtimespec.tv_nsec = 1;
15132
15133 ;
15134 return 0;
15135}
15136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015138 ac_cv_stat_tv_nsec2=yes
15139else
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143fi
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15146$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015147if test "$ac_cv_stat_tv_nsec2" = yes
15148then
15149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015151
15152fi
15153
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015154# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015155ac_save_cppflags="$CPPFLAGS"
15156CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015157
15158for ac_header in curses.h ncurses.h
15159do :
15160 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15161ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15162if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15163 cat >>confdefs.h <<_ACEOF
15164#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15165_ACEOF
15166
15167fi
15168
15169done
15170
15171
15172# On Solaris, term.h requires curses.h
15173for ac_header in term.h
15174do :
15175 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15176#ifdef HAVE_CURSES_H
15177#include <curses.h>
15178#endif
15179
15180"
15181if test "x$ac_cv_header_term_h" = xyes; then :
15182 cat >>confdefs.h <<_ACEOF
15183#define HAVE_TERM_H 1
15184_ACEOF
15185
15186fi
15187
15188done
15189
15190
Jack Jansen666b1e72001-10-31 12:11:48 +000015191# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15193$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015194if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015196else
Matthias Kloseb9621712010-04-24 17:59:49 +000015197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015198/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015199#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015200int
15201main ()
15202{
Jack Jansen666b1e72001-10-31 12:11:48 +000015203
15204 int rtn;
15205 rtn = mvwdelch(0,0,0);
15206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015211if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015212 ac_cv_mvwdelch_is_expression=yes
15213else
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15217fi
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15220$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015221
15222if test "$ac_cv_mvwdelch_is_expression" = yes
15223then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015226
15227fi
15228
Matthias Kloseb9621712010-04-24 17:59:49 +000015229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15230$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015231if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015233else
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015235/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015236#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015237int
15238main ()
15239{
Jack Jansen666b1e72001-10-31 12:11:48 +000015240
15241 WINDOW *w;
15242 w->_flags = 0;
15243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244 ;
15245 return 0;
15246}
15247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015248if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015249 ac_cv_window_has_flags=yes
15250else
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15254fi
15255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15257$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015258
Jack Jansen666b1e72001-10-31 12:11:48 +000015259
15260if test "$ac_cv_window_has_flags" = yes
15261then
Martin v. Löwis11437992002-04-12 09:54:03 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015264
15265fi
15266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15268$as_echo_n "checking for is_term_resized... " >&6; }
15269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015270/* end confdefs.h. */
15271#include <curses.h>
15272int
15273main ()
15274{
15275void *x=is_term_resized
15276 ;
15277 return 0;
15278}
15279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015283
Matthias Kloseb159a552010-04-25 21:00:44 +000015284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015285$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015286else
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15288$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015289
15290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15292
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15294$as_echo_n "checking for resize_term... " >&6; }
15295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015296/* end confdefs.h. */
15297#include <curses.h>
15298int
15299main ()
15300{
15301void *x=resize_term
15302 ;
15303 return 0;
15304}
15305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015306if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015309
Matthias Kloseb159a552010-04-25 21:00:44 +000015310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015311$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15314$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015315
15316fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15320$as_echo_n "checking for resizeterm... " >&6; }
15321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015322/* end confdefs.h. */
15323#include <curses.h>
15324int
15325main ()
15326{
15327void *x=resizeterm
15328 ;
15329 return 0;
15330}
15331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015333
Matthias Kloseb9621712010-04-24 17:59:49 +000015334$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015335
Matthias Kloseb159a552010-04-25 21:00:44 +000015336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015337$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015338else
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15340$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015341
15342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015344# last curses configure check
15345CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15348$as_echo "$as_me: checking for device files" >&6;}
15349
15350if test "x$cross_compiling" = xyes; then
15351 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15353$as_echo_n "checking for /dev/ptmx... " >&6; }
15354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15355$as_echo "not set" >&6; }
15356 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15357 fi
15358 if test "${ac_cv_file__dev_ptc+set}" != set; then
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15360$as_echo_n "checking for /dev/ptc... " >&6; }
15361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15362$as_echo "not set" >&6; }
15363 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15364 fi
15365fi
15366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15368$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015369if ${ac_cv_file__dev_ptmx+:} false; then :
15370 $as_echo_n "(cached) " >&6
15371else
15372 test "$cross_compiling" = yes &&
15373 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15374if test -r "/dev/ptmx"; then
15375 ac_cv_file__dev_ptmx=yes
15376else
15377 ac_cv_file__dev_ptmx=no
15378fi
15379fi
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15381$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15382if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015383
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015384fi
15385
15386if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015389
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015390fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15392$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015393if ${ac_cv_file__dev_ptc+:} false; then :
15394 $as_echo_n "(cached) " >&6
15395else
15396 test "$cross_compiling" = yes &&
15397 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15398if test -r "/dev/ptc"; then
15399 ac_cv_file__dev_ptc=yes
15400else
15401 ac_cv_file__dev_ptc=no
15402fi
15403fi
15404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15405$as_echo "$ac_cv_file__dev_ptc" >&6; }
15406if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015407
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015408fi
15409
15410if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015411
Matthias Kloseb9621712010-04-24 17:59:49 +000015412$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015413
Neal Norwitz865400f2003-03-21 01:42:58 +000015414fi
15415
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015416if test "$have_long_long" = yes
15417then
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15419$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015420 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015421 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015422else
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015424 ac_cv_have_long_long_format="cross -- assuming no"
15425 if test x$GCC = xyes; then
15426 save_CFLAGS=$CFLAGS
15427 CFLAGS="$CFLAGS -Werror -Wformat"
15428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15429/* end confdefs.h. */
15430
15431 #include <stdio.h>
15432 #include <stddef.h>
15433
15434int
15435main ()
15436{
15437
15438 char *buffer;
15439 sprintf(buffer, "%lld", (long long)123);
15440 sprintf(buffer, "%lld", (long long)-123);
15441 sprintf(buffer, "%llu", (unsigned long long)123);
15442
15443 ;
15444 return 0;
15445}
15446_ACEOF
15447if ac_fn_c_try_compile "$LINENO"; then :
15448 ac_cv_have_long_long_format=yes
15449
15450fi
15451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15452 CFLAGS=$save_CFLAGS
15453 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015456/* end confdefs.h. */
15457
15458 #include <stdio.h>
15459 #include <stddef.h>
15460 #include <string.h>
15461
15462 #ifdef HAVE_SYS_TYPES_H
15463 #include <sys/types.h>
15464 #endif
15465
15466 int main()
15467 {
15468 char buffer[256];
15469
15470 if (sprintf(buffer, "%lld", (long long)123) < 0)
15471 return 1;
15472 if (strcmp(buffer, "123"))
15473 return 1;
15474
15475 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15476 return 1;
15477 if (strcmp(buffer, "-123"))
15478 return 1;
15479
15480 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15481 return 1;
15482 if (strcmp(buffer, "123"))
15483 return 1;
15484
15485 return 0;
15486 }
15487
15488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015490 ac_cv_have_long_long_format=yes
15491else
Matthias Kloseb9621712010-04-24 17:59:49 +000015492 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015496fi
15497
15498
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015499fi
15500
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15502$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015503fi
15504
Mark Dickinson89d7d412009-12-31 20:50:59 +000015505if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015506then
15507
Matthias Kloseb9621712010-04-24 17:59:49 +000015508$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015509
15510fi
15511
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015512if test $ac_sys_system = Darwin
15513then
15514 LIBS="$LIBS -framework CoreFoundation"
15515fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15518$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015519if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015521else
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015523 ac_cv_have_size_t_format="cross -- assuming yes"
15524
Thomas Wouters477c8d52006-05-27 19:21:47 +000015525else
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015527/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015528
Thomas Wouters477c8d52006-05-27 19:21:47 +000015529#include <stdio.h>
15530#include <stddef.h>
15531#include <string.h>
15532
Christian Heimes2c181612007-12-17 20:04:13 +000015533#ifdef HAVE_SYS_TYPES_H
15534#include <sys/types.h>
15535#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015536
15537#ifdef HAVE_SSIZE_T
15538typedef ssize_t Py_ssize_t;
15539#elif SIZEOF_VOID_P == SIZEOF_LONG
15540typedef long Py_ssize_t;
15541#else
15542typedef int Py_ssize_t;
15543#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015544
Christian Heimes2c181612007-12-17 20:04:13 +000015545int main()
15546{
15547 char buffer[256];
15548
Thomas Wouters477c8d52006-05-27 19:21:47 +000015549 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15550 return 1;
15551
Thomas Wouters89f507f2006-12-13 04:49:30 +000015552 if (strcmp(buffer, "123"))
15553 return 1;
15554
15555 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15556 return 1;
15557
15558 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015559 return 1;
15560
15561 return 0;
15562}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015563
Thomas Wouters477c8d52006-05-27 19:21:47 +000015564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015566 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015570rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15571 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015572fi
15573
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15576$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015577if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015580
15581fi
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015584#ifdef HAVE_SYS_TYPES_H
15585#include <sys/types.h>
15586#endif
15587#ifdef HAVE_SYS_SOCKET_H
15588#include <sys/socket.h>
15589#endif
15590
Matthias Kloseb9621712010-04-24 17:59:49 +000015591"
Victor Stinnere0be4232011-10-25 13:06:09 +020015592if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015597
15598fi
15599
Michael W. Hudson54241132001-12-07 15:38:26 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15602$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015603if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015605else
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015607 ac_cv_broken_mbstowcs=no
15608else
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015610/* end confdefs.h. */
15611
Stefan Krah19c21392012-11-22 23:47:32 +010015612#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015613#include<stdlib.h>
15614int main() {
15615 size_t len = -1;
15616 const char *str = "text";
15617 len = mbstowcs(NULL, str, 0);
15618 return (len != 4);
15619}
15620
15621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015622if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015623 ac_cv_broken_mbstowcs=no
15624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015629fi
15630
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015631fi
15632
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15634$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015635if test "$ac_cv_broken_mbstowcs" = yes
15636then
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015639
15640fi
15641
Antoine Pitroub52ec782009-01-25 16:34:23 +000015642# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15644$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015645
15646# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015647if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015648 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015649if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015650then
15651
Matthias Kloseb9621712010-04-24 17:59:49 +000015652$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15655$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015656fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015657if test "$withval" = no
15658then
15659
15660$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15663$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015664fi
15665
Antoine Pitrou042b1282010-08-13 21:15:58 +000015666else
15667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15668$as_echo "no value specified" >&6; }
15669fi
15670
Antoine Pitroub52ec782009-01-25 16:34:23 +000015671
Matthias Kloseb17289e2012-03-15 19:51:34 +010015672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15673$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15674if ${ac_cv_computed_gotos+:} false; then :
15675 $as_echo_n "(cached) " >&6
15676else
15677 if test "$cross_compiling" = yes; then :
15678 if test "${with_computed_gotos+set}" = set; then
15679 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15680 else
15681 ac_cv_computed_gotos=no
15682 fi
15683else
15684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15685/* end confdefs.h. */
15686
15687int main(int argc, char **argv)
15688{
15689 static void *targets[1] = { &&LABEL1 };
15690 goto LABEL2;
15691LABEL1:
15692 return 0;
15693LABEL2:
15694 goto *targets[0];
15695 return 1;
15696}
15697
15698_ACEOF
15699if ac_fn_c_try_run "$LINENO"; then :
15700 ac_cv_computed_gotos=yes
15701else
15702 ac_cv_computed_gotos=no
15703fi
15704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15705 conftest.$ac_objext conftest.beam conftest.$ac_ext
15706fi
15707
15708fi
15709
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15711$as_echo "$ac_cv_computed_gotos" >&6; }
15712case "$ac_cv_computed_gotos" in yes*)
15713
15714$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15715
15716esac
15717
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015718case $ac_sys_system in
15719AIX*)
15720
15721$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15722 ;;
15723esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015724
Michael W. Hudson54241132001-12-07 15:38:26 +000015725
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015726
15727
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015728for h in `(cd $srcdir;echo Python/thread_*.h)`
15729do
15730 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15731done
15732
Michael W. Hudson54241132001-12-07 15:38:26 +000015733
Ned Deily0db50cf2014-07-25 12:41:31 -070015734SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15736$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015737for dir in $SRCDIRS; do
15738 if test ! -d $dir; then
15739 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015740 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015741done
Matthias Kloseb9621712010-04-24 17:59:49 +000015742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15743$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015744
Stefan Krah1919b7e2012-03-21 18:25:23 +010015745# Availability of -O2:
15746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15747$as_echo_n "checking for -O2... " >&6; }
15748saved_cflags="$CFLAGS"
15749CFLAGS="-O2"
15750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15751/* end confdefs.h. */
15752
15753int
15754main ()
15755{
15756
15757
15758 ;
15759 return 0;
15760}
15761_ACEOF
15762if ac_fn_c_try_compile "$LINENO"; then :
15763 have_O2=yes
15764else
15765 have_O2=no
15766fi
15767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15769$as_echo "$have_O2" >&6; }
15770CFLAGS="$saved_cflags"
15771
15772# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15773# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15775$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15776saved_cflags="$CFLAGS"
15777CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15778if test "$have_O2" = no; then
15779 CFLAGS=""
15780fi
15781if test "$cross_compiling" = yes; then :
15782 have_glibc_memmove_bug=undefined
15783else
15784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15785/* end confdefs.h. */
15786
15787#include <stdio.h>
15788#include <stdlib.h>
15789#include <string.h>
15790void foo(void *p, void *q) { memmove(p, q, 19); }
15791int main() {
15792 char a[32] = "123456789000000000";
15793 foo(&a[9], a);
15794 if (strcmp(a, "123456789123456789000000000") != 0)
15795 return 1;
15796 foo(a, &a[9]);
15797 if (strcmp(a, "123456789000000000") != 0)
15798 return 1;
15799 return 0;
15800}
15801
15802_ACEOF
15803if ac_fn_c_try_run "$LINENO"; then :
15804 have_glibc_memmove_bug=no
15805else
15806 have_glibc_memmove_bug=yes
15807fi
15808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15809 conftest.$ac_objext conftest.beam conftest.$ac_ext
15810fi
15811
15812CFLAGS="$saved_cflags"
15813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15814$as_echo "$have_glibc_memmove_bug" >&6; }
15815if test "$have_glibc_memmove_bug" = yes; then
15816
15817$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15818
15819fi
15820
15821if test "$have_gcc_asm_for_x87" = yes; then
15822 # Some versions of gcc miscompile inline asm:
15823 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15824 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15825 case $CC in
15826 *gcc*)
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15828$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15829 saved_cflags="$CFLAGS"
15830 CFLAGS="-O2"
15831 if test "$cross_compiling" = yes; then :
15832 have_ipa_pure_const_bug=undefined
15833else
15834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835/* end confdefs.h. */
15836
15837 __attribute__((noinline)) int
15838 foo(int *p) {
15839 int r;
15840 asm ( "movl \$6, (%1)\n\t"
15841 "xorl %0, %0\n\t"
15842 : "=r" (r) : "r" (p) : "memory"
15843 );
15844 return r;
15845 }
15846 int main() {
15847 int p = 8;
15848 if ((foo(&p) ? : p) != 6)
15849 return 1;
15850 return 0;
15851 }
15852
15853_ACEOF
15854if ac_fn_c_try_run "$LINENO"; then :
15855 have_ipa_pure_const_bug=no
15856else
15857 have_ipa_pure_const_bug=yes
15858fi
15859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15860 conftest.$ac_objext conftest.beam conftest.$ac_ext
15861fi
15862
15863 CFLAGS="$saved_cflags"
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15865$as_echo "$have_ipa_pure_const_bug" >&6; }
15866 if test "$have_ipa_pure_const_bug" = yes; then
15867
15868$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15869
15870 fi
15871 ;;
15872 esac
15873fi
15874
Victor Stinner4f5366e2015-01-09 02:13:19 +010015875# Check for stdatomic.h
15876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
15877$as_echo_n "checking for stdatomic.h... " >&6; }
15878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879/* end confdefs.h. */
15880
15881
15882 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010015883 atomic_int value = ATOMIC_VAR_INIT(1);
15884 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010015885 int main() {
15886 int loaded_value = atomic_load(&value);
15887 return 0;
15888 }
15889
15890
15891_ACEOF
15892if ac_fn_c_try_link "$LINENO"; then :
15893 have_stdatomic_h=yes
15894else
15895 have_stdatomic_h=no
15896fi
15897rm -f core conftest.err conftest.$ac_objext \
15898 conftest$ac_exeext conftest.$ac_ext
15899
15900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
15901$as_echo "$have_stdatomic_h" >&6; }
15902
15903if test "$have_stdatomic_h" = yes; then
15904
15905$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
15906
15907fi
15908
15909# Check for GCC >= 4.7 __atomic builtins
15910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
15911$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
15912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15913/* end confdefs.h. */
15914
15915
15916 volatile int val = 1;
15917 int main() {
15918 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
15919 return 0;
15920 }
15921
15922
15923_ACEOF
15924if ac_fn_c_try_link "$LINENO"; then :
15925 have_builtin_atomic=yes
15926else
15927 have_builtin_atomic=no
15928fi
15929rm -f core conftest.err conftest.$ac_objext \
15930 conftest$ac_exeext conftest.$ac_ext
15931
15932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
15933$as_echo "$have_builtin_atomic" >&6; }
15934
15935if test "$have_builtin_atomic" = yes; then
15936
15937$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
15938
15939fi
15940
Ned Deily322f5ba2013-11-21 23:01:59 -080015941# ensurepip option
15942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15943$as_echo_n "checking for ensurepip... " >&6; }
15944
15945# Check whether --with-ensurepip was given.
15946if test "${with_ensurepip+set}" = set; then :
15947 withval=$with_ensurepip;
15948else
15949 with_ensurepip=upgrade
15950fi
15951
15952case $with_ensurepip in #(
15953 yes|upgrade) :
15954 ENSUREPIP=upgrade ;; #(
15955 install) :
15956 ENSUREPIP=install ;; #(
15957 no) :
15958 ENSUREPIP=no ;; #(
15959 *) :
15960 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15961esac
15962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15963$as_echo "$ENSUREPIP" >&6; }
15964
15965
Victor Stinner35a97c02015-03-08 02:59:09 +010015966# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
15967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
15968$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
15969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15970/* end confdefs.h. */
15971
15972
15973 #include <dirent.h>
15974
15975 int main() {
15976 struct dirent entry;
15977 return entry.d_type == DT_UNKNOWN;
15978 }
15979
15980
15981_ACEOF
15982if ac_fn_c_try_link "$LINENO"; then :
15983 have_dirent_d_type=yes
15984else
15985 have_dirent_d_type=no
15986fi
15987rm -f core conftest.err conftest.$ac_objext \
15988 conftest$ac_exeext conftest.$ac_ext
15989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
15990$as_echo "$have_dirent_d_type" >&6; }
15991
15992if test "$have_dirent_d_type" = yes; then
15993
15994$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
15995
15996fi
15997
Victor Stinner9eb57c52015-03-19 22:21:49 +010015998# check if the Linux getrandom() syscall is available
15999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16000$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16002/* end confdefs.h. */
16003
16004
16005 #include <sys/syscall.h>
16006
16007 int main() {
16008 const int flags = 0;
16009 char buffer[1];
16010 int n;
16011 /* ignore the result, Python checks for ENOSYS at runtime */
16012 (void)syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
16013 return 0;
16014 }
16015
16016
16017_ACEOF
16018if ac_fn_c_try_link "$LINENO"; then :
16019 have_getrandom_syscall=yes
16020else
16021 have_getrandom_syscall=no
16022fi
16023rm -f core conftest.err conftest.$ac_objext \
16024 conftest$ac_exeext conftest.$ac_ext
16025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16026$as_echo "$have_getrandom_syscall" >&6; }
16027
16028if test "$have_getrandom_syscall" = yes; then
16029
16030$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16031
16032fi
16033
Guido van Rossum627b2d71993-12-24 10:39:16 +000016034# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016035ac_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 +000016036
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016037ac_config_files="$ac_config_files Modules/ld_so_aix"
16038
Martin v. Löwis11437992002-04-12 09:54:03 +000016039cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016040# This file is a shell script that caches the results of configure
16041# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016042# scripts and configure runs, see configure's option --config-cache.
16043# It is not useful on other systems. If it contains results you don't
16044# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016045#
Martin v. Löwis11437992002-04-12 09:54:03 +000016046# config.status only pays attention to the cache file if you give it
16047# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016048#
Skip Montanaro6dead952003-09-25 14:50:04 +000016049# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016050# loading this file, other *unset* `ac_cv_foo' will be assigned the
16051# following values.
16052
16053_ACEOF
16054
Guido van Rossumf78abae1997-01-21 22:02:36 +000016055# The following way of writing the cache mishandles newlines in values,
16056# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016058# Ultrix sh set writes to stderr and can't be redirected directly,
16059# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016060(
16061 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16062 eval ac_val=\$$ac_var
16063 case $ac_val in #(
16064 *${as_nl}*)
16065 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016066 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16067$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 esac
16069 case $ac_var in #(
16070 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16072 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 esac ;;
16074 esac
16075 done
16076
Martin v. Löwis11437992002-04-12 09:54:03 +000016077 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16079 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016080 # `set' does not quote correctly, so add quotes: double-quote
16081 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016082 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016083 "s/'/'\\\\''/g;
16084 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 *)
16087 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016089 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090 esac |
16091 sort
16092) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016095 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016097 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16098 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16100 :end' >>confcache
16101if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16102 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016103 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016104 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16105$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016106 if test ! -f "$cache_file" || test -h "$cache_file"; then
16107 cat confcache >"$cache_file"
16108 else
16109 case $cache_file in #(
16110 */* | ?:*)
16111 mv -f confcache "$cache_file"$$ &&
16112 mv -f "$cache_file"$$ "$cache_file" ;; #(
16113 *)
16114 mv -f confcache "$cache_file" ;;
16115 esac
16116 fi
16117 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016118 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16120$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016121 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016122fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016123rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016124
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016125test "x$prefix" = xNONE && prefix=$ac_default_prefix
16126# Let make expand exec_prefix.
16127test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016128
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016129DEFS=-DHAVE_CONFIG_H
16130
Skip Montanaro6dead952003-09-25 14:50:04 +000016131ac_libobjs=
16132ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016133U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016134for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16135 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016136 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016137 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016138 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16139 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016140 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16141 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016142done
16143LIBOBJS=$ac_libobjs
16144
16145LTLIBOBJS=$ac_ltlibobjs
16146
16147
Martin v. Löwis11437992002-04-12 09:54:03 +000016148
Matthias Kloseb9621712010-04-24 17:59:49 +000016149
Victor Stinnere0be4232011-10-25 13:06:09 +020016150: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016151ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016152ac_clean_files_save=$ac_clean_files
16153ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016154{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16155$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16156as_write_fail=0
16157cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016158#! $SHELL
16159# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016160# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016161# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016162# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016163
Martin v. Löwis11437992002-04-12 09:54:03 +000016164debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016165ac_cs_recheck=false
16166ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016167
Matthias Kloseb9621712010-04-24 17:59:49 +000016168SHELL=\${CONFIG_SHELL-$SHELL}
16169export SHELL
16170_ASEOF
16171cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16172## -------------------- ##
16173## M4sh Initialization. ##
16174## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016176# Be more Bourne compatible
16177DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016178if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016179 emulate sh
16180 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016181 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016182 # is contrary to our usage. Disable this feature.
16183 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016185else
Matthias Kloseb9621712010-04-24 17:59:49 +000016186 case `(set -o) 2>/dev/null` in #(
16187 *posix*) :
16188 set -o posix ;; #(
16189 *) :
16190 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016192fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016193
16194
Matthias Kloseb9621712010-04-24 17:59:49 +000016195as_nl='
16196'
16197export as_nl
16198# Printing a long string crashes Solaris 7 /usr/bin/printf.
16199as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16200as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16201as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16202# Prefer a ksh shell builtin over an external printf program on Solaris,
16203# but without wasting forks for bash or zsh.
16204if test -z "$BASH_VERSION$ZSH_VERSION" \
16205 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16206 as_echo='print -r --'
16207 as_echo_n='print -rn --'
16208elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16209 as_echo='printf %s\n'
16210 as_echo_n='printf %s'
16211else
16212 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16213 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16214 as_echo_n='/usr/ucb/echo -n'
16215 else
16216 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16217 as_echo_n_body='eval
16218 arg=$1;
16219 case $arg in #(
16220 *"$as_nl"*)
16221 expr "X$arg" : "X\\(.*\\)$as_nl";
16222 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16223 esac;
16224 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16225 '
16226 export as_echo_n_body
16227 as_echo_n='sh -c $as_echo_n_body as_echo'
16228 fi
16229 export as_echo_body
16230 as_echo='sh -c $as_echo_body as_echo'
16231fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016232
16233# The user is always right.
16234if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016235 PATH_SEPARATOR=:
16236 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16237 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16238 PATH_SEPARATOR=';'
16239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016240fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016242
16243# IFS
16244# We need space, tab and new line, in precisely that order. Quoting is
16245# there to prevent editors from complaining about space-tab.
16246# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16247# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248IFS=" "" $as_nl"
16249
16250# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016251as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016252case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253 *[\\/]* ) as_myself=$0 ;;
16254 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016255for as_dir in $PATH
16256do
16257 IFS=$as_save_IFS
16258 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016259 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16260 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016261IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 ;;
16264esac
16265# We did not find ourselves, most probably we were run as `sh COMMAND'
16266# in which case we are not to be found in the path.
16267if test "x$as_myself" = x; then
16268 as_myself=$0
16269fi
16270if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016271 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16272 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273fi
16274
Matthias Kloseb9621712010-04-24 17:59:49 +000016275# Unset variables that we do not need and which cause bugs (e.g. in
16276# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16277# suppresses any "Segmentation fault" message there. '((' could
16278# trigger a bug in pdksh 5.2.14.
16279for as_var in BASH_ENV ENV MAIL MAILPATH
16280do eval test x\${$as_var+set} = xset \
16281 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016282done
16283PS1='$ '
16284PS2='> '
16285PS4='+ '
16286
16287# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016288LC_ALL=C
16289export LC_ALL
16290LANGUAGE=C
16291export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292
Matthias Kloseb9621712010-04-24 17:59:49 +000016293# CDPATH.
16294(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16295
16296
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016297# as_fn_error STATUS ERROR [LINENO LOG_FD]
16298# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016299# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16300# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016301# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016302as_fn_error ()
16303{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016304 as_status=$1; test $as_status -eq 0 && as_status=1
16305 if test "$4"; then
16306 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16307 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016309 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016310 as_fn_exit $as_status
16311} # as_fn_error
16312
16313
16314# as_fn_set_status STATUS
16315# -----------------------
16316# Set $? to STATUS, without forking.
16317as_fn_set_status ()
16318{
16319 return $1
16320} # as_fn_set_status
16321
16322# as_fn_exit STATUS
16323# -----------------
16324# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16325as_fn_exit ()
16326{
16327 set +e
16328 as_fn_set_status $1
16329 exit $1
16330} # as_fn_exit
16331
16332# as_fn_unset VAR
16333# ---------------
16334# Portably unset VAR.
16335as_fn_unset ()
16336{
16337 { eval $1=; unset $1;}
16338}
16339as_unset=as_fn_unset
16340# as_fn_append VAR VALUE
16341# ----------------------
16342# Append the text in VALUE to the end of the definition contained in VAR. Take
16343# advantage of any shell optimizations that allow amortized linear growth over
16344# repeated appends, instead of the typical quadratic growth present in naive
16345# implementations.
16346if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16347 eval 'as_fn_append ()
16348 {
16349 eval $1+=\$2
16350 }'
16351else
16352 as_fn_append ()
16353 {
16354 eval $1=\$$1\$2
16355 }
16356fi # as_fn_append
16357
16358# as_fn_arith ARG...
16359# ------------------
16360# Perform arithmetic evaluation on the ARGs, and store the result in the
16361# global $as_val. Take advantage of shells that can avoid forks. The arguments
16362# must be portable across $(()) and expr.
16363if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16364 eval 'as_fn_arith ()
16365 {
16366 as_val=$(( $* ))
16367 }'
16368else
16369 as_fn_arith ()
16370 {
16371 as_val=`expr "$@" || test $? -eq 1`
16372 }
16373fi # as_fn_arith
16374
16375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376if expr a : '\(a\)' >/dev/null 2>&1 &&
16377 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16378 as_expr=expr
16379else
16380 as_expr=false
16381fi
16382
16383if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16384 as_basename=basename
16385else
16386 as_basename=false
16387fi
16388
Matthias Kloseb9621712010-04-24 17:59:49 +000016389if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16390 as_dirname=dirname
16391else
16392 as_dirname=false
16393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395as_me=`$as_basename -- "$0" ||
16396$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16397 X"$0" : 'X\(//\)$' \| \
16398 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016399$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016400 sed '/^.*\/\([^/][^/]*\)\/*$/{
16401 s//\1/
16402 q
16403 }
16404 /^X\/\(\/\/\)$/{
16405 s//\1/
16406 q
16407 }
16408 /^X\/\(\/\).*/{
16409 s//\1/
16410 q
16411 }
16412 s/.*/./; q'`
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414# Avoid depending upon Character Ranges.
16415as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16416as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16417as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16418as_cr_digits='0123456789'
16419as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016420
16421ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016422case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016423-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016425 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 xy) ECHO_C='\c';;
16427 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16428 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016429 esac;;
16430*)
16431 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016432esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016433
Martin v. Löwis11437992002-04-12 09:54:03 +000016434rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435if test -d conf$$.dir; then
16436 rm -f conf$$.dir/conf$$.file
16437else
16438 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016441if (echo >conf$$.file) 2>/dev/null; then
16442 if ln -s conf$$.file conf$$ 2>/dev/null; then
16443 as_ln_s='ln -s'
16444 # ... but there are two gotchas:
16445 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16446 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016447 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016449 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 elif ln conf$$.file conf$$ 2>/dev/null; then
16451 as_ln_s=ln
16452 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016453 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016455else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016456 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016458rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16459rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461
16462# as_fn_mkdir_p
16463# -------------
16464# Create "$as_dir" as a directory, including parents if necessary.
16465as_fn_mkdir_p ()
16466{
16467
16468 case $as_dir in #(
16469 -*) as_dir=./$as_dir;;
16470 esac
16471 test -d "$as_dir" || eval $as_mkdir_p || {
16472 as_dirs=
16473 while :; do
16474 case $as_dir in #(
16475 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16476 *) as_qdir=$as_dir;;
16477 esac
16478 as_dirs="'$as_qdir' $as_dirs"
16479 as_dir=`$as_dirname -- "$as_dir" ||
16480$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16481 X"$as_dir" : 'X\(//\)[^/]' \| \
16482 X"$as_dir" : 'X\(//\)$' \| \
16483 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16484$as_echo X"$as_dir" |
16485 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16486 s//\1/
16487 q
16488 }
16489 /^X\(\/\/\)[^/].*/{
16490 s//\1/
16491 q
16492 }
16493 /^X\(\/\/\)$/{
16494 s//\1/
16495 q
16496 }
16497 /^X\(\/\).*/{
16498 s//\1/
16499 q
16500 }
16501 s/.*/./; q'`
16502 test -d "$as_dir" && break
16503 done
16504 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016505 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016506
16507
16508} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016509if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016511else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016512 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016513 as_mkdir_p=false
16514fi
16515
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016516
16517# as_fn_executable_p FILE
16518# -----------------------
16519# Test if FILE is an executable regular file.
16520as_fn_executable_p ()
16521{
16522 test -f "$1" && test -x "$1"
16523} # as_fn_executable_p
16524as_test_x='test -x'
16525as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016526
16527# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016528as_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 +000016529
16530# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016531as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016532
16533
Martin v. Löwis11437992002-04-12 09:54:03 +000016534exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016535## ----------------------------------- ##
16536## Main body of $CONFIG_STATUS script. ##
16537## ----------------------------------- ##
16538_ASEOF
16539test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16542# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016543# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544# values after options handling.
16545ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016546This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016547generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016548
16549 CONFIG_FILES = $CONFIG_FILES
16550 CONFIG_HEADERS = $CONFIG_HEADERS
16551 CONFIG_LINKS = $CONFIG_LINKS
16552 CONFIG_COMMANDS = $CONFIG_COMMANDS
16553 $ $0 $@
16554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555on `(hostname || uname -n) 2>/dev/null | sed 1q`
16556"
16557
Martin v. Löwis11437992002-04-12 09:54:03 +000016558_ACEOF
16559
Matthias Kloseb9621712010-04-24 17:59:49 +000016560case $ac_config_files in *"
16561"*) set x $ac_config_files; shift; ac_config_files=$*;;
16562esac
16563
16564case $ac_config_headers in *"
16565"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16566esac
16567
16568
16569cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016570# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016571config_files="$ac_config_files"
16572config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016574_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016575
Matthias Kloseb9621712010-04-24 17:59:49 +000016576cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016577ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016578\`$as_me' instantiates files and other configuration actions
16579from templates according to the current configuration. Unless the files
16580and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016581
Matthias Kloseb9621712010-04-24 17:59:49 +000016582Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016583
16584 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016586 --config print configuration, then exit
16587 -q, --quiet, --silent
16588 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016589 -d, --debug don't remove temporary files
16590 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 --file=FILE[:TEMPLATE]
16592 instantiate the configuration file FILE
16593 --header=FILE[:TEMPLATE]
16594 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016595
16596Configuration files:
16597$config_files
16598
16599Configuration headers:
16600$config_headers
16601
Matthias Kloseb9621712010-04-24 17:59:49 +000016602Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16606ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016607ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016608python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016609configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016610 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016611
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016612Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016613This config.status script is free software; the Free Software Foundation
16614gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016615
16616ac_pwd='$ac_pwd'
16617srcdir='$srcdir'
16618INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016619MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016620test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016621_ACEOF
16622
Matthias Kloseb9621712010-04-24 17:59:49 +000016623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16624# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016625ac_need_defaults=:
16626while test $# != 0
16627do
16628 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016629 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16631 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016632 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016634 --*=)
16635 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16636 ac_optarg=
16637 ac_shift=:
16638 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016640 ac_option=$1
16641 ac_optarg=$2
16642 ac_shift=shift
16643 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 esac
16645
Skip Montanaro6dead952003-09-25 14:50:04 +000016646 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016648 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16649 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016651 $as_echo "$ac_cs_version"; exit ;;
16652 --config | --confi | --conf | --con | --co | --c )
16653 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 debug=: ;;
16656 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016657 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 case $ac_optarg in
16659 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016660 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016661 esac
16662 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016663 ac_need_defaults=false;;
16664 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016665 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 case $ac_optarg in
16667 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16668 esac
16669 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016671 --he | --h)
16672 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016673 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016674Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016676 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016677 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16678 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16679 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016680
16681 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016682 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016683Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016684
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016687
16688 esac
16689 shift
16690done
16691
Skip Montanaro6dead952003-09-25 14:50:04 +000016692ac_configure_extra_args=
16693
16694if $ac_cs_silent; then
16695 exec 6>/dev/null
16696 ac_configure_extra_args="$ac_configure_extra_args --silent"
16697fi
16698
16699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016701if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016702 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016703 shift
16704 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16705 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016707 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016708fi
16709
Martin v. Löwis11437992002-04-12 09:54:03 +000016710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712exec 5>>config.log
16713{
16714 echo
16715 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16716## Running $as_me. ##
16717_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016718 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016723_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016724
Matthias Kloseb9621712010-04-24 17:59:49 +000016725cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726
16727# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016728for ac_config_target in $ac_config_targets
16729do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730 case $ac_config_target in
16731 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16732 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16733 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016734 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16735 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16737 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016738 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016739 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016740 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741
Victor Stinnere0be4232011-10-25 13:06:09 +020016742 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 esac
16744done
16745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746
Martin v. Löwis11437992002-04-12 09:54:03 +000016747# If the user did not use the arguments to specify the items to instantiate,
16748# then the envvar interface is used. Set only those that are not.
16749# We use the long form for the default assignment because of an extremely
16750# bizarre bug on SunOS 4.1.3.
16751if $ac_need_defaults; then
16752 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16753 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16754fi
16755
Skip Montanaro6dead952003-09-25 14:50:04 +000016756# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016758# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759# Hook for its removal unless debugging.
16760# Note that there is a small window in which the directory will not be cleaned:
16761# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016762$debug ||
16763{
Victor Stinnere0be4232011-10-25 13:06:09 +020016764 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016766 : "${ac_tmp:=$tmp}"
16767 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016768' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016769 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016770}
Martin v. Löwis11437992002-04-12 09:54:03 +000016771# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016772
Martin v. Löwis11437992002-04-12 09:54:03 +000016773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016774 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016775 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016776} ||
16777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778 tmp=./conf$$-$RANDOM
16779 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016780} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016781ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016782
Matthias Kloseb9621712010-04-24 17:59:49 +000016783# Set up the scripts for CONFIG_FILES section.
16784# No need to generate them if there are no CONFIG_FILES.
16785# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016787
Matthias Kloseb9621712010-04-24 17:59:49 +000016788
16789ac_cr=`echo X | tr X '\015'`
16790# On cygwin, bash can eat \r inside `` if the user requested igncr.
16791# But we know of no other shell where ac_cr would be empty at this
16792# point, so we can use a bashism as a fallback.
16793if test "x$ac_cr" = x; then
16794 eval ac_cr=\$\'\\r\'
16795fi
16796ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16797if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016798 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016799else
16800 ac_cs_awk_cr=$ac_cr
16801fi
16802
Victor Stinnere0be4232011-10-25 13:06:09 +020016803echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016804_ACEOF
16805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806
Matthias Kloseb9621712010-04-24 17:59:49 +000016807{
16808 echo "cat >conf$$subs.awk <<_ACEOF" &&
16809 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16810 echo "_ACEOF"
16811} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016812 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16813ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814ac_delim='%!_!# '
16815for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016816 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016817 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016818
Matthias Kloseb9621712010-04-24 17:59:49 +000016819 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16820 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016821 break
16822 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016823 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824 else
16825 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827done
Matthias Kloseb9621712010-04-24 17:59:49 +000016828rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016829
Matthias Kloseb9621712010-04-24 17:59:49 +000016830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016831cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016833sed -n '
16834h
16835s/^/S["/; s/!.*/"]=/
16836p
16837g
16838s/^[^!]*!//
16839:repl
16840t repl
16841s/'"$ac_delim"'$//
16842t delim
16843:nl
16844h
16845s/\(.\{148\}\)..*/\1/
16846t more1
16847s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16848p
16849n
16850b repl
16851:more1
16852s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16853p
16854g
16855s/.\{148\}//
16856t nl
16857:delim
16858h
16859s/\(.\{148\}\)..*/\1/
16860t more2
16861s/["\\]/\\&/g; s/^/"/; s/$/"/
16862p
16863b
16864:more2
16865s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16866p
16867g
16868s/.\{148\}//
16869t delim
16870' <conf$$subs.awk | sed '
16871/^[^""]/{
16872 N
16873 s/\n//
16874}
16875' >>$CONFIG_STATUS || ac_write_fail=1
16876rm -f conf$$subs.awk
16877cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16878_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016879cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 for (key in S) S_is_set[key] = 1
16881 FS = ""
16882
16883}
16884{
16885 line = $ 0
16886 nfields = split(line, field, "@")
16887 substed = 0
16888 len = length(field[1])
16889 for (i = 2; i < nfields; i++) {
16890 key = field[i]
16891 keylen = length(key)
16892 if (S_is_set[key]) {
16893 value = S[key]
16894 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16895 len += length(value) + length(field[++i])
16896 substed = 1
16897 } else
16898 len += 1 + keylen
16899 }
16900
16901 print line
16902}
16903
16904_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16907if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16908 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16909else
16910 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016911fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016912 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016913_ACEOF
16914
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016915# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16916# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917# trailing colons and then remove the whole line if VPATH becomes empty
16918# (actually we leave an empty line to preserve line numbers).
16919if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016920 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16921h
16922s///
16923s/^/:/
16924s/[ ]*$/:/
16925s/:\$(srcdir):/:/g
16926s/:\${srcdir}:/:/g
16927s/:@srcdir@:/:/g
16928s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016929s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016930x
16931s/\(=[ ]*\).*/\1/
16932G
16933s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016934s/^[^=]*=[ ]*$//
16935}'
16936fi
16937
Matthias Kloseb9621712010-04-24 17:59:49 +000016938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016939fi # test -n "$CONFIG_FILES"
16940
Matthias Kloseb9621712010-04-24 17:59:49 +000016941# Set up the scripts for CONFIG_HEADERS section.
16942# No need to generate them if there are no CONFIG_HEADERS.
16943# This happens for instance with `./config.status Makefile'.
16944if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016945cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016946BEGIN {
16947_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948
Matthias Kloseb9621712010-04-24 17:59:49 +000016949# Transform confdefs.h into an awk script `defines.awk', embedded as
16950# here-document in config.status, that substitutes the proper values into
16951# config.h.in to produce config.h.
16952
16953# Create a delimiter string that does not exist in confdefs.h, to ease
16954# handling of long lines.
16955ac_delim='%!_!# '
16956for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016957 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16958 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016959 break
16960 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016961 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016962 else
16963 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16964 fi
16965done
16966
16967# For the awk script, D is an array of macro values keyed by name,
16968# likewise P contains macro parameters if any. Preserve backslash
16969# newline sequences.
16970
16971ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16972sed -n '
16973s/.\{148\}/&'"$ac_delim"'/g
16974t rset
16975:rset
16976s/^[ ]*#[ ]*define[ ][ ]*/ /
16977t def
16978d
16979:def
16980s/\\$//
16981t bsnl
16982s/["\\]/\\&/g
16983s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16984D["\1"]=" \3"/p
16985s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16986d
16987:bsnl
16988s/["\\]/\\&/g
16989s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16990D["\1"]=" \3\\\\\\n"\\/p
16991t cont
16992s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16993t cont
16994d
16995:cont
16996n
16997s/.\{148\}/&'"$ac_delim"'/g
16998t clear
16999:clear
17000s/\\$//
17001t bsnlc
17002s/["\\]/\\&/g; s/^/"/; s/$/"/p
17003d
17004:bsnlc
17005s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17006b cont
17007' <confdefs.h | sed '
17008s/'"$ac_delim"'/"\\\
17009"/g' >>$CONFIG_STATUS || ac_write_fail=1
17010
17011cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17012 for (key in D) D_is_set[key] = 1
17013 FS = ""
17014}
17015/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17016 line = \$ 0
17017 split(line, arg, " ")
17018 if (arg[1] == "#") {
17019 defundef = arg[2]
17020 mac1 = arg[3]
17021 } else {
17022 defundef = substr(arg[1], 2)
17023 mac1 = arg[2]
17024 }
17025 split(mac1, mac2, "(") #)
17026 macro = mac2[1]
17027 prefix = substr(line, 1, index(line, defundef) - 1)
17028 if (D_is_set[macro]) {
17029 # Preserve the white space surrounding the "#".
17030 print prefix "define", macro P[macro] D[macro]
17031 next
17032 } else {
17033 # Replace #undef with comments. This is necessary, for example,
17034 # in the case of _POSIX_SOURCE, which is predefined and required
17035 # on some systems where configure will not decide to define it.
17036 if (defundef == "undef") {
17037 print "/*", prefix defundef, macro, "*/"
17038 next
17039 }
17040 }
17041}
17042{ print }
17043_ACAWK
17044_ACEOF
17045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017046 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017047fi # test -n "$CONFIG_HEADERS"
17048
17049
17050eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17051shift
17052for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017053do
17054 case $ac_tag in
17055 :[FHLC]) ac_mode=$ac_tag; continue;;
17056 esac
17057 case $ac_mode$ac_tag in
17058 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017059 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060 :[FH]-) ac_tag=-:-;;
17061 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17062 esac
17063 ac_save_IFS=$IFS
17064 IFS=:
17065 set x $ac_tag
17066 IFS=$ac_save_IFS
17067 shift
17068 ac_file=$1
17069 shift
17070
17071 case $ac_mode in
17072 :L) ac_source=$1;;
17073 :[FH])
17074 ac_file_inputs=
17075 for ac_f
17076 do
17077 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017078 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 *) # Look for the file first in the build tree, then in the source tree
17080 # (if the path is not absolute). The absolute path cannot be DOS-style,
17081 # because $ac_f cannot contain `:'.
17082 test -f "$ac_f" ||
17083 case $ac_f in
17084 [\\/$]*) false;;
17085 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17086 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017087 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17090 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 done
17092
17093 # Let's still pretend it is `configure' which instantiates (i.e., don't
17094 # use $as_me), people would be surprised to read:
17095 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017096 configure_input='Generated from '`
17097 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17098 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099 if test x"$ac_file" != x-; then
17100 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017101 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17102$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017104 # Neutralize special characters interpreted by sed in replacement strings.
17105 case $configure_input in #(
17106 *\&* | *\|* | *\\* )
17107 ac_sed_conf_input=`$as_echo "$configure_input" |
17108 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17109 *) ac_sed_conf_input=$configure_input;;
17110 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017111
17112 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017113 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17114 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115 esac
17116 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017117 esac
17118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017120$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017121 X"$ac_file" : 'X\(//\)[^/]' \| \
17122 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017123 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017124$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17126 s//\1/
17127 q
17128 }
17129 /^X\(\/\/\)[^/].*/{
17130 s//\1/
17131 q
17132 }
17133 /^X\(\/\/\)$/{
17134 s//\1/
17135 q
17136 }
17137 /^X\(\/\).*/{
17138 s//\1/
17139 q
17140 }
17141 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017142 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 ac_builddir=.
17144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145case "$ac_dir" in
17146.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17147*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151 case $ac_top_builddir_sub in
17152 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17153 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17154 esac ;;
17155esac
17156ac_abs_top_builddir=$ac_pwd
17157ac_abs_builddir=$ac_pwd$ac_dir_suffix
17158# for backward compatibility:
17159ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
17161case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017163 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164 ac_top_srcdir=$ac_top_builddir_sub
17165 ac_abs_top_srcdir=$ac_pwd ;;
17166 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017168 ac_top_srcdir=$srcdir
17169 ac_abs_top_srcdir=$srcdir ;;
17170 *) # Relative name.
17171 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17172 ac_top_srcdir=$ac_top_build_prefix$srcdir
17173 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017174esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178 case $ac_mode in
17179 :F)
17180 #
17181 # CONFIG_FILE
17182 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
17184 case $INSTALL in
17185 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017188 ac_MKDIR_P=$MKDIR_P
17189 case $MKDIR_P in
17190 [\\/$]* | ?:[\\/]* ) ;;
17191 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17192 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017193_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017194
Matthias Kloseb9621712010-04-24 17:59:49 +000017195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196# If the template does not know about datarootdir, expand it.
17197# FIXME: This hack should be removed a few years after 2.60.
17198ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017199ac_sed_dataroot='
17200/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017201 p
17202 q
17203}
17204/@datadir@/p
17205/@docdir@/p
17206/@infodir@/p
17207/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017208/@mandir@/p'
17209case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210*datarootdir*) ac_datarootdir_seen=yes;;
17211*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017212 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17213$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216 ac_datarootdir_hack='
17217 s&@datadir@&$datadir&g
17218 s&@docdir@&$docdir&g
17219 s&@infodir@&$infodir&g
17220 s&@localedir@&$localedir&g
17221 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017222 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017223esac
17224_ACEOF
17225
17226# Neutralize VPATH when `$srcdir' = `.'.
17227# Shell code in configure.ac might set extrasub.
17228# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017229cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17230ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017231$extrasub
17232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017234:t
17235/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017236s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017238s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017239s&@srcdir@&$ac_srcdir&;t t
17240s&@abs_srcdir@&$ac_abs_srcdir&;t t
17241s&@top_srcdir@&$ac_top_srcdir&;t t
17242s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17243s&@builddir@&$ac_builddir&;t t
17244s&@abs_builddir@&$ac_abs_builddir&;t t
17245s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17246s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017247s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017249"
Victor Stinnere0be4232011-10-25 13:06:09 +020017250eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17251 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017254 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17255 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17256 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017258which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017259$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017260which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017261
Victor Stinnere0be4232011-10-25 13:06:09 +020017262 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017263 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017264 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17265 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017266 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017267 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268 ;;
17269 :H)
17270 #
17271 # CONFIG_HEADER
17272 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017274 {
17275 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017276 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17277 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017278 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017279 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017280 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17281$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017282 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017283 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017284 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017285 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017286 fi
17287 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017288 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017289 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017290 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017294
17295 esac
17296
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017297
17298 case $ac_file$ac_mode in
17299 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17300
17301 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302done # for ac_tag
17303
Guido van Rossum627b2d71993-12-24 10:39:16 +000017304
Matthias Kloseb9621712010-04-24 17:59:49 +000017305as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017306_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017307ac_clean_files=$ac_clean_files_save
17308
Matthias Kloseb9621712010-04-24 17:59:49 +000017309test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017310 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017311
Martin v. Löwis11437992002-04-12 09:54:03 +000017312
17313# configure is writing to config.log, and then calls config.status.
17314# config.status does its own redirection, appending to config.log.
17315# Unfortunately, on DOS this fails, as config.log is still kept open
17316# by configure, so config.status won't be able to write to it; its
17317# output is simply discarded. So we exec the FD to /dev/null,
17318# effectively closing config.log, so it can be properly (re)opened and
17319# appended to by config.status. When coming back to configure, we
17320# need to make the FD available again.
17321if test "$no_create" != yes; then
17322 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017323 ac_config_status_args=
17324 test "$silent" = yes &&
17325 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017326 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017327 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017328 exec 5>>config.log
17329 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17330 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017331 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017332fi
17333if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17335$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017336fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017337
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017338
Christian Heimes75ed8902013-11-20 01:11:18 +010017339echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017340if test ! -f Modules/Setup
17341then
17342 cp $srcdir/Modules/Setup.dist Modules/Setup
17343fi
17344
Christian Heimes75ed8902013-11-20 01:11:18 +010017345echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017346if test ! -f Modules/Setup.local
17347then
17348 echo "# Edit this file for local setup changes" >Modules/Setup.local
17349fi
17350
Christian Heimes75ed8902013-11-20 01:11:18 +010017351echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017352$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17353 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017354 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017355mv config.c Modules