blob: fbd4c24a8c6f66eb134d5b642520f9c1cbe4f2af [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Larry Hastingsf5002bd2014-03-16 23:05:59 -07003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Larry Hastingsf5002bd2014-03-16 23:05:59 -0700583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700661SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
664UNIVERSAL_ARCH_FLAGS
665BASECFLAGS
666OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000667ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100669MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000670INSTALL_DATA
671INSTALL_SCRIPT
672INSTALL_PROGRAM
Kushal Das02d23a22014-04-15 23:50:06 +0530673OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100799with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_libs
801with_system_expat
802with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100803with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000804enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700805with_tcltk_includes
806with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_dbmliborder
808with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_threads
810with_thread
811enable_ipv6
812with_doc_strings
813with_tsc
814with_pymalloc
815with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_fpectl
817with_libm
818with_libc
819enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800821with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000822'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000823 ac_precious_vars='build_alias
824host_alias
825target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100826MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827CC
828CFLAGS
829LDFLAGS
830LIBS
831CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200832CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000833
Guido van Rossum627b2d71993-12-24 10:39:16 +0000834
Guido van Rossum7f43da71994-08-01 12:15:30 +0000835# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836ac_init_help=
837ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000838ac_unrecognized_opts=
839ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840# The variables have the same names as the options, with
841# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000842cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845no_recursion=
846prefix=NONE
847program_prefix=NONE
848program_suffix=NONE
849program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854x_includes=NONE
855x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000856
857# Installation directory options.
858# These are left unexpanded so users can "make install exec_prefix=/foo"
859# and all the variables that are supposed to be based on exec_prefix
860# by default will actually change.
861# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863bindir='${exec_prefix}/bin'
864sbindir='${exec_prefix}/sbin'
865libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000866datarootdir='${prefix}/share'
867datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868sysconfdir='${prefix}/etc'
869sharedstatedir='${prefix}/com'
870localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871includedir='${prefix}/include'
872oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000873docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
874infodir='${datarootdir}/info'
875htmldir='${docdir}'
876dvidir='${docdir}'
877pdfdir='${docdir}'
878psdir='${docdir}'
879libdir='${exec_prefix}/lib'
880localedir='${datarootdir}/locale'
881mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887 # If the previous option needs an argument, assign it.
888 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890 ac_prev=
891 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000892 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200895 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
896 *=) ac_optarg= ;;
897 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900 # Accept the important Cygnus configure options, so we can diagnose typos.
901
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902 case $ac_dashdash$ac_option in
903 --)
904 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -bindir | --bindir | --bindi | --bind | --bin | --bi)
907 ac_prev=bindir ;;
908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910
911 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 -cache-file | --cache-file | --cache-fil | --cache-fi \
917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
918 ac_prev=cache_file ;;
919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 cache_file=$ac_optarg ;;
922
923 --config-cache | -C)
924 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
932 | --dataroo | --dataro | --datar)
933 ac_prev=datarootdir ;;
934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
936 datarootdir=$ac_optarg ;;
937
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200942 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000943 ac_useropt_orig=$ac_useropt
944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
945 case $ac_user_opts in
946 *"
947"enable_$ac_useropt"
948"*) ;;
949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
950 ac_unrecognized_sep=', ';;
951 esac
952 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953
954 -docdir | --docdir | --docdi | --doc | --do)
955 ac_prev=docdir ;;
956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
957 docdir=$ac_optarg ;;
958
959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
960 ac_prev=dvidir ;;
961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
962 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
964 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
982 | --exec | --exe | --ex)
983 ac_prev=exec_prefix ;;
984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
986 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Obsolete; use --with-gas.
991 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 -help | --help | --hel | --he | -h)
994 ac_init_help=long ;;
995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
996 ac_init_help=recursive ;;
997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
998 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1006 ac_prev=htmldir ;;
1007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1008 | --ht=*)
1009 htmldir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -includedir | --includedir | --includedi | --included | --include \
1012 | --includ | --inclu | --incl | --inc)
1013 ac_prev=includedir ;;
1014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1015 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -infodir | --infodir | --infodi | --infod | --info | --inf)
1019 ac_prev=infodir ;;
1020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -libdir | --libdir | --libdi | --libd)
1024 ac_prev=libdir ;;
1025 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1029 | --libexe | --libex | --libe)
1030 ac_prev=libexecdir ;;
1031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1032 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 -localedir | --localedir | --localedi | --localed | --locale)
1036 ac_prev=localedir ;;
1037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1038 localedir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001041 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042 ac_prev=localstatedir ;;
1043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1048 ac_prev=mandir ;;
1049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001053 # Obsolete; use --without-fp.
1054 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058 no_create=yes ;;
1059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1062 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1066 | --oldin | --oldi | --old | --ol | --o)
1067 ac_prev=oldincludedir ;;
1068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1074 ac_prev=prefix ;;
1075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1079 | --program-pre | --program-pr | --program-p)
1080 ac_prev=program_prefix ;;
1081 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1086 | --program-suf | --program-su | --program-s)
1087 ac_prev=program_suffix ;;
1088 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-transform-name | --program-transform-name \
1093 | --program-transform-nam | --program-transform-na \
1094 | --program-transform-n | --program-transform- \
1095 | --program-transform | --program-transfor \
1096 | --program-transfo | --program-transf \
1097 | --program-trans | --program-tran \
1098 | --progr-tra | --program-tr | --program-t)
1099 ac_prev=program_transform_name ;;
1100 -program-transform-name=* | --program-transform-name=* \
1101 | --program-transform-nam=* | --program-transform-na=* \
1102 | --program-transform-n=* | --program-transform-=* \
1103 | --program-transform=* | --program-transfor=* \
1104 | --program-transfo=* | --program-transf=* \
1105 | --program-trans=* | --program-tran=* \
1106 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1110 ac_prev=pdfdir ;;
1111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1112 pdfdir=$ac_optarg ;;
1113
1114 -psdir | --psdir | --psdi | --psd | --ps)
1115 ac_prev=psdir ;;
1116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1117 psdir=$ac_optarg ;;
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1120 | -silent | --silent | --silen | --sile | --sil)
1121 silent=yes ;;
1122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1124 ac_prev=sbindir ;;
1125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1126 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128
1129 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1131 | --sharedst | --shareds | --shared | --share | --shar \
1132 | --sha | --sh)
1133 ac_prev=sharedstatedir ;;
1134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1137 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 -site | --site | --sit)
1141 ac_prev=site ;;
1142 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1146 ac_prev=srcdir ;;
1147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1151 | --syscon | --sysco | --sysc | --sys | --sy)
1152 ac_prev=sysconfdir ;;
1153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1163 verbose=yes ;;
1164
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 -version | --version | --versio | --versi | --vers | -V)
1166 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
1168 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001172 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt_orig=$ac_useropt
1174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175 case $ac_user_opts in
1176 *"
1177"with_$ac_useropt"
1178"*) ;;
1179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1180 ac_unrecognized_sep=', ';;
1181 esac
1182 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001188 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001200 --x)
1201 # Obsolete; use --with-x.
1202 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1205 | --x-incl | --x-inc | --x-in | --x-i)
1206 ac_prev=x_includes ;;
1207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1213 ac_prev=x_libraries ;;
1214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001218 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1219Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220 ;;
1221
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 *=*)
1223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1224 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001225 case $ac_envvar in #(
1226 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001227 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001229 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 export $ac_envvar ;;
1231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001237 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
1240 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001241done
1242
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246fi
1247
Matthias Kloseb9621712010-04-24 17:59:49 +00001248if test -n "$ac_unrecognized_opts"; then
1249 case $enable_option_checking in
1250 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1253 esac
1254fi
1255
1256# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1258 datadir sysconfdir sharedstatedir localstatedir includedir \
1259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1260 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001261do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 # Remove trailing slashes.
1264 case $ac_val in
1265 */ )
1266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1267 eval $ac_var=\$ac_val;;
1268 esac
1269 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271 [\\/$]* | ?:[\\/]* ) continue;;
1272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001275done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Martin v. Löwis11437992002-04-12 09:54:03 +00001277# There might be people who depend on the old broken behavior: `$host'
1278# used to hold the argument of --host etc.
1279# FIXME: To remove some day.
1280build=$build_alias
1281host=$host_alias
1282target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283
Martin v. Löwis11437992002-04-12 09:54:03 +00001284# FIXME: To remove some day.
1285if test "x$host_alias" != x; then
1286 if test "x$build_alias" = x; then
1287 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 elif test "x$build_alias" != "x$host_alias"; then
1289 cross_compiling=yes
1290 fi
1291fi
1292
1293ac_tool_prefix=
1294test -n "$host_alias" && ac_tool_prefix=$host_alias-
1295
1296test "$silent" = yes && exec 6>/dev/null
1297
Guido van Rossum627b2d71993-12-24 10:39:16 +00001298
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299ac_pwd=`pwd` && test -n "$ac_pwd" &&
1300ac_ls_di=`ls -di .` &&
1301ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001304 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305
1306
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307# Find the source files, if location was not specified.
1308if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001309 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001311 ac_confdir=`$as_dirname -- "$as_myself" ||
1312$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1313 X"$as_myself" : 'X\(//\)[^/]' \| \
1314 X"$as_myself" : 'X\(//\)$' \| \
1315 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1316$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\/\)[^/].*/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)$/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\).*/{
1330 s//\1/
1331 q
1332 }
1333 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336 srcdir=..
1337 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338else
1339 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341if test ! -r "$srcdir/$ac_unique_file"; then
1342 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001343 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1346ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001347 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 pwd)`
1349# When building in place, set srcdir=.
1350if test "$ac_abs_confdir" = "$ac_pwd"; then
1351 srcdir=.
1352fi
1353# Remove unnecessary trailing slashes from srcdir.
1354# Double slashes in file names in object file debugging info
1355# mess up M-x gdb in Emacs.
1356case $srcdir in
1357*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1358esac
1359for ac_var in $ac_precious_vars; do
1360 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_env_${ac_var}_value=\$${ac_var}
1362 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1363 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1364done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365
Martin v. Löwis11437992002-04-12 09:54:03 +00001366#
1367# Report the --help message.
1368#
1369if test "$ac_init_help" = "long"; then
1370 # Omit some internal or obsolete options to make the list less imposing.
1371 # This message is too long to be a string in the A/UX 3.1 sh.
1372 cat <<_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001373\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375Usage: $0 [OPTION]... [VAR=VALUE]...
1376
1377To assign environment variables (e.g., CC, CFLAGS...), specify them as
1378VAR=VALUE. See below for descriptions of some of the useful variables.
1379
1380Defaults for the options are specified in brackets.
1381
1382Configuration:
1383 -h, --help display this help and exit
1384 --help=short display options specific to this package
1385 --help=recursive display the short help of all the included packages
1386 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001387 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 --cache-file=FILE cache test results in FILE [disabled]
1389 -C, --config-cache alias for \`--cache-file=config.cache'
1390 -n, --no-create do not create output files
1391 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393Installation directories:
1394 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001397 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399By default, \`make install' will install all the files in
1400\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1401an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1402for instance \`--prefix=\$HOME'.
1403
1404For better control, use the options below.
1405
1406Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001407 --bindir=DIR user executables [EPREFIX/bin]
1408 --sbindir=DIR system admin executables [EPREFIX/sbin]
1409 --libexecdir=DIR program executables [EPREFIX/libexec]
1410 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1411 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1412 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1413 --libdir=DIR object code libraries [EPREFIX/lib]
1414 --includedir=DIR C header files [PREFIX/include]
1415 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1416 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1417 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1418 --infodir=DIR info documentation [DATAROOTDIR/info]
1419 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1420 --mandir=DIR man documentation [DATAROOTDIR/man]
1421 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1422 --htmldir=DIR html documentation [DOCDIR]
1423 --dvidir=DIR dvi documentation [DOCDIR]
1424 --pdfdir=DIR pdf documentation [DOCDIR]
1425 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426_ACEOF
1427
1428 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001429
1430System types:
1431 --build=BUILD configure for building on BUILD [guessed]
1432 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433_ACEOF
1434fi
1435
1436if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 case $ac_init_help in
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001438 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001439 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001440 cat <<\_ACEOF
1441
1442Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1445 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001446 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001447 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-framework[=INSTALLDIR]
1449 Build (MacOSX|Darwin) framework
1450 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001451 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001452 --enable-loadable-sqlite-extensions
1453 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --enable-ipv6 Enable ipv6 (with ipv4) support
1455 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001456 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001457 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458
1459Optional Packages:
1460 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1461 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001462 --with-universal-archs=ARCH
1463 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001464 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001465 --with-framework-name=FRAMEWORK
1466 specify an alternate name of the framework built
1467 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001469 --with-cxx-main=<compiler>
1470 compile main() and link python executable with C++
1471 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-suffix=.exe set executable suffix
1473 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001474 --with-hash-algorithm=[fnv|siphash24]
1475 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001476 --with-address-sanitizer
1477 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001479 --with-system-expat build pyexpat module using an installed expat
1480 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001481 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001482 --with-system-libmpdec build _decimal module using an installed libmpdec
1483 library
Ned Deilyd819b932013-09-06 01:07:05 -07001484 --with-tcltk-includes='-I...'
1485 override search for Tcl and Tk include files
1486 --with-tcltk-libs='-L...'
1487 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001488 --with-dbmliborder=db1:db2:...
1489 order to check db backends for dbm. Valid value is a
1490 colon separated string with the backend names
1491 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-threads[=DIRECTORY]
1494 disable/enable thread support
1495 --with(out)-thread[=DIRECTORY]
1496 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001498 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001500 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-fpectl enable SIGFPE catching
1502 --with-libm=STRING math library
1503 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001504 --with(out)-computed-gotos
1505 Use computed gotos in evaluation loop (enabled by
1506 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001507 --with(out)-ensurepip=[=upgrade]
1508 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001509
1510Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001511 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 CC C compiler command
1513 CFLAGS C compiler flags
1514 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1515 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 CPP C preprocessor
1520
1521Use these variables to override the choices made by `configure' or to help
1522it to find libraries and programs with nonstandard names/locations.
1523
Georg Brandle2e15612009-05-20 18:25:10 +00001524Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001525_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001526ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001527fi
1528
1529if test "$ac_init_help" = "recursive"; then
1530 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001532 test -d "$ac_dir" ||
1533 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 ac_builddir=.
1536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537case "$ac_dir" in
1538.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001540 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001542 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 case $ac_top_builddir_sub in
1544 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546 esac ;;
1547esac
1548ac_abs_top_builddir=$ac_pwd
1549ac_abs_builddir=$ac_pwd$ac_dir_suffix
1550# for backward compatibility:
1551ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$ac_top_builddir_sub
1557 ac_abs_top_srcdir=$ac_pwd ;;
1558 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 ac_top_srcdir=$srcdir
1561 ac_abs_top_srcdir=$srcdir ;;
1562 *) # Relative name.
1563 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564 ac_top_srcdir=$ac_top_build_prefix$srcdir
1565 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001566esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 cd "$ac_dir" || { ac_status=$?; continue; }
1570 # Check for guested configure.
1571 if test -f "$ac_srcdir/configure.gnu"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574 elif test -f "$ac_srcdir/configure"; then
1575 echo &&
1576 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 fi || ac_status=$?
1580 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 done
1582fi
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001585if $ac_init_version; then
1586 cat <<\_ACEOF
Larry Hastingsf5002bd2014-03-16 23:05:59 -07001587python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001588generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001590Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591This configure script is free software; the Free Software Foundation
1592gives unlimited permission to copy, distribute and modify it.
1593_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001596
1597## ------------------------ ##
1598## Autoconf initialization. ##
1599## ------------------------ ##
1600
1601# ac_fn_c_try_compile LINENO
1602# --------------------------
1603# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604ac_fn_c_try_compile ()
1605{
1606 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607 rm -f conftest.$ac_objext
1608 if { { ac_try="$ac_compile"
1609case "(($ac_try" in
1610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611 *) ac_try_echo=$ac_try;;
1612esac
1613eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614$as_echo "$ac_try_echo"; } >&5
1615 (eval "$ac_compile") 2>conftest.err
1616 ac_status=$?
1617 if test -s conftest.err; then
1618 grep -v '^ *+' conftest.err >conftest.er1
1619 cat conftest.er1 >&5
1620 mv -f conftest.er1 conftest.err
1621 fi
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && {
1624 test -z "$ac_c_werror_flag" ||
1625 test ! -s conftest.err
1626 } && test -s conftest.$ac_objext; then :
1627 ac_retval=0
1628else
1629 $as_echo "$as_me: failed program was:" >&5
1630sed 's/^/| /' conftest.$ac_ext >&5
1631
1632 ac_retval=1
1633fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001634 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001635 as_fn_set_status $ac_retval
1636
1637} # ac_fn_c_try_compile
1638
Matthias Kloseb9621712010-04-24 17:59:49 +00001639# ac_fn_c_try_link LINENO
1640# -----------------------
1641# Try to link conftest.$ac_ext, and return whether this succeeded.
1642ac_fn_c_try_link ()
1643{
1644 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1645 rm -f conftest.$ac_objext conftest$ac_exeext
1646 if { { ac_try="$ac_link"
1647case "(($ac_try" in
1648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649 *) ac_try_echo=$ac_try;;
1650esac
1651eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652$as_echo "$ac_try_echo"; } >&5
1653 (eval "$ac_link") 2>conftest.err
1654 ac_status=$?
1655 if test -s conftest.err; then
1656 grep -v '^ *+' conftest.err >conftest.er1
1657 cat conftest.er1 >&5
1658 mv -f conftest.er1 conftest.err
1659 fi
1660 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1661 test $ac_status = 0; } && {
1662 test -z "$ac_c_werror_flag" ||
1663 test ! -s conftest.err
1664 } && test -s conftest$ac_exeext && {
1665 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001666 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 }; then :
1668 ac_retval=0
1669else
1670 $as_echo "$as_me: failed program was:" >&5
1671sed 's/^/| /' conftest.$ac_ext >&5
1672
1673 ac_retval=1
1674fi
1675 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1676 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1677 # interfere with the next link command; also delete a directory that is
1678 # left behind by Apple's compiler. We do this before executing the actions.
1679 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_link
1684
Matthias Kloseb9621712010-04-24 17:59:49 +00001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001706 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
1722# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1723# -------------------------------------------------------
1724# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1725# the include files in INCLUDES and setting the cache variable VAR
1726# accordingly.
1727ac_fn_c_check_header_mongrel ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001730 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1732$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001733if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 $as_echo_n "(cached) " >&6
1735fi
1736eval ac_res=\$$3
1737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1738$as_echo "$ac_res" >&6; }
1739else
1740 # Is the header compilable?
1741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1742$as_echo_n "checking $2 usability... " >&6; }
1743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744/* end confdefs.h. */
1745$4
1746#include <$2>
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 ac_header_compiler=yes
1750else
1751 ac_header_compiler=no
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1755$as_echo "$ac_header_compiler" >&6; }
1756
1757# Is the header present?
1758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1759$as_echo_n "checking $2 presence... " >&6; }
1760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1761/* end confdefs.h. */
1762#include <$2>
1763_ACEOF
1764if ac_fn_c_try_cpp "$LINENO"; then :
1765 ac_header_preproc=yes
1766else
1767 ac_header_preproc=no
1768fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1771$as_echo "$ac_header_preproc" >&6; }
1772
1773# So? What about this header?
1774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1775 yes:no: )
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1777$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1780 ;;
1781 no:yes:* )
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1783$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1785$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1787$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1789$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1791$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001792( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001793## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001795 ) | sed "s/^/$as_me: WARNING: /" >&2
1796 ;;
1797esac
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1799$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001800if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001801 $as_echo_n "(cached) " >&6
1802else
1803 eval "$3=\$ac_header_compiler"
1804fi
1805eval ac_res=\$$3
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1807$as_echo "$ac_res" >&6; }
1808fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001809 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001810
1811} # ac_fn_c_check_header_mongrel
1812
1813# ac_fn_c_try_run LINENO
1814# ----------------------
1815# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1816# that executables *can* be run.
1817ac_fn_c_try_run ()
1818{
1819 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1820 if { { ac_try="$ac_link"
1821case "(($ac_try" in
1822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1823 *) ac_try_echo=$ac_try;;
1824esac
1825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1826$as_echo "$ac_try_echo"; } >&5
1827 (eval "$ac_link") 2>&5
1828 ac_status=$?
1829 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1830 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1831 { { case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834esac
1835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836$as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_try") 2>&5
1838 ac_status=$?
1839 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1840 test $ac_status = 0; }; }; then :
1841 ac_retval=0
1842else
1843 $as_echo "$as_me: program exited with status $ac_status" >&5
1844 $as_echo "$as_me: failed program was:" >&5
1845sed 's/^/| /' conftest.$ac_ext >&5
1846
1847 ac_retval=$ac_status
1848fi
1849 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001850 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 as_fn_set_status $ac_retval
1852
1853} # ac_fn_c_try_run
1854
1855# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1856# -------------------------------------------------------
1857# Tests whether HEADER exists and can be compiled using the include files in
1858# INCLUDES, setting the cache variable VAR accordingly.
1859ac_fn_c_check_header_compile ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1863$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001864if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001865 $as_echo_n "(cached) " >&6
1866else
1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1868/* end confdefs.h. */
1869$4
1870#include <$2>
1871_ACEOF
1872if ac_fn_c_try_compile "$LINENO"; then :
1873 eval "$3=yes"
1874else
1875 eval "$3=no"
1876fi
1877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1878fi
1879eval ac_res=\$$3
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1881$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001883
1884} # ac_fn_c_check_header_compile
1885
Matthias Kloseb9621712010-04-24 17:59:49 +00001886# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1887# -------------------------------------------
1888# Tests whether TYPE exists after having included INCLUDES, setting cache
1889# variable VAR accordingly.
1890ac_fn_c_check_type ()
1891{
1892 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001895if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=no"
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$4
1902int
1903main ()
1904{
1905if (sizeof ($2))
1906 return 0;
1907 ;
1908 return 0;
1909}
1910_ACEOF
1911if ac_fn_c_try_compile "$LINENO"; then :
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915int
1916main ()
1917{
1918if (sizeof (($2)))
1919 return 0;
1920 ;
1921 return 0;
1922}
1923_ACEOF
1924if ac_fn_c_try_compile "$LINENO"; then :
1925
1926else
1927 eval "$3=yes"
1928fi
1929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1930fi
1931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1932fi
1933eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001936 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001937
1938} # ac_fn_c_check_type
1939
1940# ac_fn_c_find_uintX_t LINENO BITS VAR
1941# ------------------------------------
1942# Finds an unsigned integer type with width BITS, setting cache variable VAR
1943# accordingly.
1944ac_fn_c_find_uintX_t ()
1945{
1946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1948$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001949if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001950 $as_echo_n "(cached) " >&6
1951else
1952 eval "$3=no"
1953 # Order is important - never check a type that is potentially smaller
1954 # than half of the expected target width.
1955 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1956 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$ac_includes_default
1960int
1961main ()
1962{
1963static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001964test_array [0] = 0;
1965return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972 case $ac_type in #(
1973 uint$2_t) :
1974 eval "$3=yes" ;; #(
1975 *) :
1976 eval "$3=\$ac_type" ;;
1977esac
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001980 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981
1982else
1983 break
1984fi
1985 done
1986fi
1987eval ac_res=\$$3
1988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1989$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992} # ac_fn_c_find_uintX_t
1993
1994# ac_fn_c_find_intX_t LINENO BITS VAR
1995# -----------------------------------
1996# Finds a signed integer type with width BITS, setting cache variable VAR
1997# accordingly.
1998ac_fn_c_find_intX_t ()
1999{
2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2002$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002003if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002004 $as_echo_n "(cached) " >&6
2005else
2006 eval "$3=no"
2007 # Order is important - never check a type that is potentially smaller
2008 # than half of the expected target width.
2009 for ac_type in int$2_t 'int' 'long int' \
2010 'long long int' 'short int' 'signed char'; do
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012/* end confdefs.h. */
2013$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002015int
2016main ()
2017{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2028/* end confdefs.h. */
2029$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002031int
2032main ()
2033{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002034static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002035 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002036test_array [0] = 0;
2037return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002038
2039 ;
2040 return 0;
2041}
2042_ACEOF
2043if ac_fn_c_try_compile "$LINENO"; then :
2044
2045else
2046 case $ac_type in #(
2047 int$2_t) :
2048 eval "$3=yes" ;; #(
2049 *) :
2050 eval "$3=\$ac_type" ;;
2051esac
2052fi
2053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2054fi
2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002056 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058else
2059 break
2060fi
2061 done
2062fi
2063eval ac_res=\$$3
2064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2065$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002066 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068} # ac_fn_c_find_intX_t
2069
2070# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2071# --------------------------------------------
2072# Tries to find the compile-time value of EXPR in a program that includes
2073# INCLUDES, setting VAR accordingly. Returns whether the value could be
2074# computed
2075ac_fn_c_compute_int ()
2076{
2077 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2078 if test "$cross_compiling" = yes; then
2079 # Depending upon the size, compute the lo and hi bounds.
2080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081/* end confdefs.h. */
2082$4
2083int
2084main ()
2085{
2086static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002087test_array [0] = 0;
2088return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002089
2090 ;
2091 return 0;
2092}
2093_ACEOF
2094if ac_fn_c_try_compile "$LINENO"; then :
2095 ac_lo=0 ac_mid=0
2096 while :; do
2097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2098/* end confdefs.h. */
2099$4
2100int
2101main ()
2102{
2103static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002104test_array [0] = 0;
2105return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002106
2107 ;
2108 return 0;
2109}
2110_ACEOF
2111if ac_fn_c_try_compile "$LINENO"; then :
2112 ac_hi=$ac_mid; break
2113else
2114 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2115 if test $ac_lo -le $ac_mid; then
2116 ac_lo= ac_hi=
2117 break
2118 fi
2119 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2120fi
2121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2122 done
2123else
2124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2125/* end confdefs.h. */
2126$4
2127int
2128main ()
2129{
2130static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002131test_array [0] = 0;
2132return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_compile "$LINENO"; then :
2139 ac_hi=-1 ac_mid=-1
2140 while :; do
2141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142/* end confdefs.h. */
2143$4
2144int
2145main ()
2146{
2147static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002148test_array [0] = 0;
2149return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_compile "$LINENO"; then :
2156 ac_lo=$ac_mid; break
2157else
2158 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2159 if test $ac_mid -le $ac_hi; then
2160 ac_lo= ac_hi=
2161 break
2162 fi
2163 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2164fi
2165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2166 done
2167else
2168 ac_lo= ac_hi=
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173# Binary search between lo and hi bounds.
2174while test "x$ac_lo" != "x$ac_hi"; do
2175 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002183test_array [0] = 0;
2184return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_hi=$ac_mid
2192else
2193 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196done
2197case $ac_lo in #((
2198?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2199'') ac_retval=1 ;;
2200esac
2201 else
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205static long int longval () { return $2; }
2206static unsigned long int ulongval () { return $2; }
2207#include <stdio.h>
2208#include <stdlib.h>
2209int
2210main ()
2211{
2212
2213 FILE *f = fopen ("conftest.val", "w");
2214 if (! f)
2215 return 1;
2216 if (($2) < 0)
2217 {
2218 long int i = longval ();
2219 if (i != ($2))
2220 return 1;
2221 fprintf (f, "%ld", i);
2222 }
2223 else
2224 {
2225 unsigned long int i = ulongval ();
2226 if (i != ($2))
2227 return 1;
2228 fprintf (f, "%lu", i);
2229 }
2230 /* Do not output a trailing newline, as this causes \r\n confusion
2231 on some platforms. */
2232 return ferror (f) || fclose (f) != 0;
2233
2234 ;
2235 return 0;
2236}
2237_ACEOF
2238if ac_fn_c_try_run "$LINENO"; then :
2239 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2240else
2241 ac_retval=1
2242fi
2243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2244 conftest.$ac_objext conftest.beam conftest.$ac_ext
2245rm -f conftest.val
2246
2247 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002248 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002249 as_fn_set_status $ac_retval
2250
2251} # ac_fn_c_compute_int
2252
2253# ac_fn_c_check_func LINENO FUNC VAR
2254# ----------------------------------
2255# Tests whether FUNC exists, setting the cache variable VAR accordingly
2256ac_fn_c_check_func ()
2257{
2258 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2260$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002261if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002262 $as_echo_n "(cached) " >&6
2263else
2264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2265/* end confdefs.h. */
2266/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2268#define $2 innocuous_$2
2269
2270/* System header to define __stub macros and hopefully few prototypes,
2271 which can conflict with char $2 (); below.
2272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2273 <limits.h> exists even on freestanding compilers. */
2274
2275#ifdef __STDC__
2276# include <limits.h>
2277#else
2278# include <assert.h>
2279#endif
2280
2281#undef $2
2282
2283/* Override any GCC internal prototype to avoid an error.
2284 Use char because int might match the return type of a GCC
2285 builtin and then its argument prototype would still apply. */
2286#ifdef __cplusplus
2287extern "C"
2288#endif
2289char $2 ();
2290/* The GNU C library defines this for functions which it implements
2291 to always fail with ENOSYS. Some functions are actually named
2292 something starting with __ and the normal name is an alias. */
2293#if defined __stub_$2 || defined __stub___$2
2294choke me
2295#endif
2296
2297int
2298main ()
2299{
2300return $2 ();
2301 ;
2302 return 0;
2303}
2304_ACEOF
2305if ac_fn_c_try_link "$LINENO"; then :
2306 eval "$3=yes"
2307else
2308 eval "$3=no"
2309fi
2310rm -f core conftest.err conftest.$ac_objext \
2311 conftest$ac_exeext conftest.$ac_ext
2312fi
2313eval ac_res=\$$3
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2315$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002316 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002317
2318} # ac_fn_c_check_func
2319
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002320# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2321# ---------------------------------------------
2322# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2323# accordingly.
2324ac_fn_c_check_decl ()
2325{
2326 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2327 as_decl_name=`echo $2|sed 's/ *(.*//'`
2328 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2330$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2331if eval \${$3+:} false; then :
2332 $as_echo_n "(cached) " >&6
2333else
2334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2335/* end confdefs.h. */
2336$4
2337int
2338main ()
2339{
2340#ifndef $as_decl_name
2341#ifdef __cplusplus
2342 (void) $as_decl_use;
2343#else
2344 (void) $as_decl_name;
2345#endif
2346#endif
2347
2348 ;
2349 return 0;
2350}
2351_ACEOF
2352if ac_fn_c_try_compile "$LINENO"; then :
2353 eval "$3=yes"
2354else
2355 eval "$3=no"
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2358fi
2359eval ac_res=\$$3
2360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2361$as_echo "$ac_res" >&6; }
2362 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2363
2364} # ac_fn_c_check_decl
2365
Matthias Kloseb9621712010-04-24 17:59:49 +00002366# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2367# ----------------------------------------------------
2368# Tries to find if the field MEMBER exists in type AGGR, after including
2369# INCLUDES, setting cache variable VAR accordingly.
2370ac_fn_c_check_member ()
2371{
2372 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2374$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002375if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo_n "(cached) " >&6
2377else
2378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h. */
2380$5
2381int
2382main ()
2383{
2384static $2 ac_aggr;
2385if (ac_aggr.$3)
2386return 0;
2387 ;
2388 return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"; then :
2392 eval "$4=yes"
2393else
2394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2395/* end confdefs.h. */
2396$5
2397int
2398main ()
2399{
2400static $2 ac_aggr;
2401if (sizeof ac_aggr.$3)
2402return 0;
2403 ;
2404 return 0;
2405}
2406_ACEOF
2407if ac_fn_c_try_compile "$LINENO"; then :
2408 eval "$4=yes"
2409else
2410 eval "$4=no"
2411fi
2412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2413fi
2414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2415fi
2416eval ac_res=\$$4
2417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002419 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002420
2421} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002423This file contains any messages produced by compilers while
2424running configure, to aid debugging if configure makes a mistake.
2425
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002426It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002427generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
2429 $ $0 $@
2430
2431_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002432exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002433{
2434cat <<_ASUNAME
2435## --------- ##
2436## Platform. ##
2437## --------- ##
2438
2439hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2440uname -m = `(uname -m) 2>/dev/null || echo unknown`
2441uname -r = `(uname -r) 2>/dev/null || echo unknown`
2442uname -s = `(uname -s) 2>/dev/null || echo unknown`
2443uname -v = `(uname -v) 2>/dev/null || echo unknown`
2444
2445/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2446/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2447
2448/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2449/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2450/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002452/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2453/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2454/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2455
2456_ASUNAME
2457
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 $as_echo "PATH: $as_dir"
2464 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002466
2467} >&5
2468
2469cat >&5 <<_ACEOF
2470
2471
2472## ----------- ##
2473## Core tests. ##
2474## ----------- ##
2475
2476_ACEOF
2477
2478
2479# Keep a trace of the command line.
2480# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002482# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002484ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002485ac_configure_args0=
2486ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002487ac_must_keep_next=false
2488for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002489do
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 for ac_arg
2491 do
2492 case $ac_arg in
2493 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2494 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2495 | -silent | --silent | --silen | --sile | --sil)
2496 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 esac
2500 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002503 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002505 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002507 case $ac_arg in
2508 *=* | --config-cache | -C | -disable-* | --disable-* \
2509 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2510 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2511 | -with-* | --with-* | -without-* | --without-* | --x)
2512 case "$ac_configure_args0 " in
2513 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2514 esac
2515 ;;
2516 -* ) ac_must_keep_next=true ;;
2517 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002519 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 ;;
2521 esac
2522 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002523done
Matthias Kloseb9621712010-04-24 17:59:49 +00002524{ ac_configure_args0=; unset ac_configure_args0;}
2525{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
2527# When interrupted or exit'd, cleanup temporary files, and complete
2528# config.log. We remove comments because anyway the quotes in there
2529# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530# WARNING: Use '\'' to represent an apostrophe within the trap.
2531# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002532trap 'exit_status=$?
2533 # Save into config.log some information that might help in debugging.
2534 {
2535 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002536
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002537 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002538## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002539## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 echo
2541 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542(
2543 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2544 eval ac_val=\$$ac_var
2545 case $ac_val in #(
2546 *${as_nl}*)
2547 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002548 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2549$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 esac
2551 case $ac_var in #(
2552 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002553 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2554 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 esac ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2560 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 "s/'\''/'\''\\\\'\'''\''/g;
2563 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2564 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002565 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002567 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac |
2569 sort
2570)
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002572
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002574## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 echo
2577 for ac_var in $ac_subst_vars
2578 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 eval ac_val=\$$ac_var
2580 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 done | sort
2585 echo
2586
2587 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002588 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002591 echo
2592 for ac_var in $ac_subst_files
2593 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 eval ac_val=\$$ac_var
2595 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 done | sort
2600 echo
2601 fi
2602
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002604 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002605## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002609 echo
2610 fi
2611 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002612 $as_echo "$as_me: caught signal $ac_signal"
2613 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 rm -f core *.core core.conftest.* &&
2616 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002619for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622ac_signal=0
2623
2624# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002626
Matthias Kloseb9621712010-04-24 17:59:49 +00002627$as_echo "/* confdefs.h */" > confdefs.h
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629# Predefined preprocessor variables.
2630
2631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_NAME "$PACKAGE_NAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_VERSION "$PACKAGE_VERSION"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_STRING "$PACKAGE_STRING"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2649_ACEOF
2650
Matthias Kloseb9621712010-04-24 17:59:49 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_URL "$PACKAGE_URL"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
2656# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002657# Prefer an explicitly selected file to automatically selected ones.
2658ac_site_file1=NONE
2659ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 # We do not want a PATH search for config.site.
2662 case $CONFIG_SITE in #((
2663 -*) ac_site_file1=./$CONFIG_SITE;;
2664 */*) ac_site_file1=$CONFIG_SITE;;
2665 *) ac_site_file1=./$CONFIG_SITE;;
2666 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$prefix/share/config.site
2669 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002670else
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 ac_site_file1=$ac_default_prefix/share/config.site
2672 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002674for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675do
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 test "x$ac_site_file" = xNONE && continue
2677 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2679$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002681 . "$ac_site_file" \
2682 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002685See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686 fi
2687done
2688
2689if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002690 # Some versions of bash will fail to source /dev/null (special files
2691 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2692 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2693 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2694$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2697 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 esac
2699 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002700else
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2702$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 >$cache_file
2704fi
2705
2706# Check that the precious variables saved in the cache have kept the same
2707# value.
2708ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2711 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2713 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 case $ac_old_set,$ac_new_set in
2715 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2717$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 ac_cache_corrupted=: ;;
2719 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002720 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2721$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_cache_corrupted=: ;;
2723 ,);;
2724 *)
2725 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 # differences in whitespace do not lead to failure.
2727 ac_old_val_w=`echo x $ac_old_val`
2728 ac_new_val_w=`echo x $ac_new_val`
2729 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2731$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2732 ac_cache_corrupted=:
2733 else
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2735$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2736 eval $ac_var=\$ac_old_val
2737 fi
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2739$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2740 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2741$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 fi;;
2743 esac
2744 # Pass precious variables to config.status.
2745 if test "$ac_new_set" = set; then
2746 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002747 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 *) ac_arg=$ac_var=$ac_new_val ;;
2749 esac
2750 case " $ac_configure_args " in
2751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 esac
2754 fi
2755done
2756if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2758$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2760$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002761 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002763## -------------------- ##
2764## Main body of script. ##
2765## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002766
Guido van Rossum7f43da71994-08-01 12:15:30 +00002767ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002769ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2770ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2771ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002772
Guido van Rossum627b2d71993-12-24 10:39:16 +00002773
Michael W. Hudson54241132001-12-07 15:38:26 +00002774
Trent Nelson4d4ec652012-10-16 08:51:24 -04002775
Trent Nelson5595ab52012-10-17 04:47:31 -04002776if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002777 # If we're building out-of-tree, we need to make sure the following
2778 # resources get picked up before their $srcdir counterparts.
2779 # Objects/ -> typeslots.inc
2780 # Include/ -> Python-ast.h, graminit.h
2781 # Python/ -> importlib.h
2782 # (A side effect of this is that these resources will automatically be
2783 # regenerated when building out-of-tree, regardless of whether or not
2784 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2785 # off.)
2786 BASECPPFLAGS="-IObjects -IInclude -IPython"
2787else
2788 BASECPPFLAGS=""
2789fi
2790
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791
2792
2793
2794
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002795if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002796then
2797# Extract the first word of "hg", so it can be a program name with args.
2798set dummy hg; ac_word=$2
2799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002801if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 $as_echo_n "(cached) " >&6
2803else
2804 if test -n "$HAS_HG"; then
2805 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2806else
2807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2808for as_dir in $PATH
2809do
2810 IFS=$as_save_IFS
2811 test -z "$as_dir" && as_dir=.
2812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002814 ac_cv_prog_HAS_HG="found"
2815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2816 break 2
2817 fi
2818done
2819 done
2820IFS=$as_save_IFS
2821
2822 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2823fi
2824fi
2825HAS_HG=$ac_cv_prog_HAS_HG
2826if test -n "$HAS_HG"; then
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2828$as_echo "$HAS_HG" >&6; }
2829else
2830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2831$as_echo "no" >&6; }
2832fi
2833
2834
2835else
2836HAS_HG=no-repository
2837fi
2838if test $HAS_HG = found
2839then
2840 HGVERSION="hg id -i \$(srcdir)"
2841 HGTAG="hg id -t \$(srcdir)"
2842 HGBRANCH="hg id -b \$(srcdir)"
2843else
2844 HGVERSION=""
2845 HGTAG=""
2846 HGBRANCH=""
2847fi
2848
2849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002850ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002851
2852
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002853ac_aux_dir=
2854for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2855 if test -f "$ac_dir/install-sh"; then
2856 ac_aux_dir=$ac_dir
2857 ac_install_sh="$ac_aux_dir/install-sh -c"
2858 break
2859 elif test -f "$ac_dir/install.sh"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/install.sh -c"
2862 break
2863 elif test -f "$ac_dir/shtool"; then
2864 ac_aux_dir=$ac_dir
2865 ac_install_sh="$ac_aux_dir/shtool install -c"
2866 break
2867 fi
2868done
2869if test -z "$ac_aux_dir"; then
2870 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2871fi
2872
2873# These three variables are undocumented and unsupported,
2874# and are intended to be withdrawn in a future Autoconf release.
2875# They can cause serious problems if a builder's source tree is in a directory
2876# whose full name contains unusual characters.
2877ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2878ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2879ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2880
2881
2882# Make sure we can run config.sub.
2883$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2884 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2887$as_echo_n "checking build system type... " >&6; }
2888if ${ac_cv_build+:} false; then :
2889 $as_echo_n "(cached) " >&6
2890else
2891 ac_build_alias=$build_alias
2892test "x$ac_build_alias" = x &&
2893 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2894test "x$ac_build_alias" = x &&
2895 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2896ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2897 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2898
2899fi
2900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2901$as_echo "$ac_cv_build" >&6; }
2902case $ac_cv_build in
2903*-*-*) ;;
2904*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2905esac
2906build=$ac_cv_build
2907ac_save_IFS=$IFS; IFS='-'
2908set x $ac_cv_build
2909shift
2910build_cpu=$1
2911build_vendor=$2
2912shift; shift
2913# Remember, the first character of IFS is used to create $*,
2914# except with old shells:
2915build_os=$*
2916IFS=$ac_save_IFS
2917case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2918
2919
2920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2921$as_echo_n "checking host system type... " >&6; }
2922if ${ac_cv_host+:} false; then :
2923 $as_echo_n "(cached) " >&6
2924else
2925 if test "x$host_alias" = x; then
2926 ac_cv_host=$ac_cv_build
2927else
2928 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2929 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2930fi
2931
2932fi
2933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2934$as_echo "$ac_cv_host" >&6; }
2935case $ac_cv_host in
2936*-*-*) ;;
2937*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2938esac
2939host=$ac_cv_host
2940ac_save_IFS=$IFS; IFS='-'
2941set x $ac_cv_host
2942shift
2943host_cpu=$1
2944host_vendor=$2
2945shift; shift
2946# Remember, the first character of IFS is used to create $*,
2947# except with old shells:
2948host_os=$*
2949IFS=$ac_save_IFS
2950case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2951
2952
2953
doko@python.orga10e4a92013-01-25 18:45:12 +01002954
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
2962 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002972 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 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Larry Hastingsf5002bd2014-03-16 23:05:59 -07002996VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026
3027
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033
3034
3035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003037
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003038# Arguments passed to configure.
3039
3040CONFIG_ARGS="$ac_configure_args"
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3043$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003045if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 case $enableval in
3048 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049 # Locate the best usable SDK, see Mac/README.txt for more
3050 # information
3051 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003052 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3055 if test ! -d "${enableval}"
3056 then
3057 enableval=/
3058 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 ;;
3061 esac
3062 case $enableval in
3063 no)
3064 UNIVERSALSDK=
3065 enable_universalsdk=
3066 ;;
3067 *)
3068 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 if test ! -d "${UNIVERSALSDK}"
3070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003071 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 ;;
3074 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077else
3078
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084if test -n "${UNIVERSALSDK}"
3085then
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3087$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088else
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097# For backward compatibility reasons we prefer to select '32-bit' if available,
3098# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100if test "`uname -s`" = "Darwin"
3101then
3102 if test -n "${UNIVERSALSDK}"
3103 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003104 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003105 then
3106 UNIVERSAL_ARCHS="intel"
3107 fi
3108 fi
3109fi
3110
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3113$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118 UNIVERSAL_ARCHS="$withval"
3119
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120fi
3121
Ned Deily87adb6e2013-10-18 21:09:56 -07003122if test -n "${UNIVERSALSDK}"
3123then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3125$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131
3132# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134 withval=$with_framework_name;
3135 PYTHONFRAMEWORK=${withval}
3136 PYTHONFRAMEWORKDIR=${withval}.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3138
3139else
3140
3141 PYTHONFRAMEWORK=Python
3142 PYTHONFRAMEWORKDIR=Python.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3144
3145fi
3146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003150 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003151 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003152 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 esac
3154 case $enableval in
3155 no)
3156 PYTHONFRAMEWORK=
3157 PYTHONFRAMEWORKDIR=no-framework
3158 PYTHONFRAMEWORKPREFIX=
3159 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST=
3161 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 FRAMEWORKALTINSTALLFIRST=
3163 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003164 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 if test "x${prefix}" = "xNONE"; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003171 ;;
3172 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003176 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003177 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3178 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE" ; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 else
3186 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3187 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
3189 case "${enableval}" in
3190 /System*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 if test "${prefix}" = "NONE" ; then
3193 # See below
3194 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3195 fi
3196 ;;
3197
3198 /Library*)
3199 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3200 ;;
3201
3202 */Library/Frameworks)
3203 MDIR="`dirname "${enableval}"`"
3204 MDIR="`dirname "${MDIR}"`"
3205 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3206
3207 if test "${prefix}" = "NONE"; then
3208 # User hasn't specified the
3209 # --prefix option, but wants to install
3210 # the framework in a non-default location,
3211 # ensure that the compatibility links get
3212 # installed relative to that prefix as well
3213 # instead of in /usr/local.
3214 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3215 fi
3216 ;;
3217
3218 *)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 ;;
3221 esac
3222
Jack Jansen127e56e2001-09-11 14:41:54 +00003223 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3232
3233 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Guido van Rossum563e7081996-09-10 18:20:48 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE" ; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansene578a632001-08-15 01:27:14 +00003253 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256fi
3257
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
3259
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
3261
3262
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265
3266
3267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003273## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
3287 *-*-linux*)
3288 ac_sys_system=Linux
3289 ;;
3290 *-*-cygwin*)
3291 ac_sys_system=Cygwin
3292 ;;
3293 *)
3294 # for now, limit cross builds to known configurations
3295 MACHDEP="unknown"
3296 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3297 esac
3298 ac_sys_release=
3299 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003301 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003302 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003303 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 fi
3308 ac_md_system=`echo $ac_sys_system |
3309 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3310 ac_md_release=`echo $ac_sys_release |
3311 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3312 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003313
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003315 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003316 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003317 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003318 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003319 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321fi
Guido van Rossum91922671997-10-09 20:24:13 +00003322
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003323
3324if test "$cross_compiling" = yes; then
3325 case "$host" in
3326 *-*-linux*)
3327 case "$host_cpu" in
3328 arm*)
3329 _host_cpu=arm
3330 ;;
3331 *)
3332 _host_cpu=$host_cpu
3333 esac
3334 ;;
3335 *-*-cygwin*)
3336 _host_cpu=
3337 ;;
3338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3344fi
3345
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3347# disable features if it is defined, without any means to access these
3348# features as extensions. For these systems, we skip the definition of
3349# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3350# some feature, make sure there is no alternative way to access this
3351# feature. Also, when using wildcards, make sure you have verified the
3352# need for not defining _XOPEN_SOURCE on all systems matching the
3353# wildcard, and that the wildcard does not include future systems
3354# (which may remove their limitations).
3355case $ac_sys_system/$ac_sys_release in
3356 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3357 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003358 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003359 # In addition, Stefan Krah confirms that issue #1244610 exists through
3360 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003361 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003362 define_xopen_source=no
3363 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3364 # also defined. This can be overridden by defining _BSD_SOURCE
3365 # As this has a different meaning on Linux, only define it on OpenBSD
3366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003368
3369 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003370 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003371 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3372 # also defined. This can be overridden by defining _BSD_SOURCE
3373 # As this has a different meaning on Linux, only define it on OpenBSD
3374
Matthias Kloseb9621712010-04-24 17:59:49 +00003375$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003376
3377 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003378 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3379 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3380 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003381 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 +00003382 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003383 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3384 # request to enable features supported by the standard as a request
3385 # to disable features not supported by the standard. The best way
3386 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3387 # entirely and define __EXTENSIONS__ instead.
3388 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003389 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3391 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003392 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003393 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 define_xopen_source=no;;
3395 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003396 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003398 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003399 # On FreeBSD 4, the math functions C89 does not cover are never defined
3400 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3401 FreeBSD/4.*)
3402 define_xopen_source=no;;
3403 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3404 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3405 # identifies itself as Darwin/7.*
3406 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3407 # disables platform specific features beyond repair.
3408 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3409 # has no effect, don't bother defining them
3410 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003411 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003412 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003413 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003414 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3415 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3416 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003417 AIX/4)
3418 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003419 AIX/5)
3420 if test `uname -r` -eq 1; then
3421 define_xopen_source=no
3422 fi
3423 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003424 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3425 # defining NI_NUMERICHOST.
3426 QNX/6.3.2)
3427 define_xopen_source=no
3428 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Guido van Rossum91922671997-10-09 20:24:13 +00003467#
3468# SGI compilers allow the specification of the both the ABI and the
3469# ISA on the command line. Depending on the values of these switches,
3470# different and often incompatable code will be generated.
3471#
3472# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3473# thus supply support for various ABI/ISA combinations. The MACHDEP
3474# variable is also adjusted.
3475#
3476
3477if test ! -z "$SGI_ABI"
3478then
3479 CC="cc $SGI_ABI"
3480 LDFLAGS="$SGI_ABI $LDFLAGS"
3481 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3484$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3487# it may influence the way we can build extensions, so distutils
3488# needs to check it
3489
Thomas Wouters477c8d52006-05-27 19:21:47 +00003490
Jack Jansen6b08a402004-06-03 12:41:45 +00003491CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003492EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003493
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003495
3496# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3497# for debug/optimization stuff. BASECFLAGS is for flags that are required
3498# just to get things to compile and link. Users are free to override OPT
3499# when running configure or make. The build should not break if they do.
3500# BASECFLAGS should generally not be messed with, however.
3501
3502# XXX shouldn't some/most/all of this code be merged with the stuff later
3503# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3505$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003511 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003512 without_gcc=yes;;
3513 yes) CC=gcc
3514 without_gcc=no;;
3515 *) CC=$withval
3516 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003520 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003521 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003522 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003523 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003524 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525fi
3526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3528$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $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 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $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 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # 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 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $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 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $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 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $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 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 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 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004393
4394
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4396$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004399if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
4402 case $withval in
4403 no) with_cxx_main=no
4404 MAINCC='$(CC)';;
4405 yes) with_cxx_main=yes
4406 MAINCC='$(CXX)';;
4407 *) with_cxx_main=yes
4408 MAINCC=$withval
4409 if test -z "$CXX"
4410 then
4411 CXX=$withval
4412 fi;;
4413 esac
4414else
4415
4416 with_cxx_main=no
4417 MAINCC='$(CC)'
4418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419fi
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4422$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004423
4424preset_cxx="$CXX"
4425if test -z "$CXX"
4426then
4427 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004428 gcc) if test -n "$ac_tool_prefix"; then
4429 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4430set dummy ${ac_tool_prefix}g++; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if ${ac_cv_path_CXX+:} false; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 case $CXX in
4437 [\\/]* | ?:[\\/]*)
4438 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004448 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2
4451 fi
4452done
4453 done
4454IFS=$as_save_IFS
4455
4456 ;;
4457esac
4458fi
4459CXX=$ac_cv_path_CXX
4460if test -n "$CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4462$as_echo "$CXX" >&6; }
4463else
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469fi
4470if test -z "$ac_cv_path_CXX"; then
4471 ac_pt_CXX=$CXX
4472 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004473set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004476if ${ac_cv_path_ac_pt_CXX+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478else
4479 case $ac_pt_CXX in
4480 [\\/]* | ?:[\\/]*)
4481 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4482 ;;
4483 *)
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in notfound
4486do
4487 IFS=$as_save_IFS
4488 test -z "$as_dir" && as_dir=.
4489 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004491 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493 break 2
4494 fi
4495done
4496 done
4497IFS=$as_save_IFS
4498
4499 ;;
4500esac
4501fi
4502ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4503if test -n "$ac_pt_CXX"; then
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4505$as_echo "$ac_pt_CXX" >&6; }
4506else
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511 if test "x$ac_pt_CXX" = x; then
4512 CXX="g++"
4513 else
4514 case $cross_compiling:$ac_tool_warned in
4515yes:)
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4518ac_tool_warned=yes ;;
4519esac
4520 CXX=$ac_pt_CXX
4521 fi
4522else
4523 CXX="$ac_cv_path_CXX"
4524fi
4525 ;;
4526 cc) if test -n "$ac_tool_prefix"; then
4527 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4528set dummy ${ac_tool_prefix}c++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004533else
4534 case $CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004546 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 break 2
4549 fi
4550done
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004552IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554 ;;
4555esac
4556fi
4557CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561else
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004566
4567fi
4568if test -z "$ac_cv_path_CXX"; then
4569 ac_pt_CXX=$CXX
4570 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004575 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004578 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004579 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 +00004580 ;;
4581 *)
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in notfound
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591 break 2
4592 fi
4593done
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597 ;;
4598esac
4599fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004600ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4601if test -n "$ac_pt_CXX"; then
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4603$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604else
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4606$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004608
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004609 if test "x$ac_pt_CXX" = x; then
4610 CXX="c++"
4611 else
4612 case $cross_compiling:$ac_tool_warned in
4613yes:)
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4616ac_tool_warned=yes ;;
4617esac
4618 CXX=$ac_pt_CXX
4619 fi
4620else
4621 CXX="$ac_cv_path_CXX"
4622fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624 clang|*/clang) if test -n "$ac_tool_prefix"; then
4625 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4626set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_CXX+:} false; then :
4630 $as_echo_n "(cached) " >&6
4631else
4632 case $CXX in
4633 [\\/]* | ?:[\\/]*)
4634 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4635 ;;
4636 *)
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in notfound
4639do
4640 IFS=$as_save_IFS
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004644 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4647 fi
4648done
4649 done
4650IFS=$as_save_IFS
4651
Ned Deilycbfb9a52012-06-23 16:02:19 -07004652 ;;
4653esac
4654fi
4655CXX=$ac_cv_path_CXX
4656if test -n "$CXX"; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4658$as_echo "$CXX" >&6; }
4659else
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664
4665fi
4666if test -z "$ac_cv_path_CXX"; then
4667 ac_pt_CXX=$CXX
4668 # Extract the first word of "clang++", so it can be a program name with args.
4669set dummy clang++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_ac_pt_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $ac_pt_CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4699if test -n "$ac_pt_CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4701$as_echo "$ac_pt_CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707 if test "x$ac_pt_CXX" = x; then
4708 CXX="clang++"
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711yes:)
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714ac_tool_warned=yes ;;
4715esac
4716 CXX=$ac_pt_CXX
4717 fi
4718else
4719 CXX="$ac_cv_path_CXX"
4720fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004721 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722 esac
4723 if test "$CXX" = "notfound"
4724 then
4725 CXX=""
4726 fi
4727fi
4728if test -z "$CXX"
4729then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 if test -n "$ac_tool_prefix"; then
4731 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4732 do
4733 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004737if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739else
4740 if test -n "$CXX"; then
4741 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4742else
4743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 break 2
4753 fi
4754done
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004756IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757
4758fi
4759fi
4760CXX=$ac_cv_prog_CXX
4761if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4763$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767fi
4768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004769
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004770 test -n "$CXX" && break
4771 done
4772fi
4773if test -z "$CXX"; then
4774 ac_ct_CXX=$CXX
4775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4776do
4777 # Extract the first word of "$ac_prog", so it can be a program name with args.
4778set dummy $ac_prog; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
4781if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 if test -n "$ac_ct_CXX"; then
4785 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4786else
4787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
4792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_prog_ac_ct_CXX="$ac_prog"
4795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796 break 2
4797 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 done
4800IFS=$as_save_IFS
4801
4802fi
4803fi
4804ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4805if test -n "$ac_ct_CXX"; then
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4807$as_echo "$ac_ct_CXX" >&6; }
4808else
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814 test -n "$ac_ct_CXX" && break
4815done
4816
4817 if test "x$ac_ct_CXX" = x; then
4818 CXX="notfound"
4819 else
4820 case $cross_compiling:$ac_tool_warned in
4821yes:)
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4824ac_tool_warned=yes ;;
4825esac
4826 CXX=$ac_ct_CXX
4827 fi
4828fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
4830 if test "$CXX" = "notfound"
4831 then
4832 CXX=""
4833 fi
4834fi
4835if test "$preset_cxx" != "$CXX"
4836then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004837 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838
4839 By default, distutils will build C++ extension modules with \"$CXX\".
4840 If this is not intended, then set CXX on the configure command line.
4841 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004842$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 By default, distutils will build C++ extension modules with \"$CXX\".
4845 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847fi
4848
4849
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4851$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4852save_LDFLAGS="$LDFLAGS"
4853LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004854
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856/* end confdefs.h. */
4857
4858int
4859main ()
4860{
4861
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866if ac_fn_c_try_link "$LINENO"; then :
4867 NO_AS_NEEDED="-Wl,--no-as-needed"
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869$as_echo "yes" >&6; }
4870else
4871 NO_AS_NEEDED=""
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875rm -f core conftest.err conftest.$ac_objext \
4876 conftest$ac_exeext conftest.$ac_ext
4877LDFLAGS="$save_LDFLAGS"
4878
4879
4880
4881# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004882ac_ext=c
4883ac_cpp='$CPP $CPPFLAGS'
4884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4888$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004889# On Suns, sometimes $CPP names a directory.
4890if test -n "$CPP" && test -d "$CPP"; then
4891 CPP=
4892fi
4893if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004894 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 # Double quotes because CPP needs to be expanded
4898 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4899 do
4900 ac_preproc_ok=false
4901for ac_c_preproc_warn_flag in '' yes
4902do
4903 # Use a header file that comes with gcc, so configuring glibc
4904 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004905 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4906 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004910/* end confdefs.h. */
4911#ifdef __STDC__
4912# include <limits.h>
4913#else
4914# include <assert.h>
4915#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004916 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004919
Matthias Kloseb9621712010-04-24 17:59:49 +00004920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Broken: fails on valid input.
4922continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004923fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004924rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004930#include <ac_nonexistent.h>
4931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: success on invalid input.
4934continue
4935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Passes both tests.
4937ac_preproc_ok=:
4938break
4939fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004940rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004941
4942done
4943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 break
4947fi
4948
4949 done
4950 ac_cv_prog_CPP=$CPP
4951
4952fi
4953 CPP=$ac_cv_prog_CPP
4954else
4955 ac_cv_prog_CPP=$CPP
4956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4958$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004959ac_preproc_ok=false
4960for ac_c_preproc_warn_flag in '' yes
4961do
4962 # Use a header file that comes with gcc, so configuring glibc
4963 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4965 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 # On the NeXT, cc -E runs the code through the compiler's parser,
4967 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004969/* end confdefs.h. */
4970#ifdef __STDC__
4971# include <limits.h>
4972#else
4973# include <assert.h>
4974#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004975 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004977if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # Broken: fails on valid input.
4981continue
4982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004983rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004989#include <ac_nonexistent.h>
4990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Broken: success on invalid input.
4993continue
4994else
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 # Passes both tests.
4996ac_preproc_ok=:
4997break
4998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005000
5001done
5002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005004if $ac_preproc_ok; then :
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006else
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005010See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005011fi
5012
5013ac_ext=c
5014ac_cpp='$CPP $CPPFLAGS'
5015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5017ac_compiler_gnu=$ac_cv_c_compiler_gnu
5018
5019
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5021$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 # Loop through the user's path and test for each of PROGNAME-LIST
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_prog in grep ggrep; do
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005036 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005037# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 # Check for GNU $ac_path_GREP
5039case `"$ac_path_GREP" --version 2>&1` in
5040*GNU*)
5041 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5042*)
5043 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 while :
5046 do
5047 cat "conftest.in" "conftest.in" >"conftest.tmp"
5048 mv "conftest.tmp" "conftest.in"
5049 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5052 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5055 # Best one so far, save it but keep looking for a better one
5056 ac_cv_path_GREP="$ac_path_GREP"
5057 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005058 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 # 10*(2^10) chars as input seems more than enough
5060 test $ac_count -gt 10 && break
5061 done
5062 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5063esac
5064
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $ac_path_GREP_found && break 3
5066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005071 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073else
5074 ac_cv_path_GREP=$GREP
5075fi
5076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5079$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 GREP="$ac_cv_path_GREP"
5081
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5084$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5089 then ac_cv_path_EGREP="$GREP -E"
5090 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 # Loop through the user's path and test for each of PROGNAME-LIST
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_prog in egrep; do
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005103# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104 # Check for GNU $ac_path_EGREP
5105case `"$ac_path_EGREP" --version 2>&1` in
5106*GNU*)
5107 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5108*)
5109 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111 while :
5112 do
5113 cat "conftest.in" "conftest.in" >"conftest.tmp"
5114 mv "conftest.tmp" "conftest.in"
5115 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5121 # Best one so far, save it but keep looking for a better one
5122 ac_cv_path_EGREP="$ac_path_EGREP"
5123 ac_path_EGREP_max=$ac_count
5124 fi
5125 # 10*(2^10) chars as input seems more than enough
5126 test $ac_count -gt 10 && break
5127 done
5128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5129esac
5130
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $ac_path_EGREP_found && break 3
5132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005137 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 +00005138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139else
5140 ac_cv_path_EGREP=$EGREP
5141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 fi
5144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5146$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148
5149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5151$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
5154else
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005156/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005157#include <stdlib.h>
5158#include <stdarg.h>
5159#include <string.h>
5160#include <float.h>
5161
5162int
5163main ()
5164{
5165
5166 ;
5167 return 0;
5168}
5169_ACEOF
5170if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_header_stdc=yes
5172else
5173 ac_cv_header_stdc=no
5174fi
5175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5176
5177if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180/* end confdefs.h. */
5181#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005182
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005183_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187else
Matthias Kloseb9621712010-04-24 17:59:49 +00005188 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005190rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191
Matthias Kloseb9621712010-04-24 17:59:49 +00005192fi
5193
5194if test $ac_cv_header_stdc = yes; then
5195 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198#include <stdlib.h>
5199
5200_ACEOF
5201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5202 $EGREP "free" >/dev/null 2>&1; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f conftest*
5208
5209fi
5210
5211if test $ac_cv_header_stdc = yes; then
5212 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213 if test "$cross_compiling" = yes; then :
5214 :
5215else
5216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217/* end confdefs.h. */
5218#include <ctype.h>
5219#include <stdlib.h>
5220#if ((' ' & 0x0FF) == 0x020)
5221# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5222# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5223#else
5224# define ISLOWER(c) \
5225 (('a' <= (c) && (c) <= 'i') \
5226 || ('j' <= (c) && (c) <= 'r') \
5227 || ('s' <= (c) && (c) <= 'z'))
5228# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5229#endif
5230
5231#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5232int
5233main ()
5234{
5235 int i;
5236 for (i = 0; i < 256; i++)
5237 if (XOR (islower (i), ISLOWER (i))
5238 || toupper (i) != TOUPPER (i))
5239 return 2;
5240 return 0;
5241}
5242_ACEOF
5243if ac_fn_c_try_run "$LINENO"; then :
5244
5245else
5246 ac_cv_header_stdc=no
5247fi
5248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5249 conftest.$ac_objext conftest.beam conftest.$ac_ext
5250fi
5251
5252fi
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5255$as_echo "$ac_cv_header_stdc" >&6; }
5256if test $ac_cv_header_stdc = yes; then
5257
5258$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5259
5260fi
5261
5262# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5263for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5264 inttypes.h stdint.h unistd.h
5265do :
5266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5267ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5268"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005269if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005270 cat >>confdefs.h <<_ACEOF
5271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5272_ACEOF
5273
5274fi
5275
5276done
5277
5278
5279
5280 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 +02005281if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 MINIX=yes
5283else
5284 MINIX=
5285fi
5286
5287
5288 if test "$MINIX" = yes; then
5289
5290$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5291
5292
5293$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5294
5295
5296$as_echo "#define _MINIX 1" >>confdefs.h
5297
5298 fi
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5302$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005303if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 $as_echo_n "(cached) " >&6
5305else
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307/* end confdefs.h. */
5308
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005309# define __EXTENSIONS__ 1
5310 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
5318_ACEOF
5319if ac_fn_c_try_compile "$LINENO"; then :
5320 ac_cv_safe_to_define___extensions__=yes
5321else
5322 ac_cv_safe_to_define___extensions__=no
5323fi
5324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5325fi
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5327$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5328 test $ac_cv_safe_to_define___extensions__ = yes &&
5329 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5330
5331 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5332
5333 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5334
5335 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5336
5337 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5338
5339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341# Check for unsupported systems
5342case $ac_sys_system/$ac_sys_release in
5343atheos*|Linux*/1*)
5344 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5345 echo See README for details.
5346 exit 1;;
5347esac
5348
5349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5351$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005354if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 withval=$with_suffix;
5356 case $withval in
5357 no) EXEEXT=;;
5358 yes) EXEEXT=.exe;;
5359 *) EXEEXT=$withval;;
5360 esac
5361fi
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5364$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366# Test whether we're running on a non-case-sensitive system, in which
5367# case we give a warning if no ext is given
5368
Matthias Kloseb9621712010-04-24 17:59:49 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5370$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371if test ! -d CaseSensitiveTestDir; then
5372mkdir CaseSensitiveTestDir
5373fi
5374
5375if test -d casesensitivetestdir
5376then
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5378$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 BUILDEXEEXT=.exe
5380else
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=$EXEEXT
5384fi
5385rmdir CaseSensitiveTestDir
5386
5387case $MACHDEP in
5388bsdos*)
5389 case $CC in
5390 gcc) CC="$CC -D_HAVE_BSDI";;
5391 esac;;
5392esac
5393
5394case $ac_sys_system in
5395hp*|HP*)
5396 case $CC in
5397 cc|*/cc) CC="$CC -Ae";;
5398 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399esac
5400
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005401MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5402
5403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405
Matthias Kloseb9621712010-04-24 17:59:49 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5407$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408if test -z "$LIBRARY"
5409then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005410 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5413$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415# LDLIBRARY is the name of the library to link against (as opposed to the
5416# name of the library into which to insert object files). BLDLIBRARY is also
5417# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5418# is blank as the main program is not linked directly against LDLIBRARY.
5419# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5420# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5421# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5422# DLLLIBRARY is the shared (i.e., DLL) library.
5423#
5424# RUNSHARED is used to run shared python without installed libraries
5425#
5426# INSTSONAME is the name of the shared library that will be use to install
5427# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005428#
5429# LDVERSION is the shared library version number, normally the Python version
5430# with the ABI build flags appended.
5431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433
5434
5435
5436
5437
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439LDLIBRARY="$LIBRARY"
5440BLDLIBRARY='$(LDLIBRARY)'
5441INSTSONAME='$(LDLIBRARY)'
5442DLLLIBRARY=''
5443LDLIBRARYDIR=''
5444RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005445LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447# LINKCC is the command that links the python executable -- default is $(CC).
5448# If CXX is set, and if it is needed to link a main function that was
5449# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5450# python might then depend on the C++ runtime
5451# This is altered for AIX in order to build the export list before
5452# linking.
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5455$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456if test -z "$LINKCC"
5457then
5458 LINKCC='$(PURIFY) $(MAINCC)'
5459 case $ac_sys_system in
5460 AIX*)
5461 exp_extra="\"\""
5462 if test $ac_sys_release -ge 5 -o \
5463 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5464 exp_extra="."
5465 fi
5466 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467 QNX*)
5468 # qcc must be used because the other compilers do not
5469 # support -N.
5470 LINKCC=qcc;;
5471 esac
5472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5474$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5477# make sure we default having it set to "no": this is used by
5478# distutils.unixccompiler to know if it should add --enable-new-dtags
5479# to linker command lines, and failing to detect GNU ld simply results
5480# in the same bahaviour as before.
5481
Matthias Kloseb9621712010-04-24 17:59:49 +00005482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5483$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484ac_prog=ld
5485if test "$GCC" = yes; then
5486 ac_prog=`$CC -print-prog-name=ld`
5487fi
5488case `"$ac_prog" -V 2>&1 < /dev/null` in
5489 *GNU*)
5490 GNULD=yes;;
5491 *)
5492 GNULD=no;;
5493esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5495$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5498$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005499if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500 $as_echo_n "(cached) " >&6
5501else
5502 ac_cv_c_inline=no
5503for ac_kw in inline __inline__ __inline; do
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#ifndef __cplusplus
5507typedef int foo_t;
5508static $ac_kw foo_t static_foo () {return 0; }
5509$ac_kw foo_t foo () {return 0; }
5510#endif
5511
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"; then :
5514 ac_cv_c_inline=$ac_kw
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 test "$ac_cv_c_inline" != no && break
5518done
5519
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5522$as_echo "$ac_cv_c_inline" >&6; }
5523
5524case $ac_cv_c_inline in
5525 inline | yes) ;;
5526 *)
5527 case $ac_cv_c_inline in
5528 no) ac_val=;;
5529 *) ac_val=$ac_cv_c_inline;;
5530 esac
5531 cat >>confdefs.h <<_ACEOF
5532#ifndef __cplusplus
5533#define inline $ac_val
5534#endif
5535_ACEOF
5536 ;;
5537esac
5538
5539if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005540
5541$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005542
5543
5544fi
5545
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5548$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 enableval=$enable_shared;
5552fi
5553
5554
5555if test -z "$enable_shared"
5556then
5557 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005558 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 enable_shared="yes";;
5560 *)
5561 enable_shared="no";;
5562 esac
5563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5565$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5568$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005570if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005571 enableval=$enable_profiling;
5572fi
5573
5574if test "x$enable_profiling" = xyes; then
5575 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005576 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578/* end confdefs.h. */
5579int main() { return 0; }
5580_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581if ac_fn_c_try_link "$LINENO"; then :
5582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005584 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005586rm -f core conftest.err conftest.$ac_objext \
5587 conftest$ac_exeext conftest.$ac_ext
5588 CC="$ac_save_cc"
5589else
5590 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5593$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if test "x$enable_profiling" = xyes; then
5596 BASECFLAGS="-pg $BASECFLAGS"
5597 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
5599
Matthias Kloseb9621712010-04-24 17:59:49 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5601$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5604# library that we build, but we do not want to link against it (we
5605# will find it with a -framework option). For this reason there is an
5606# extra variable BLDLIBRARY against which Python and the extension
5607# modules are linked, BLDLIBRARY. This is normally the same as
5608# LDLIBRARY, but empty for MacOSX framework builds.
5609if test "$enable_framework"
5610then
5611 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005612 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 BLDLIBRARY=''
5614else
5615 BLDLIBRARY='$(LDLIBRARY)'
5616fi
5617
5618# Other platforms follow
5619if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005620 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624 case $ac_sys_system in
5625 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).dll.a'
5627 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628 ;;
5629 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
5631 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005632 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005634 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005635 then
5636 PY3LIBRARY=libpython3.so
5637 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005639 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005642 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 case $ac_sys_system in
5644 FreeBSD*)
5645 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5646 ;;
5647 esac
5648 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005649 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005650 then
5651 PY3LIBRARY=libpython3.so
5652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 ;;
5654 hp*|HP*)
5655 case `uname -m` in
5656 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
5662 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005664 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).dylib'
5668 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005669 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005672 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676 esac
5677else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005678 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 case $ac_sys_system in
5680 CYGWIN*)
5681 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
5684 esac
5685fi
5686
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005687if test "$cross_compiling" = yes; then
5688 RUNSHARED=
5689fi
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5692$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694if test -n "$ac_tool_prefix"; then
5695 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5696set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005699if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701else
5702 if test -n "$RANLIB"; then
5703 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 break 2
5715 fi
5716done
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718IFS=$as_save_IFS
5719
5720fi
5721fi
5722RANLIB=$ac_cv_prog_RANLIB
5723if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5725$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731
5732fi
5733if test -z "$ac_cv_prog_RANLIB"; then
5734 ac_ct_RANLIB=$RANLIB
5735 # Extract the first word of "ranlib", so it can be a program name with args.
5736set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005739if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741else
5742 if test -n "$ac_ct_RANLIB"; then
5743 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 break 2
5755 fi
5756done
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758IFS=$as_save_IFS
5759
5760fi
5761fi
5762ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5763if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5765$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
5770
5771 if test "x$ac_ct_RANLIB" = x; then
5772 RANLIB=":"
5773 else
5774 case $cross_compiling:$ac_tool_warned in
5775yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_tool_warned=yes ;;
5779esac
5780 RANLIB=$ac_ct_RANLIB
5781 fi
5782else
5783 RANLIB="$ac_cv_prog_RANLIB"
5784fi
5785
5786
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005787if test -n "$ac_tool_prefix"; then
5788 for ac_prog in ar aal
5789 do
5790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005794if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796else
5797 if test -n "$AR"; then
5798 ac_cv_prog_AR="$AR" # Let the user override the test.
5799else
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 break 2
5810 fi
5811done
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813IFS=$as_save_IFS
5814
5815fi
5816fi
5817AR=$ac_cv_prog_AR
5818if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5820$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005827 test -n "$AR" && break
5828 done
5829fi
5830if test -z "$AR"; then
5831 ac_ct_AR=$AR
5832 for ac_prog in ar aal
5833do
5834 # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_prog_ac_ct_AR+:} false; then :
5839 $as_echo_n "(cached) " >&6
5840else
5841 if test -n "$ac_ct_AR"; then
5842 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5843else
5844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
5849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005851 ac_cv_prog_ac_ct_AR="$ac_prog"
5852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853 break 2
5854 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005856 done
5857IFS=$as_save_IFS
5858
5859fi
5860fi
5861ac_ct_AR=$ac_cv_prog_ac_ct_AR
5862if test -n "$ac_ct_AR"; then
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5864$as_echo "$ac_ct_AR" >&6; }
5865else
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871 test -n "$ac_ct_AR" && break
5872done
5873
5874 if test "x$ac_ct_AR" = x; then
5875 AR="ar"
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 AR=$ac_ct_AR
5884 fi
5885fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887
5888# tweak ARFLAGS only if the user didn't set it on the command line
5889
5890if test -z "$ARFLAGS"
5891then
5892 ARFLAGS="rc"
5893fi
5894
doko@ubuntu.com58844492012-06-30 18:25:32 +02005895if test -n "$ac_tool_prefix"; then
5896 for ac_prog in readelf
5897 do
5898 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5899set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_prog_READELF+:} false; then :
5903 $as_echo_n "(cached) " >&6
5904else
5905 if test -n "$READELF"; then
5906 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5907else
5908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005915 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917 break 2
5918 fi
5919done
5920 done
5921IFS=$as_save_IFS
5922
5923fi
5924fi
5925READELF=$ac_cv_prog_READELF
5926if test -n "$READELF"; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5928$as_echo "$READELF" >&6; }
5929else
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935 test -n "$READELF" && break
5936 done
5937fi
5938if test -z "$READELF"; then
5939 ac_ct_READELF=$READELF
5940 for ac_prog in readelf
5941do
5942 # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5947 $as_echo_n "(cached) " >&6
5948else
5949 if test -n "$ac_ct_READELF"; then
5950 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
5957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005959 ac_cv_prog_ac_ct_READELF="$ac_prog"
5960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961 break 2
5962 fi
5963done
5964 done
5965IFS=$as_save_IFS
5966
5967fi
5968fi
5969ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5970if test -n "$ac_ct_READELF"; then
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5972$as_echo "$ac_ct_READELF" >&6; }
5973else
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
5976fi
5977
5978
5979 test -n "$ac_ct_READELF" && break
5980done
5981
5982 if test "x$ac_ct_READELF" = x; then
5983 READELF=":"
5984 else
5985 case $cross_compiling:$ac_tool_warned in
5986yes:)
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5989ac_tool_warned=yes ;;
5990esac
5991 READELF=$ac_ct_READELF
5992 fi
5993fi
5994
5995if test "$cross_compiling" = yes; then
5996 case "$READELF" in
5997 readelf|:)
5998 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5999 ;;
6000 esac
6001fi
6002
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
Matthias Klosec4c48422012-10-21 23:05:35 +02006005for ac_prog in python$PACKAGE_VERSION python3 python
6006do
6007 # Extract the first word of "$ac_prog", so it can be a program name with args.
6008set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006011if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012 $as_echo_n "(cached) " >&6
6013else
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 if test -n "$PYTHON"; then
6015 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
6022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6026 break 2
6027 fi
6028done
6029 done
6030IFS=$as_save_IFS
6031
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006032fi
6033fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006034PYTHON=$ac_cv_prog_PYTHON
6035if test -n "$PYTHON"; then
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6037$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038else
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
Matthias Klosec4c48422012-10-21 23:05:35 +02006044 test -n "$PYTHON" && break
6045done
6046test -n "$PYTHON" || PYTHON="not-found"
6047
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006049 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6050else
6051 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052fi
6053
6054
Kushal Das02d23a22014-04-15 23:50:06 +05306055for ac_prog in python$PACKAGE_VERSION python3 python
6056do
6057 # Extract the first word of "$ac_prog", so it can be a program name with args.
6058set dummy $ac_prog; ac_word=$2
6059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
6061if ${ac_cv_prog_PYTHON+:} false; then :
6062 $as_echo_n "(cached) " >&6
6063else
6064 if test -n "$PYTHON"; then
6065 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
6072 for ac_exec_ext in '' $ac_executable_extensions; do
6073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6074 ac_cv_prog_PYTHON="$ac_prog"
6075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6076 break 2
6077 fi
6078done
6079 done
6080IFS=$as_save_IFS
6081
6082fi
6083fi
6084PYTHON=$ac_cv_prog_PYTHON
6085if test -n "$PYTHON"; then
6086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6087$as_echo "$PYTHON" >&6; }
6088else
6089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
6091fi
6092
6093
6094 test -n "$PYTHON" && break
6095done
6096test -n "$PYTHON" || PYTHON="not-found"
6097
6098if test "$PYTHON" = not-found; then
6099 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6100else
6101 OPCODEHGEN="$PYTHON"
6102fi
6103
6104
6105
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006106case $MACHDEP in
6107bsdos*|hp*|HP*)
6108 # install -d does not work on BSDI or HP-UX
6109 if test -z "$INSTALL"
6110 then
6111 INSTALL="${srcdir}/install-sh -c"
6112 fi
6113esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114# Find a good install program. We prefer a C program (faster),
6115# so one script is as good as another. But avoid the broken or
6116# incompatible versions:
6117# SysV /etc/install, /usr/sbin/install
6118# SunOS /usr/etc/install
6119# IRIX /sbin/install
6120# AIX /bin/install
6121# AmigaOS /C/install, which installs bootblocks on floppy discs
6122# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6123# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6124# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6125# OS/2's system install, which has a completely different semantic
6126# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006127# Reject install programs that cannot install multiple files.
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6129$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006131if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
6134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006139 # Account for people who put trailing slashes in PATH elements.
6140case $as_dir/ in #((
6141 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006143 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144 /usr/ucb/* ) ;;
6145 *)
6146 # OSF1 and SCO ODT 3.0 have their own names for install.
6147 # Don't use installbsd from OSF since it installs stuff as root
6148 # by default.
6149 for ac_prog in ginstall scoinst install; do
6150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006151 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152 if test $ac_prog = install &&
6153 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6154 # AIX install. It has an incompatible calling convention.
6155 :
6156 elif test $ac_prog = install &&
6157 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6158 # program-specific install script used by HP pwplus--don't use.
6159 :
6160 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006161 rm -rf conftest.one conftest.two conftest.dir
6162 echo one > conftest.one
6163 echo two > conftest.two
6164 mkdir conftest.dir
6165 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6166 test -s conftest.one && test -s conftest.two &&
6167 test -s conftest.dir/conftest.one &&
6168 test -s conftest.dir/conftest.two
6169 then
6170 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6171 break 3
6172 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 fi
6174 fi
6175 done
6176 done
6177 ;;
6178esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006179
6180 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181IFS=$as_save_IFS
6182
Matthias Kloseb9621712010-04-24 17:59:49 +00006183rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185fi
6186 if test "${ac_cv_path_install+set}" = set; then
6187 INSTALL=$ac_cv_path_install
6188 else
6189 # As a last resort, use the slow shell script. Don't cache a
6190 # value for INSTALL within a source directory, because that will
6191 # break other packages using the cache if that directory is
6192 # removed, or if the value is a relative name.
6193 INSTALL=$ac_install_sh
6194 fi
6195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6197$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6200# It thinks the first close brace ends the variable substitution.
6201test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6202
6203test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6204
6205test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6206
Matthias Klose93a0ef12012-03-15 18:08:34 +01006207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6208$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6209if test -z "$MKDIR_P"; then
6210 if ${ac_cv_path_mkdir+:} false; then :
6211 $as_echo_n "(cached) " >&6
6212else
6213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6215do
6216 IFS=$as_save_IFS
6217 test -z "$as_dir" && as_dir=.
6218 for ac_prog in mkdir gmkdir; do
6219 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006220 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006221 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6222 'mkdir (GNU coreutils) '* | \
6223 'mkdir (coreutils) '* | \
6224 'mkdir (fileutils) '4.1*)
6225 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6226 break 3;;
6227 esac
6228 done
6229 done
6230 done
6231IFS=$as_save_IFS
6232
6233fi
6234
6235 test -d ./--version && rmdir ./--version
6236 if test "${ac_cv_path_mkdir+set}" = set; then
6237 MKDIR_P="$ac_cv_path_mkdir -p"
6238 else
6239 # As a last resort, use the slow shell script. Don't cache a
6240 # value for MKDIR_P within a source directory, because that will
6241 # break other packages using the cache if that directory is
6242 # removed, or if the value is a relative name.
6243 MKDIR_P="$ac_install_sh -d"
6244 fi
6245fi
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6247$as_echo "$MKDIR_P" >&6; }
6248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250# Not every filesystem supports hard links
6251
6252if test -z "$LN" ; then
6253 case $ac_sys_system in
6254 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006255 *) LN=ln;;
6256 esac
6257fi
6258
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006259# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006260
6261ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006262
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006263# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6265$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266
6267# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006268if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 withval=$with_pydebug;
6270if test "$withval" != no
6271then
6272
Matthias Kloseb9621712010-04-24 17:59:49 +00006273$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6276$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006278 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006279else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281fi
6282else
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6284$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285fi
6286
6287
6288# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6289# merged with this chunk of code?
6290
6291# Optimizer/debugger flags
6292# ------------------------
6293# (The following bit of code is complicated enough - please keep things
6294# indented properly. Just pretend you're editing Python code. ;-)
6295
6296# There are two parallel sets of case statements below, one that checks to
6297# see if OPT was set and one that does BASECFLAGS setting based upon
6298# compiler and platform. BASECFLAGS tweaks need to be made even if the
6299# user set OPT.
6300
6301# tweak OPT based on compiler and platform, only if the user didn't set
6302# it on the command line
6303
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006304if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305then
6306 case $GCC in
6307 yes)
6308 if test "$CC" != 'g++' ; then
6309 STRICT_PROTO="-Wstrict-prototypes"
6310 fi
6311 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6312 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6313 WRAP="-fwrapv"
6314 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006315
6316 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006317 case $CC in
6318 *clang*) WRAP="-fwrapv"
6319 ;;
6320 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 case $ac_cv_prog_cc_g in
6323 yes)
6324 if test "$Py_DEBUG" = 'true' ; then
6325 # Optimization messes up debuggers, so turn it off for
6326 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006327 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 else
6329 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6330 fi
6331 ;;
6332 *)
6333 OPT="-O3 -Wall $STRICT_PROTO"
6334 ;;
6335 esac
6336 case $ac_sys_system in
6337 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6338 ;;
6339 esac
6340 ;;
6341
6342 *)
6343 OPT="-O"
6344 ;;
6345 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346fi
6347
6348
6349
6350# The -arch flags for universal builds on OSX
6351UNIVERSAL_ARCH_FLAGS=
6352
6353
6354# tweak BASECFLAGS based on compiler and platform
6355case $GCC in
6356yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357 # Python doesn't violate C99 aliasing rules, but older versions of
6358 # GCC produce warnings for legal Python code. Enable
6359 # -fno-strict-aliasing on versions of GCC that support but produce
6360 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6362$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006363 ac_save_cc="$CC"
6364 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006365 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006366 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006368else
Matthias Kloseb9621712010-04-24 17:59:49 +00006369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006371
Matthias Kloseb159a552010-04-25 21:00:44 +00006372
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006373int
6374main ()
6375{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006376
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006377 ;
6378 return 0;
6379}
Matthias Kloseb159a552010-04-25 21:00:44 +00006380
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006382if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006383
6384 CC="$ac_save_cc -fstrict-aliasing"
6385 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006387/* end confdefs.h. */
6388
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006389 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006390int
6391main ()
6392{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006393double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006394 ;
6395 return 0;
6396}
Matthias Kloseb159a552010-04-25 21:00:44 +00006397
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006399if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006400
6401 ac_cv_no_strict_aliasing=no
6402
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006403else
Matthias Kloseb159a552010-04-25 21:00:44 +00006404
6405 ac_cv_no_strict_aliasing=yes
6406
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006407fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006409
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006410else
Matthias Kloseb159a552010-04-25 21:00:44 +00006411
6412 ac_cv_no_strict_aliasing=no
6413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006416fi
6417
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006418 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6421$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006422 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 then
6424 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6425 fi
6426
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6428$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6429 ac_save_cc="$CC"
6430 CC="$CC -Wunused-result -Werror"
6431 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006432 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006433 $as_echo_n "(cached) " >&6
6434else
6435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6436/* end confdefs.h. */
6437
6438
6439int
6440main ()
6441{
6442
6443 ;
6444 return 0;
6445}
6446
6447_ACEOF
6448if ac_fn_c_try_compile "$LINENO"; then :
6449
6450 ac_cv_disable_unused_result_warning=yes
6451
6452else
6453
6454 ac_cv_disable_unused_result_warning=no
6455
6456fi
6457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6458fi
6459
6460 CFLAGS="$save_CFLAGS"
6461 CC="$ac_save_cc"
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6463$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6464
6465 if test $ac_cv_disable_unused_result_warning = yes
6466 then
6467 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6468 fi
6469
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6471$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6472 ac_save_cc="$CC"
6473 CC="$CC -Werror=declaration-after-statement"
6474 save_CFLAGS="$CFLAGS"
6475 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6476 $as_echo_n "(cached) " >&6
6477else
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479/* end confdefs.h. */
6480
6481
6482int
6483main ()
6484{
6485
6486 ;
6487 return 0;
6488}
6489
6490_ACEOF
6491if ac_fn_c_try_compile "$LINENO"; then :
6492
6493 ac_cv_declaration_after_statement_warning=yes
6494
6495else
6496
6497 ac_cv_declaration_after_statement_warning=no
6498
6499fi
6500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6501fi
6502
6503 CFLAGS="$save_CFLAGS"
6504 CC="$ac_save_cc"
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6506$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6507
6508 if test $ac_cv_declaration_after_statement_warning = yes
6509 then
6510 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6511 fi
6512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6514 # support. Without this, treatment of subnormals doesn't follow
6515 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006516 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517 alpha*)
6518 BASECFLAGS="$BASECFLAGS -mieee"
6519 ;;
6520 esac
6521
6522 case $ac_sys_system in
6523 SCO_SV*)
6524 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6525 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006526
6527 # is there any other compiler on Darwin besides gcc?
6528 Darwin*)
6529 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6530 # used to be here, but non-Apple gcc doesn't accept them.
6531 if test "${CC}" = gcc
6532 then
6533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006534$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006535 case "${UNIVERSALSDK}" in
6536 */MacOSX10.4u.sdk)
6537 # Build using 10.4 SDK, force usage of gcc when the
6538 # compiler is gcc, otherwise the user will get very
6539 # confusing error messages when building on OSX 10.6
6540 CC=gcc-4.0
6541 CPP=cpp-4.0
6542 ;;
6543 esac
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006545$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006546 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547
Ned Deily87adb6e2013-10-18 21:09:56 -07006548 if test "${enable_universalsdk}"
6549 then
6550 case "$UNIVERSAL_ARCHS" in
6551 32-bit)
6552 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6553 LIPO_32BIT_FLAGS=""
6554 ARCH_RUN_32BIT=""
6555 ;;
6556 64-bit)
6557 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6558 LIPO_32BIT_FLAGS=""
6559 ARCH_RUN_32BIT="true"
6560 ;;
6561 all)
6562 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6563 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6564 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6565 ;;
6566 intel)
6567 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6568 LIPO_32BIT_FLAGS="-extract i386"
6569 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6570 ;;
6571 intel-32)
6572 UNIVERSAL_ARCH_FLAGS="-arch i386"
6573 LIPO_32BIT_FLAGS=""
6574 ARCH_RUN_32BIT=""
6575 ;;
6576 3-way)
6577 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6578 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6579 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6580 ;;
6581 *)
6582 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6583 ;;
6584 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006585
Ned Deily87adb6e2013-10-18 21:09:56 -07006586 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6587 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6588 if test "${UNIVERSALSDK}" != "/"
6589 then
6590 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6591 fi
6592 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593
Ned Deily87adb6e2013-10-18 21:09:56 -07006594 # Calculate an appropriate deployment target for this build:
6595 # The deployment target value is used explicitly to enable certain
6596 # features are enabled (such as builtin libedit support for readline)
6597 # through the use of Apple's Availabiliy Macros and is used as a
6598 # component of the string returned by distutils.get_platform().
6599 #
6600 # Use the value from:
6601 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6602 # 2. the operating system version of the build machine if >= 10.6
6603 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6604 # below to pick either 10.3, 10.4, or 10.5 as the target.
6605 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606
Ned Deily87adb6e2013-10-18 21:09:56 -07006607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6608$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6609 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6610 if test ${cur_target} '>' 10.2 && \
6611 test ${cur_target} '<' 10.6
6612 then
6613 cur_target=10.3
6614 if test ${enable_universalsdk}
6615 then
6616 case "$UNIVERSAL_ARCHS" in
6617 all|3-way|intel|64-bit)
6618 # These configurations were first supported in 10.5
6619 cur_target='10.5'
6620 ;;
6621 esac
6622 else
6623 if test `/usr/bin/arch` = "i386"
6624 then
6625 # 10.4 was the first release to support Intel archs
6626 cur_target="10.4"
6627 fi
6628 fi
6629 fi
6630 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006631
Ned Deily87adb6e2013-10-18 21:09:56 -07006632 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6633 # environment with a value that is the same as what we'll use
6634 # in the Makefile to ensure that we'll get the same compiler
6635 # environment during configure and build time.
6636 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6637 export MACOSX_DEPLOYMENT_TARGET
6638 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6640$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006641
Ned Deily87adb6e2013-10-18 21:09:56 -07006642 # end of Darwin* tests
6643 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644 esac
6645 ;;
6646
6647*)
6648 case $ac_sys_system in
6649 OpenUNIX*|UnixWare*)
6650 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6651 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006652 SCO_SV*)
6653 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6654 ;;
6655 esac
6656 ;;
6657esac
6658
6659if test "$Py_DEBUG" = 'true'; then
6660 :
6661else
6662 OPT="-DNDEBUG $OPT"
6663fi
6664
6665if test "$ac_arch_flags"
6666then
6667 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6668fi
6669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006670# On some compilers, pthreads are available without further options
6671# (e.g. MacOS X). On some of these systems, the compiler will not
6672# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6673# So we have to see first whether pthreads are available without
6674# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6676$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006677if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006679else
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681 ac_cv_pthread_is_default=no
6682else
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684/* end confdefs.h. */
6685
Stefan Krah7dba5942012-11-22 22:49:11 +01006686#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006687#include <pthread.h>
6688
6689void* routine(void* p){return NULL;}
6690
6691int main(){
6692 pthread_t p;
6693 if(pthread_create(&p,NULL,routine,NULL)!=0)
6694 return 1;
6695 (void)pthread_detach(p);
6696 return 0;
6697}
6698
6699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006700if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701
6702 ac_cv_pthread_is_default=yes
6703 ac_cv_kthread=no
6704 ac_cv_pthread=no
6705
6706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
6713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714fi
6715
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6717$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718
6719
6720if test $ac_cv_pthread_is_default = yes
6721then
6722 ac_cv_kpthread=no
6723else
6724# -Kpthread, if available, provides the right #defines
6725# and linker options to make pthread_create available
6726# Some compilers won't report that they do not support -Kpthread,
6727# so we need to run a program to see whether it really made the
6728# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6730$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006731if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733else
6734 ac_save_cc="$CC"
6735CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006736if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 ac_cv_kpthread=no
6738else
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740/* end confdefs.h. */
6741
Stefan Krah7dba5942012-11-22 22:49:11 +01006742#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743#include <pthread.h>
6744
6745void* routine(void* p){return NULL;}
6746
6747int main(){
6748 pthread_t p;
6749 if(pthread_create(&p,NULL,routine,NULL)!=0)
6750 return 1;
6751 (void)pthread_detach(p);
6752 return 0;
6753}
6754
6755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006756if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757 ac_cv_kpthread=yes
6758else
Matthias Kloseb9621712010-04-24 17:59:49 +00006759 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6762 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763fi
6764
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006765CC="$ac_save_cc"
6766fi
6767
Matthias Kloseb9621712010-04-24 17:59:49 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6769$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006770fi
6771
6772if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6773then
6774# -Kthread, if available, provides the right #defines
6775# and linker options to make pthread_create available
6776# Some compilers won't report that they do not support -Kthread,
6777# so we need to run a program to see whether it really made the
6778# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6780$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006781if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006782 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783else
6784 ac_save_cc="$CC"
6785CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006786if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787 ac_cv_kthread=no
6788else
Matthias Kloseb9621712010-04-24 17:59:49 +00006789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790/* end confdefs.h. */
6791
Stefan Krah7dba5942012-11-22 22:49:11 +01006792#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793#include <pthread.h>
6794
6795void* routine(void* p){return NULL;}
6796
6797int main(){
6798 pthread_t p;
6799 if(pthread_create(&p,NULL,routine,NULL)!=0)
6800 return 1;
6801 (void)pthread_detach(p);
6802 return 0;
6803}
6804
6805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006806if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807 ac_cv_kthread=yes
6808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815CC="$ac_save_cc"
6816fi
6817
Matthias Kloseb9621712010-04-24 17:59:49 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6819$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820fi
6821
6822if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6823then
6824# -pthread, if available, provides the right #defines
6825# and linker options to make pthread_create available
6826# Some compilers won't report that they do not support -pthread,
6827# so we need to run a program to see whether it really made the
6828# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6830$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006831if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833else
6834 ac_save_cc="$CC"
6835CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006836if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837 ac_cv_pthread=no
6838else
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006840/* end confdefs.h. */
6841
Stefan Krah7dba5942012-11-22 22:49:11 +01006842#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843#include <pthread.h>
6844
6845void* routine(void* p){return NULL;}
6846
6847int main(){
6848 pthread_t p;
6849 if(pthread_create(&p,NULL,routine,NULL)!=0)
6850 return 1;
6851 (void)pthread_detach(p);
6852 return 0;
6853}
6854
6855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006856if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 ac_cv_pthread=yes
6858else
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
6864
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865CC="$ac_save_cc"
6866fi
6867
Matthias Kloseb9621712010-04-24 17:59:49 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6869$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870fi
6871
6872# If we have set a CC compiler flag for thread support then
6873# check if it works for CXX, too.
6874ac_cv_cxx_thread=no
6875if test ! -z "$CXX"
6876then
Matthias Kloseb9621712010-04-24 17:59:49 +00006877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6878$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879ac_save_cxx="$CXX"
6880
6881if test "$ac_cv_kpthread" = "yes"
6882then
6883 CXX="$CXX -Kpthread"
6884 ac_cv_cxx_thread=yes
6885elif test "$ac_cv_kthread" = "yes"
6886then
6887 CXX="$CXX -Kthread"
6888 ac_cv_cxx_thread=yes
6889elif test "$ac_cv_pthread" = "yes"
6890then
6891 CXX="$CXX -pthread"
6892 ac_cv_cxx_thread=yes
6893fi
6894
6895if test $ac_cv_cxx_thread = yes
6896then
6897 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6898 $CXX -c conftest.$ac_ext 2>&5
6899 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6900 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6901 then
6902 ac_cv_cxx_thread=yes
6903 else
6904 ac_cv_cxx_thread=no
6905 fi
6906 rm -fr conftest*
6907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6909$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910fi
6911CXX="$ac_save_cxx"
6912
6913
6914# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6916$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006917if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919else
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921/* end confdefs.h. */
6922#include <stdlib.h>
6923#include <stdarg.h>
6924#include <string.h>
6925#include <float.h>
6926
6927int
6928main ()
6929{
6930
6931 ;
6932 return 0;
6933}
6934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006935if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936 ac_cv_header_stdc=yes
6937else
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6941
6942if test $ac_cv_header_stdc = yes; then
6943 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006945/* end confdefs.h. */
6946#include <string.h>
6947
6948_ACEOF
6949if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 $EGREP "memchr" >/dev/null 2>&1; then :
6951
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006952else
6953 ac_cv_header_stdc=no
6954fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006955rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956
6957fi
6958
6959if test $ac_cv_header_stdc = yes; then
6960 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006962/* end confdefs.h. */
6963#include <stdlib.h>
6964
6965_ACEOF
6966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 $EGREP "free" >/dev/null 2>&1; then :
6968
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969else
6970 ac_cv_header_stdc=no
6971fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006972rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973
6974fi
6975
6976if test $ac_cv_header_stdc = yes; then
6977 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979 :
6980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006982/* end confdefs.h. */
6983#include <ctype.h>
6984#include <stdlib.h>
6985#if ((' ' & 0x0FF) == 0x020)
6986# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6987# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6988#else
6989# define ISLOWER(c) \
6990 (('a' <= (c) && (c) <= 'i') \
6991 || ('j' <= (c) && (c) <= 'r') \
6992 || ('s' <= (c) && (c) <= 'z'))
6993# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6994#endif
6995
6996#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6997int
6998main ()
6999{
7000 int i;
7001 for (i = 0; i < 256; i++)
7002 if (XOR (islower (i), ISLOWER (i))
7003 || toupper (i) != TOUPPER (i))
7004 return 2;
7005 return 0;
7006}
7007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007008if ac_fn_c_try_run "$LINENO"; then :
7009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007010else
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007015fi
7016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017fi
7018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7020$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007021if test $ac_cv_header_stdc = yes; then
7022
Matthias Kloseb9621712010-04-24 17:59:49 +00007023$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024
7025fi
7026
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007027for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007028fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007029ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007030sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007031unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007032poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007033sys/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 +01007034sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007035sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007036sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007037sys/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 -07007038libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007039bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7040sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007041do :
7042 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7043ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007044if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007045 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007046#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007047_ACEOF
7048
7049fi
7050
Guido van Rossum627b2d71993-12-24 10:39:16 +00007051done
7052
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007054for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7057$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007058if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007059 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007060else
Matthias Kloseb9621712010-04-24 17:59:49 +00007061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007062/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007063#include <sys/types.h>
7064#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007065
Martin v. Löwis11437992002-04-12 09:54:03 +00007066int
7067main ()
7068{
7069if ((DIR *) 0)
7070return 0;
7071 ;
7072 return 0;
7073}
7074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007077else
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007082eval ac_res=\$$as_ac_Header
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7084$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007085if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007087#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007088_ACEOF
7089
7090ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007091fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007092
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007093done
7094# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7095if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7097$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007098if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100else
Martin v. Löwis11437992002-04-12 09:54:03 +00007101 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105/* Override any GCC internal prototype to avoid an error.
7106 Use char because int might match the return type of a GCC
7107 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007108#ifdef __cplusplus
7109extern "C"
7110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007111char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007112int
7113main ()
7114{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 ;
7117 return 0;
7118}
7119_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007120for ac_lib in '' dir; do
7121 if test -z "$ac_lib"; then
7122 ac_res="none required"
7123 else
7124 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007125 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007126 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007130rm -f core conftest.err conftest.$ac_objext \
7131 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007132 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007133 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007135done
Victor Stinnere0be4232011-10-25 13:06:09 +02007136if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138else
7139 ac_cv_search_opendir=no
7140fi
7141rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007142LIBS=$ac_func_search_save_LIBS
7143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7145$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007147if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007149
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152else
Matthias Kloseb9621712010-04-24 17:59:49 +00007153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7154$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007155if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007156 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007157else
7158 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007161
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007162/* Override any GCC internal prototype to avoid an error.
7163 Use char because int might match the return type of a GCC
7164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007165#ifdef __cplusplus
7166extern "C"
7167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007168char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007172return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007173 ;
7174 return 0;
7175}
7176_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007177for ac_lib in '' x; do
7178 if test -z "$ac_lib"; then
7179 ac_res="none required"
7180 else
7181 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007182 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007185 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187rm -f core conftest.err conftest.$ac_objext \
7188 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007189 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007190 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007192done
Victor Stinnere0be4232011-10-25 13:06:09 +02007193if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007195else
7196 ac_cv_search_opendir=no
7197fi
7198rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007199LIBS=$ac_func_search_save_LIBS
7200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7202$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007204if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007207fi
7208
7209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7212$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007213if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007217/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007218#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007219int
7220main ()
7221{
7222return makedev(0, 0);
7223 ;
7224 return 0;
7225}
7226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228 ac_cv_header_sys_types_h_makedev=yes
7229else
Matthias Kloseb9621712010-04-24 17:59:49 +00007230 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007231fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007232rm -f core conftest.err conftest.$ac_objext \
7233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007234
7235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7237$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007238
7239if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007240ac_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 +02007241if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007242
Matthias Kloseb9621712010-04-24 17:59:49 +00007243$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007244
7245fi
7246
7247
7248
7249 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 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 +02007251if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007254
7255fi
7256
7257
7258 fi
7259fi
7260
Michael W. Hudson54241132001-12-07 15:38:26 +00007261
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007262# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7263for ac_header in net/if.h
7264do :
7265 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7266#ifdef STDC_HEADERS
7267# include <stdlib.h>
7268# include <stddef.h>
7269#else
7270# ifdef HAVE_STDLIB_H
7271# include <stdlib.h>
7272# endif
7273#endif
7274#ifdef HAVE_SYS_SOCKET_H
7275# include <sys/socket.h>
7276#endif
7277
7278"
Victor Stinnere0be4232011-10-25 13:06:09 +02007279if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007280 cat >>confdefs.h <<_ACEOF
7281#define HAVE_NET_IF_H 1
7282_ACEOF
7283
7284fi
7285
7286done
7287
7288
Martin v. Löwis11017b12006-01-14 18:12:57 +00007289# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007290for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007291do :
7292 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 +00007293#ifdef HAVE_ASM_TYPES_H
7294#include <asm/types.h>
7295#endif
7296#ifdef HAVE_SYS_SOCKET_H
7297#include <sys/socket.h>
7298#endif
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300"
Victor Stinnere0be4232011-10-25 13:06:09 +02007301if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007303#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007304_ACEOF
7305
7306fi
7307
7308done
7309
7310
Charles-François Natali47413c12011-10-06 19:47:44 +02007311# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007312for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007313do :
7314 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7315ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7316#ifdef HAVE_SYS_SOCKET_H
7317#include <sys/socket.h>
7318#endif
7319
7320"
7321if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7322 cat >>confdefs.h <<_ACEOF
7323#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7324_ACEOF
7325
7326fi
7327
7328done
7329
7330
Guido van Rossum627b2d71993-12-24 10:39:16 +00007331# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007332was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7334$as_echo_n "checking for clock_t in time.h... " >&6; }
7335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007337#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007338
7339_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007342 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343else
Martin v. Löwis11437992002-04-12 09:54:03 +00007344
7345
Matthias Kloseb9621712010-04-24 17:59:49 +00007346$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007347
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007348
Guido van Rossum627b2d71993-12-24 10:39:16 +00007349fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007350rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7353$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7356$as_echo_n "checking for makedev... " >&6; }
7357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007358/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007359
Jesus Cea740f53a2010-04-28 11:35:30 +00007360#if defined(MAJOR_IN_MKDEV)
7361#include <sys/mkdev.h>
7362#elif defined(MAJOR_IN_SYSMACROS)
7363#include <sys/sysmacros.h>
7364#else
7365#include <sys/types.h>
7366#endif
7367
Neal Norwitz11690112002-07-30 01:08:28 +00007368int
7369main ()
7370{
Jesus Cea740f53a2010-04-28 11:35:30 +00007371
7372 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007373 ;
7374 return 0;
7375}
Matthias Kloseb159a552010-04-25 21:00:44 +00007376
Neal Norwitz11690112002-07-30 01:08:28 +00007377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007378if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007379 ac_cv_has_makedev=yes
7380else
Matthias Kloseb9621712010-04-24 17:59:49 +00007381 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007383rm -f core conftest.err conftest.$ac_objext \
7384 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7386$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007387if test "$ac_cv_has_makedev" = "yes"; then
7388
Matthias Kloseb9621712010-04-24 17:59:49 +00007389$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007390
7391fi
7392
Christian Heimes985ecdc2013-11-20 11:46:18 +01007393# byte swapping
7394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7395$as_echo_n "checking for le64toh... " >&6; }
7396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7397/* end confdefs.h. */
7398
7399#ifdef HAVE_ENDIAN_H
7400#include <endian.h>
7401#elif defined(HAVE_SYS_ENDIAN_H)
7402#include <sys/endian.h>
7403#endif
7404
7405int
7406main ()
7407{
7408
7409 le64toh(1)
7410 ;
7411 return 0;
7412}
7413
7414_ACEOF
7415if ac_fn_c_try_link "$LINENO"; then :
7416 ac_cv_has_le64toh=yes
7417else
7418 ac_cv_has_le64toh=no
7419fi
7420rm -f core conftest.err conftest.$ac_objext \
7421 conftest$ac_exeext conftest.$ac_ext
7422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7423$as_echo "$ac_cv_has_le64toh" >&6; }
7424if test "$ac_cv_has_le64toh" = "yes"; then
7425
7426$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7427
7428fi
7429
Martin v. Löwis399a6892002-10-04 10:22:02 +00007430# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7431# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7432# defined, but the compiler does not support pragma redefine_extname,
7433# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7434# structures (such as rlimit64) without declaring them. As a
7435# work-around, disable LFS on such configurations
7436
7437use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7439$as_echo_n "checking Solaris LFS bug... " >&6; }
7440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007441/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007442
7443#define _LARGEFILE_SOURCE 1
7444#define _FILE_OFFSET_BITS 64
7445#include <sys/resource.h>
7446
Martin v. Löwis399a6892002-10-04 10:22:02 +00007447int
7448main ()
7449{
7450struct rlimit foo;
7451 ;
7452 return 0;
7453}
7454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007455if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007456 sol_lfs_bug=no
7457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7462$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007463if test "$sol_lfs_bug" = "yes"; then
7464 use_lfs=no
7465fi
7466
7467if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007468# Two defines needed to enable largefile support on various platforms
7469# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007470case $ac_sys_system/$ac_sys_release in
7471AIX*)
7472
7473$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7474
7475 ;;
7476esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007479
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007482
Martin v. Löwis399a6892002-10-04 10:22:02 +00007483fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007484
Guido van Rossum84e7b241996-08-19 21:59:00 +00007485# Add some code to confdefs.h so that the test for off_t works on SCO
7486cat >> confdefs.h <<\EOF
7487#if defined(SCO_DS)
7488#undef _OFF_T
7489#endif
7490EOF
7491
Guido van Rossumef2255b2000-03-10 22:30:29 +00007492# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007493ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007494if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007496else
Martin v. Löwis11437992002-04-12 09:54:03 +00007497
7498cat >>confdefs.h <<_ACEOF
7499#define mode_t int
7500_ACEOF
7501
7502fi
7503
Matthias Kloseb9621712010-04-24 17:59:49 +00007504ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007505if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007506
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507else
Martin v. Löwis11437992002-04-12 09:54:03 +00007508
7509cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007510#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007511_ACEOF
7512
7513fi
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007516if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518else
Martin v. Löwis11437992002-04-12 09:54:03 +00007519
7520cat >>confdefs.h <<_ACEOF
7521#define pid_t int
7522_ACEOF
7523
7524fi
7525
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007526
Martin v. Löwis11437992002-04-12 09:54:03 +00007527cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007528#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007529_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007530
Matthias Kloseb9621712010-04-24 17:59:49 +00007531ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007532if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534else
Martin v. Löwis11437992002-04-12 09:54:03 +00007535
7536cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007537#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007538_ACEOF
7539
7540fi
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7543$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007544if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007546else
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007548/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007549#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007550
7551_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007553 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007554 ac_cv_type_uid_t=yes
7555else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007556 ac_cv_type_uid_t=no
7557fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007558rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7562$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007563if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007566
7567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007569
7570fi
7571
Mark Dickinson983bc162012-12-02 12:11:38 +00007572
7573# There are two separate checks for each of the exact-width integer types we
7574# need. First we check whether the type is available using the usual
7575# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7576# and <stdint.h> where available). We then also use the special type checks of
7577# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7578# directly, #define's uint32_t to be a suitable type.
7579
7580ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7581if test "x$ac_cv_type_uint32_t" = xyes; then :
7582
7583$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7584
7585fi
7586
Matthias Kloseb9621712010-04-24 17:59:49 +00007587ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7588case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007589 no|yes) ;; #(
7590 *)
7591
Matthias Kloseb9621712010-04-24 17:59:49 +00007592$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007593
7594
7595cat >>confdefs.h <<_ACEOF
7596#define uint32_t $ac_cv_c_uint32_t
7597_ACEOF
7598;;
7599 esac
7600
Mark Dickinson983bc162012-12-02 12:11:38 +00007601
7602ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7603if test "x$ac_cv_type_uint64_t" = xyes; then :
7604
7605$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7606
7607fi
7608
Matthias Kloseb9621712010-04-24 17:59:49 +00007609ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7610case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007611 no|yes) ;; #(
7612 *)
7613
Matthias Kloseb9621712010-04-24 17:59:49 +00007614$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007615
7616
7617cat >>confdefs.h <<_ACEOF
7618#define uint64_t $ac_cv_c_uint64_t
7619_ACEOF
7620;;
7621 esac
7622
Mark Dickinson983bc162012-12-02 12:11:38 +00007623
7624ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7625if test "x$ac_cv_type_int32_t" = xyes; then :
7626
7627$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7628
7629fi
7630
Matthias Kloseb9621712010-04-24 17:59:49 +00007631ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7632case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007633 no|yes) ;; #(
7634 *)
7635
7636cat >>confdefs.h <<_ACEOF
7637#define int32_t $ac_cv_c_int32_t
7638_ACEOF
7639;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007640esac
7641
Mark Dickinson983bc162012-12-02 12:11:38 +00007642
7643ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7644if test "x$ac_cv_type_int64_t" = xyes; then :
7645
7646$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7647
7648fi
7649
Matthias Kloseb9621712010-04-24 17:59:49 +00007650ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7651case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007652 no|yes) ;; #(
7653 *)
7654
7655cat >>confdefs.h <<_ACEOF
7656#define int64_t $ac_cv_c_int64_t
7657_ACEOF
7658;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007659esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007660
Mark Dickinson983bc162012-12-02 12:11:38 +00007661
Matthias Kloseb9621712010-04-24 17:59:49 +00007662ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007663if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664
Matthias Kloseb9621712010-04-24 17:59:49 +00007665$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007666
7667fi
7668
Stefan Krah1919b7e2012-03-21 18:25:23 +01007669ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7670if test "x$ac_cv_type___uint128_t" = xyes; then :
7671
7672$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7673
7674fi
7675
Jack Jansendd19cf82001-12-06 22:36:17 +00007676
Michael W. Hudson54241132001-12-07 15:38:26 +00007677# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007678# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679# The cast to long int works around a bug in the HP C Compiler
7680# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7681# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7682# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7684$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007685if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007686 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007687else
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 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 +00007689
Martin v. Löwis11437992002-04-12 09:54:03 +00007690else
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 if test "$ac_cv_type_int" = yes; then
7692 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7693$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007694as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007695See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696 else
7697 ac_cv_sizeof_int=0
7698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7703$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007704
7705
7706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007708#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007709_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007710
7711
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712# The cast to long int works around a bug in the HP C Compiler
7713# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7714# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7715# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7717$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007718if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007719 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007720else
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 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 +00007722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723else
Matthias Kloseb9621712010-04-24 17:59:49 +00007724 if test "$ac_cv_type_long" = yes; then
7725 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7726$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007727as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007728See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729 else
7730 ac_cv_sizeof_long=0
7731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7736$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007737
7738
7739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007741#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007742_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007743
7744
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007745# The cast to long int works around a bug in the HP C Compiler
7746# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7747# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7748# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7750$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007751if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007753else
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 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 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756else
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 if test "$ac_cv_type_void_p" = yes; then
7758 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7759$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007760as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007761See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762 else
7763 ac_cv_sizeof_void_p=0
7764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7769$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007770
7771
7772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007774#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007775_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007776
7777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007778# The cast to long int works around a bug in the HP C Compiler
7779# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7780# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7781# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7783$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007786else
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789else
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 if test "$ac_cv_type_short" = yes; then
7791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007793as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007794See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795 else
7796 ac_cv_sizeof_short=0
7797 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7802$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007803
7804
7805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007807#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007808_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007809
7810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811# The cast to long int works around a bug in the HP C Compiler
7812# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7813# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7814# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7816$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007817if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007819else
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 if test "$ac_cv_type_float" = yes; then
7824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007826as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007827See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828 else
7829 ac_cv_sizeof_float=0
7830 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7835$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007836
7837
7838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007840#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007841_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007842
7843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844# The cast to long int works around a bug in the HP C Compiler
7845# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7846# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7847# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7849$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007850if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855else
Matthias Kloseb9621712010-04-24 17:59:49 +00007856 if test "$ac_cv_type_double" = yes; then
7857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007859as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007860See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861 else
7862 ac_cv_sizeof_double=0
7863 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7868$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869
7870
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007873#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007874_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007875
7876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877# The cast to long int works around a bug in the HP C Compiler
7878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7882$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$ac_cv_type_fpos_t" = yes; then
7890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007892as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007893See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 else
7895 ac_cv_sizeof_fpos_t=0
7896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7901$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007906#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007908
Michael W. Hudson54241132001-12-07 15:38:26 +00007909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007910# The cast to long int works around a bug in the HP C Compiler
7911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7915$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007916if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007918else
Matthias Kloseb9621712010-04-24 17:59:49 +00007919 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 +00007920
Martin v. Löwis18e16552006-02-15 17:27:45 +00007921else
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 if test "$ac_cv_type_size_t" = yes; then
7923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007925as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007926See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927 else
7928 ac_cv_sizeof_size_t=0
7929 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007931
Martin v. Löwis18e16552006-02-15 17:27:45 +00007932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7934$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007935
7936
7937
Martin v. Löwis18e16552006-02-15 17:27:45 +00007938cat >>confdefs.h <<_ACEOF
7939#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7940_ACEOF
7941
7942
Christian Heimes400adb02008-02-01 08:12:03 +00007943# The cast to long int works around a bug in the HP C Compiler
7944# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7945# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7946# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7948$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007949if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007951else
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 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 +00007953
Christian Heimes400adb02008-02-01 08:12:03 +00007954else
Matthias Kloseb9621712010-04-24 17:59:49 +00007955 if test "$ac_cv_type_pid_t" = yes; then
7956 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7957$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007958as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007959See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007960 else
7961 ac_cv_sizeof_pid_t=0
7962 fi
7963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007964
Christian Heimes400adb02008-02-01 08:12:03 +00007965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7967$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007968
7969
7970
7971cat >>confdefs.h <<_ACEOF
7972#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7973_ACEOF
7974
7975
Michael W. Hudson54241132001-12-07 15:38:26 +00007976
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7978$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007979have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983int
7984main ()
7985{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007986long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 ;
7988 return 0;
7989}
7990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
7993
Matthias Kloseb9621712010-04-24 17:59:49 +00007994$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007995
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007996 have_long_long=yes
7997
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8001$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008002if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003# The cast to long int works around a bug in the HP C Compiler
8004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8006# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8008$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008009if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 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 +00008013
Martin v. Löwis11437992002-04-12 09:54:03 +00008014else
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 if test "$ac_cv_type_long_long" = yes; then
8016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008018as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008019See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020 else
8021 ac_cv_sizeof_long_long=0
8022 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024
Martin v. Löwis11437992002-04-12 09:54:03 +00008025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8027$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028
8029
8030
Martin v. Löwis11437992002-04-12 09:54:03 +00008031cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008032#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008034
Michael W. Hudson54241132001-12-07 15:38:26 +00008035
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008036fi
8037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8039$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008040have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008042/* end confdefs.h. */
8043
8044int
8045main ()
8046{
8047long double x; x = (long double)0;
8048 ;
8049 return 0;
8050}
8051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008052if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008053
8054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008056
8057 have_long_double=yes
8058
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008059fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8062$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008063if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008064# The cast to long int works around a bug in the HP C Compiler
8065# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8066# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8067# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8069$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008070if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008071 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008072else
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 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 +00008074
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008075else
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 if test "$ac_cv_type_long_double" = yes; then
8077 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008079as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008080See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008081 else
8082 ac_cv_sizeof_long_double=0
8083 fi
8084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008085
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8088$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008089
8090
8091
8092cat >>confdefs.h <<_ACEOF
8093#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8094_ACEOF
8095
8096
8097fi
8098
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8101$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008102have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008104/* end confdefs.h. */
8105
8106int
8107main ()
8108{
8109_Bool x; x = (_Bool)0;
8110 ;
8111 return 0;
8112}
8113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008114if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008115
8116
Matthias Kloseb9621712010-04-24 17:59:49 +00008117$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008118
8119 have_c99_bool=yes
8120
Thomas Woutersb2137042007-02-01 18:02:27 +00008121fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8124$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008125if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126# The cast to long int works around a bug in the HP C Compiler
8127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8129# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8131$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008132if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 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 +00008136
Thomas Woutersb2137042007-02-01 18:02:27 +00008137else
Matthias Kloseb9621712010-04-24 17:59:49 +00008138 if test "$ac_cv_type__Bool" = yes; then
8139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008141as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008142See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008143 else
8144 ac_cv_sizeof__Bool=0
8145 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008146fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008147
Thomas Woutersb2137042007-02-01 18:02:27 +00008148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8150$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008151
8152
8153
Thomas Woutersb2137042007-02-01 18:02:27 +00008154cat >>confdefs.h <<_ACEOF
8155#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8156_ACEOF
8157
8158
8159fi
8160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008162 #include <stdint.h>
8163 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008164 #ifdef HAVE_INTTYPES_H
8165 #include <inttypes.h>
8166 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008167"
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008169
8170cat >>confdefs.h <<_ACEOF
8171#define HAVE_UINTPTR_T 1
8172_ACEOF
8173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174# The cast to long int works around a bug in the HP C Compiler
8175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8177# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8179$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008180if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 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 +00008184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 if test "$ac_cv_type_uintptr_t" = yes; then
8187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008189as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008190See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191 else
8192 ac_cv_sizeof_uintptr_t=0
8193 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8198$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199
8200
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008203#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008204_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008205
Michael W. Hudson54241132001-12-07 15:38:26 +00008206
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008207fi
8208
Thomas Wouters89f507f2006-12-13 04:49:30 +00008209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008210# The cast to long int works around a bug in the HP C Compiler
8211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8215$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008216if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220#ifdef HAVE_SYS_TYPES_H
8221#include <sys/types.h>
8222#endif
8223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008225
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if test "$ac_cv_type_off_t" = yes; then
8228 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008230as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008231See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232 else
8233 ac_cv_sizeof_off_t=0
8234 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8239$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241
8242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008244#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008245_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008246
Michael W. Hudson54241132001-12-07 15:38:26 +00008247
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008248
Matthias Kloseb9621712010-04-24 17:59:49 +00008249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8250$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008251if test "$have_long_long" = yes
8252then
8253if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008254 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008255
Matthias Kloseb9621712010-04-24 17:59:49 +00008256$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8259$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008260else
Matthias Kloseb9621712010-04-24 17:59:49 +00008261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008263fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008264else
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8266$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008267fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008268
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269# The cast to long int works around a bug in the HP C Compiler
8270# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8271# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8272# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8274$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008275if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008276 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008277else
Matthias Kloseb9621712010-04-24 17:59:49 +00008278 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008279#ifdef HAVE_SYS_TYPES_H
8280#include <sys/types.h>
8281#endif
8282#ifdef HAVE_TIME_H
8283#include <time.h>
8284#endif
8285
Matthias Kloseb9621712010-04-24 17:59:49 +00008286"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008287
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008288else
Matthias Kloseb9621712010-04-24 17:59:49 +00008289 if test "$ac_cv_type_time_t" = yes; then
8290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008292as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008293See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008294 else
8295 ac_cv_sizeof_time_t=0
8296 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008297fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008298
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8301$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008302
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008303
8304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008306#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008307_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008308
Michael W. Hudson54241132001-12-07 15:38:26 +00008309
8310
Trent Mick635f6fb2000-08-23 21:33:05 +00008311# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008312ac_save_cc="$CC"
8313if test "$ac_cv_kpthread" = "yes"
8314then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008315elif test "$ac_cv_kthread" = "yes"
8316then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008317elif test "$ac_cv_pthread" = "yes"
8318then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008319fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008320
Matthias Kloseb9621712010-04-24 17:59:49 +00008321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8322$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008323have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008325/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008326
8327 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008328int
8329main ()
8330{
Guido van Rossum12580492000-09-24 16:47:19 +00008331pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ;
8333 return 0;
8334}
Matthias Kloseb159a552010-04-25 21:00:44 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008337if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008338 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8342$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008343if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008344 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008345# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8346# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8347# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8349$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008352else
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008354#ifdef HAVE_PTHREAD_H
8355#include <pthread.h>
8356#endif
8357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008359
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008360else
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 if test "$ac_cv_type_pthread_t" = yes; then
8362 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8363$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008364as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008365See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008366 else
8367 ac_cv_sizeof_pthread_t=0
8368 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370
Trent Mick635f6fb2000-08-23 21:33:05 +00008371fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8373$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008374
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008375
8376
Martin v. Löwis11437992002-04-12 09:54:03 +00008377cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008378#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008379_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008380
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008381
Trent Mick635f6fb2000-08-23 21:33:05 +00008382fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008383CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008384
Michael W. Hudson54241132001-12-07 15:38:26 +00008385
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008386case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008387 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008388 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8389 ;;
8390 Darwin/*)
8391 OTHER_LIBTOOL_OPT=""
8392 ;;
8393esac
8394
8395
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008396
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008397case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008398 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008399 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8400 if test "${enable_universalsdk}"; then
8401 :
8402 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008403 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008404 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008405 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008406 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008407 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008408 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008409 if test ${gcc_version} '<' 4.0
8410 then
8411 LIBTOOL_CRUFT="-lcc_dynamic"
8412 else
8413 LIBTOOL_CRUFT=""
8414 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008416 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008417else
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008419/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008420
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008421 #include <unistd.h>
8422 int main(int argc, char*argv[])
8423 {
8424 if (sizeof(long) == 4) {
8425 return 0;
8426 } else {
8427 return 1;
8428 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008429 }
8430
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008432if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008433 ac_osx_32bit=yes
8434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8438 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008439fi
8440
8441
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008442 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008443 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008444 i386)
8445 MACOSX_DEFAULT_ARCH="i386"
8446 ;;
8447 ppc)
8448 MACOSX_DEFAULT_ARCH="ppc"
8449 ;;
8450 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008451 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008452 ;;
8453 esac
8454 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008455 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008456 i386)
8457 MACOSX_DEFAULT_ARCH="x86_64"
8458 ;;
8459 ppc)
8460 MACOSX_DEFAULT_ARCH="ppc64"
8461 ;;
8462 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008463 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008464 ;;
8465 esac
8466
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008467 fi
8468
8469 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008470 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008471 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008472esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8474$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008475if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008476then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008477 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008479 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008480
Matthias Kloseb9621712010-04-24 17:59:49 +00008481$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008482
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8484$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008485 if test $enable_shared = "yes"
8486 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008487 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 +00008488 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8491$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008492fi
8493
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8495$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008496case $ac_sys_system/$ac_sys_release in
8497 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008498
Matthias Kloseb9621712010-04-24 17:59:49 +00008499$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008500
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8502$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008503 ;;
8504 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8506$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008507 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008508esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008509
Guido van Rossum0a516c91994-09-12 10:58:40 +00008510# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008511
Michael W. Hudson54241132001-12-07 15:38:26 +00008512
8513
8514
8515
Benjamin Peterson99f03762010-04-11 22:15:28 +00008516
Thomas Wouters477c8d52006-05-27 19:21:47 +00008517
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008518# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8519# -- usually .so, .sl on HP-UX, .dll on Cygwin
8520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8521$as_echo_n "checking the extension of shared libraries... " >&6; }
8522if test -z "$SHLIB_SUFFIX"; then
8523 case $ac_sys_system in
8524 hp*|HP*)
8525 case `uname -m` in
8526 ia64) SHLIB_SUFFIX=.so;;
8527 *) SHLIB_SUFFIX=.sl;;
8528 esac
8529 ;;
8530 CYGWIN*) SHLIB_SUFFIX=.dll;;
8531 *) SHLIB_SUFFIX=.so;;
8532 esac
8533fi
8534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8535$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008536
Guido van Rossum0a516c91994-09-12 10:58:40 +00008537# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008538# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008539# (Shared libraries in this instance are shared modules to be loaded into
8540# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8542$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008543if test -z "$LDSHARED"
8544then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008545 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008546 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008547 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008548 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008549 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008550 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008551 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008553 if test "$GCC" = "yes" ; then
8554 LDSHARED='$(CC) -shared'
8555 LDCXXSHARED='$(CXX) -shared'
8556 else
8557 LDSHARED='$(CC) -G'
8558 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008559 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008560 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008561 if test "$GCC" = "yes" ; then
8562 LDSHARED='$(CC) -shared'
8563 LDCXXSHARED='$(CXX) -shared'
8564 else
8565 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008566 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008567 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008568 LDSHARED='$(CC) -bundle'
8569 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008570 if test "$enable_framework" ; then
8571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008574 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008575 else
8576 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008577 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008578 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008579 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008580 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008581 LDSHARED='$(CC) -bundle'
8582 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008583 if test "$enable_framework" ; then
8584 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008585 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8586 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008587 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008588 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008589 # No framework, use the Python app as bundle-loader
8590 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008591 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008592 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008593 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008594 Darwin/*)
8595 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8596 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008597
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008598 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008599 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008600 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8601 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008602 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008603 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008604 LDSHARED='$(CC) -bundle'
8605 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008606 if test "$enable_framework" ; then
8607 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008608 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8609 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008610 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008611 else
8612 # No framework, use the Python app as bundle-loader
8613 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8614 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008615 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008616 fi
8617 fi
8618 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008619 Linux*|GNU*|QNX*)
8620 LDSHARED='$(CC) -shared'
8621 LDCXXSHARED='$(CXX) -shared';;
8622 BSD/OS*/4*)
8623 LDSHARED="gcc -shared"
8624 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008625 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008626 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008627 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008628 LDSHARED='$(CC) -shared'
8629 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008630 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008631 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008632 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008633 OpenBSD*)
8634 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8635 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008636 LDSHARED='$(CC) -shared $(CCSHARED)'
8637 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008638 else
8639 case `uname -r` in
8640 [01].* | 2.[0-7] | 2.[0-7].*)
8641 LDSHARED="ld -Bshareable ${LDFLAGS}"
8642 ;;
8643 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008644 LDSHARED='$(CC) -shared $(CCSHARED)'
8645 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008646 ;;
8647 esac
8648 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008649 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008650 LDSHARED='$(CC) -shared'
8651 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008652 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008653 if test "$GCC" = "yes" ; then
8654 LDSHARED='$(CC) -shared'
8655 LDCXXSHARED='$(CXX) -shared'
8656 else
8657 LDSHARED='$(CC) -G'
8658 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008659 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008660 SCO_SV*)
8661 LDSHARED='$(CC) -Wl,-G,-Bexport'
8662 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8663 CYGWIN*)
8664 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8665 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008666 *) LDSHARED="ld";;
8667 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8670$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008671LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008672BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008673# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008674# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8676$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008677if test -z "$CCSHARED"
8678then
Guido van Rossum07397971997-04-29 21:49:50 +00008679 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008680 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008681 then CCSHARED="-fPIC";
8682 elif test `uname -p` = sparc;
8683 then CCSHARED="-xcode=pic32";
8684 else CCSHARED="-Kpic";
8685 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008686 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008687 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008688 else CCSHARED="+z";
8689 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008690 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008691 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008692 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008693 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008694 if test "$GCC" = "yes"
8695 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008696 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008697 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008698 SCO_SV*)
8699 if test "$GCC" = "yes"
8700 then CCSHARED="-fPIC"
8701 else CCSHARED="-Kpic -belf"
8702 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008703 IRIX*/6*) case $CC in
8704 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008705 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008706 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8710$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008711# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008712# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8714$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008715if test -z "$LINKFORSHARED"
8716then
Guido van Rossum07397971997-04-29 21:49:50 +00008717 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008718 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008719 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008720 LINKFORSHARED="-Wl,-E -Wl,+s";;
8721# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008722 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008723 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008724 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008725 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008726 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008727
8728 # Issue #18075: the default maximum stack size (8MBytes) is too
8729 # small for the default recursion limit. Increase the stack size
8730 # to ensure that tests don't crash
8731 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8732
Jack Jansene578a632001-08-15 01:27:14 +00008733 if test "$enable_framework"
8734 then
Jack Jansenda49e192005-01-07 13:08:22 +00008735 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008736 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008737 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008738 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008739 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008740 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008741 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008742 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8743 then
8744 LINKFORSHARED="-Wl,--export-dynamic"
8745 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008746 SunOS/5*) case $CC in
8747 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008748 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008749 then
8750 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008751 fi;;
8752 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008753 CYGWIN*)
8754 if test $enable_shared = "no"
8755 then
8756 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8757 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008758 QNX*)
8759 # -Wl,-E causes the symbols to be added to the dynamic
8760 # symbol table so that they can be found when a module
8761 # is loaded. -N 2048K causes the stack size to be set
8762 # to 2048 kilobytes so that the stack doesn't overflow
8763 # when running test_compile.py.
8764 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008765 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8768$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008769
Michael W. Hudson54241132001-12-07 15:38:26 +00008770
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8773$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008774if test ! "$LIBRARY" = "$LDLIBRARY"
8775then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008776 case $ac_sys_system in
8777 CYGWIN*)
8778 # Cygwin needs CCSHARED when building extension DLLs
8779 # but not when building the interpreter DLL.
8780 CFLAGSFORSHARED='';;
8781 *)
8782 CFLAGSFORSHARED='$(CCSHARED)'
8783 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8786$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008787
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008788# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8789# library (with --enable-shared).
8790# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008791# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8792# if it is not required, since it creates a dependency of the shared library
8793# to LIBS. This, in turn, means that applications linking the shared libpython
8794# don't need to link LIBS explicitly. The default should be only changed
8795# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008796
Matthias Kloseb9621712010-04-24 17:59:49 +00008797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8798$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008799case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008800 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008801 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008802esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8804$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008805
8806
Guido van Rossum627b2d71993-12-24 10:39:16 +00008807# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8809$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008810if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008811 $as_echo_n "(cached) " >&6
8812else
8813 ac_check_lib_save_LIBS=$LIBS
8814LIBS="-lsendfile $LIBS"
8815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817
8818/* Override any GCC internal prototype to avoid an error.
8819 Use char because int might match the return type of a GCC
8820 builtin and then its argument prototype would still apply. */
8821#ifdef __cplusplus
8822extern "C"
8823#endif
8824char sendfile ();
8825int
8826main ()
8827{
8828return sendfile ();
8829 ;
8830 return 0;
8831}
8832_ACEOF
8833if ac_fn_c_try_link "$LINENO"; then :
8834 ac_cv_lib_sendfile_sendfile=yes
8835else
8836 ac_cv_lib_sendfile_sendfile=no
8837fi
8838rm -f core conftest.err conftest.$ac_objext \
8839 conftest$ac_exeext conftest.$ac_ext
8840LIBS=$ac_check_lib_save_LIBS
8841fi
8842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8843$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008844if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008845 cat >>confdefs.h <<_ACEOF
8846#define HAVE_LIBSENDFILE 1
8847_ACEOF
8848
8849 LIBS="-lsendfile $LIBS"
8850
8851fi
8852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8854$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008855if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008857else
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008859LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863/* Override any GCC internal prototype to avoid an error.
8864 Use char because int might match the return type of a GCC
8865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008866#ifdef __cplusplus
8867extern "C"
8868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008869char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008870int
8871main ()
8872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ;
8875 return 0;
8876}
8877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008880else
Matthias Kloseb9621712010-04-24 17:59:49 +00008881 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883rm -f core conftest.err conftest.$ac_objext \
8884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8888$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 cat >>confdefs.h <<_ACEOF
8891#define HAVE_LIBDL 1
8892_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008894 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008895
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008896fi
8897 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8899$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8933$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008934if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 cat >>confdefs.h <<_ACEOF
8936#define HAVE_LIBDLD 1
8937_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008938
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008939 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008940
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008941fi
8942 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008943
Georg Brandlb1441c72009-01-03 22:33:39 +00008944# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008945if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8947$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008948if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008950else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008951 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008955/* Override any GCC internal prototype to avoid an error.
8956 Use char because int might match the return type of a GCC
8957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958#ifdef __cplusplus
8959extern "C"
8960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008961char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008965return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ;
8967 return 0;
8968}
8969_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008970for ac_lib in '' pthread rt posix4; do
8971 if test -z "$ac_lib"; then
8972 ac_res="none required"
8973 else
8974 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008976 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980rm -f core conftest.err conftest.$ac_objext \
8981 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008982 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985done
Victor Stinnere0be4232011-10-25 13:06:09 +02008986if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988else
8989 ac_cv_search_sem_init=no
8990fi
8991rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008992LIBS=$ac_func_search_save_LIBS
8993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8995$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008997if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008998 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008999
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009000fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009001 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009002 # posix4 on Solaris 2.6
9003 # pthread (first!) on Linux
9004fi
9005
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9008$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009011else
9012 ac_check_lib_save_LIBS=$LIBS
9013LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009015/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017/* Override any GCC internal prototype to avoid an error.
9018 Use char because int might match the return type of a GCC
9019 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009020#ifdef __cplusplus
9021extern "C"
9022#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009023char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009024int
9025main ()
9026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009028 ;
9029 return 0;
9030}
9031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009033 ac_cv_lib_intl_textdomain=yes
9034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037rm -f core conftest.err conftest.$ac_objext \
9038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009039LIBS=$ac_check_lib_save_LIBS
9040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9042$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009044
Matthias Kloseb9621712010-04-24 17:59:49 +00009045$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009046
Brett Cannonc6d936e2009-06-07 20:09:53 +00009047 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009048fi
9049
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009050
9051# checks for system dependent C++ extensions support
9052case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9054$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009056/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009057
Georg Brandl59e87bd2011-02-15 19:48:59 +00009058 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009059int
9060main ()
9061{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009062loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ;
9064 return 0;
9065}
Matthias Kloseb159a552010-04-25 21:00:44 +00009066
Martin v. Löwis11437992002-04-12 09:54:03 +00009067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009068if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009069
Matthias Kloseb159a552010-04-25 21:00:44 +00009070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009072
Matthias Kloseb159a552010-04-25 21:00:44 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009074$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009075
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009076else
Matthias Kloseb159a552010-04-25 21:00:44 +00009077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009079$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009081fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009082rm -f core conftest.err conftest.$ac_objext \
9083 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009084 *) ;;
9085esac
9086
Christian Heimes985ecdc2013-11-20 11:46:18 +01009087# check for systems that require aligned memory access
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9089$as_echo_n "checking aligned memory access is required... " >&6; }
9090if test "$cross_compiling" = yes; then :
9091 aligned_required=yes
9092else
9093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9094/* end confdefs.h. */
9095
9096int main()
9097{
9098 char s[16];
9099 int i, *p1, *p2;
9100 for (i=0; i < 16; i++)
9101 s[i] = i;
9102 p1 = (int*)(s+1);
9103 p2 = (int*)(s+2);
9104 if (*p1 == *p2)
9105 return 1;
9106 return 0;
9107}
9108
9109_ACEOF
9110if ac_fn_c_try_run "$LINENO"; then :
9111 aligned_required=no
9112else
9113 aligned_required=yes
9114fi
9115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9116 conftest.$ac_objext conftest.beam conftest.$ac_ext
9117fi
9118
9119
9120if test "$aligned_required" = yes ; then
9121
9122$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9123
9124fi
9125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9126$as_echo "$aligned_required" >&6; }
9127
9128
9129# str, bytes and memoryview hash algorithm
9130
9131
9132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9133$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9134
9135# Check whether --with-hash_algorithm was given.
9136if test "${with_hash_algorithm+set}" = set; then :
9137 withval=$with_hash_algorithm;
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9139$as_echo "$withval" >&6; }
9140case "$withval" in
9141 siphash24)
9142 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9143
9144 ;;
9145 fnv)
9146 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9147
9148 ;;
9149 *)
9150 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9151 ;;
9152esac
9153
9154else
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9156$as_echo "default" >&6; }
9157fi
9158
9159
Charles-François Natalid30b0222014-05-08 23:08:51 +01009160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9161$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9162
9163# Check whether --with-address_sanitizer was given.
9164if test "${with_address_sanitizer+set}" = set; then :
9165 withval=$with_address_sanitizer;
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9167$as_echo "$withval" >&6; }
9168BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9169LDFLAGS="-fsanitize=address $LDFLAGS"
9170
9171else
9172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
9174fi
9175
9176
Guido van Rossum70c7f481998-03-26 18:44:10 +00009177# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9179$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009180if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009181 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009182else
Martin v. Löwis11437992002-04-12 09:54:03 +00009183 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009184LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188/* Override any GCC internal prototype to avoid an error.
9189 Use char because int might match the return type of a GCC
9190 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009191#ifdef __cplusplus
9192extern "C"
9193#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009194char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009195int
9196main ()
9197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009198return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009199 ;
9200 return 0;
9201}
9202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009203if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009205else
Matthias Kloseb9621712010-04-24 17:59:49 +00009206 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009208rm -f core conftest.err conftest.$ac_objext \
9209 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009210LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9213$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009214if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009215 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009216fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009217 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9219$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009220if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009222else
Martin v. Löwis11437992002-04-12 09:54:03 +00009223 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009224LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009228/* Override any GCC internal prototype to avoid an error.
9229 Use char because int might match the return type of a GCC
9230 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009231#ifdef __cplusplus
9232extern "C"
9233#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009234char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009235int
9236main ()
9237{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009238return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ;
9240 return 0;
9241}
9242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009243if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009245else
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009248rm -f core conftest.err conftest.$ac_objext \
9249 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009250LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9253$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009254if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009255 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009256fi
9257 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009258
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9260$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009263if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9266$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009267LIBS="$withval $LIBS"
9268
9269else
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9271$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009272fi
9273
Guido van Rossum7f43da71994-08-01 12:15:30 +00009274
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009275if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009276 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9277set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9279$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009280if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009281 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009282else
9283 case $PKG_CONFIG in
9284 [\\/]* | ?:[\\/]*)
9285 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9286 ;;
9287 *)
9288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9289for as_dir in $PATH
9290do
9291 IFS=$as_save_IFS
9292 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009293 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009294 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009295 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009297 break 2
9298 fi
9299done
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009301IFS=$as_save_IFS
9302
9303 ;;
9304esac
9305fi
9306PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9307if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9309$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009310else
Matthias Kloseb9621712010-04-24 17:59:49 +00009311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9312$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009313fi
9314
9315
9316fi
9317if test -z "$ac_cv_path_PKG_CONFIG"; then
9318 ac_pt_PKG_CONFIG=$PKG_CONFIG
9319 # Extract the first word of "pkg-config", so it can be a program name with args.
9320set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9322$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009323if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009324 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009325else
9326 case $ac_pt_PKG_CONFIG in
9327 [\\/]* | ?:[\\/]*)
9328 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9329 ;;
9330 *)
9331 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9332for as_dir in $PATH
9333do
9334 IFS=$as_save_IFS
9335 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009336 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009337 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009338 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009339 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009340 break 2
9341 fi
9342done
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009344IFS=$as_save_IFS
9345
9346 ;;
9347esac
9348fi
9349ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9350if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9352$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009353else
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9355$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009356fi
9357
9358 if test "x$ac_pt_PKG_CONFIG" = x; then
9359 PKG_CONFIG=""
9360 else
9361 case $cross_compiling:$ac_tool_warned in
9362yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9364$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009365ac_tool_warned=yes ;;
9366esac
9367 PKG_CONFIG=$ac_pt_PKG_CONFIG
9368 fi
9369else
9370 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9371fi
9372
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009373
9374# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9376$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009377
9378# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009379if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009380 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009381else
9382 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009383fi
9384
9385
Matthias Kloseb9621712010-04-24 17:59:49 +00009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9387$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009388
9389# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9391$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009392
9393# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009394if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009395 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009396else
9397 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009398fi
9399
9400
9401if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009402 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9403else
9404 LIBFFI_INCLUDEDIR=""
9405fi
9406
9407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9409$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009410
Stefan Krah60187b52012-03-23 19:06:27 +01009411# Check for use of the system libmpdec library
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9413$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9414
9415# Check whether --with-system_libmpdec was given.
9416if test "${with_system_libmpdec+set}" = set; then :
9417 withval=$with_system_libmpdec;
9418else
9419 with_system_libmpdec="no"
9420fi
9421
9422
9423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9424$as_echo "$with_system_libmpdec" >&6; }
9425
Benjamin Peterson076ed002010-10-31 17:11:02 +00009426# Check for support for loadable sqlite extensions
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9428$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9429# Check whether --enable-loadable-sqlite-extensions was given.
9430if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9431 enableval=$enable_loadable_sqlite_extensions;
9432else
9433 enable_loadable_sqlite_extensions="no"
9434fi
9435
9436
9437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9438$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9439
Ned Deilyd819b932013-09-06 01:07:05 -07009440# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9441
9442
9443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9444$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9445
9446# Check whether --with-tcltk-includes was given.
9447if test "${with_tcltk_includes+set}" = set; then :
9448 withval=$with_tcltk_includes;
9449else
9450 with_tcltk_includes="default"
9451fi
9452
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9454$as_echo "$with_tcltk_includes" >&6; }
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9456$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9457
9458# Check whether --with-tcltk-libs was given.
9459if test "${with_tcltk_libs+set}" = set; then :
9460 withval=$with_tcltk_libs;
9461else
9462 with_tcltk_libs="default"
9463fi
9464
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9466$as_echo "$with_tcltk_libs" >&6; }
9467if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9468then
9469 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9470 then
9471 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9472 fi
9473 TCLTK_INCLUDES=""
9474 TCLTK_LIBS=""
9475else
9476 TCLTK_INCLUDES="$with_tcltk_includes"
9477 TCLTK_LIBS="$with_tcltk_libs"
9478fi
9479
Matthias Klose55708cc2009-04-30 08:06:49 +00009480# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9482$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009483
9484# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009486 withval=$with_dbmliborder;
9487if test x$with_dbmliborder = xyes
9488then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009489as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009490else
9491 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9492 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9493 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009494 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009495 fi
9496 done
9497fi
9498fi
9499
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9501$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009502
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009503# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009504
9505
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9507$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009510if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511 withval=$with_signal_module;
9512fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009513
9514
9515if test -z "$with_signal_module"
9516then with_signal_module="yes"
9517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9519$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009520
9521if test "${with_signal_module}" = "yes"; then
9522 USE_SIGNAL_MODULE=""
9523 SIGNAL_OBJS=""
9524else
9525 USE_SIGNAL_MODULE="#"
9526 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9527fi
9528
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009529# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009530
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009531USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533
Martin v. Löwis11437992002-04-12 09:54:03 +00009534
9535# Templates for things AC_DEFINEd more than once.
9536# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009537
9538
Martin v. Löwis11437992002-04-12 09:54:03 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9541$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009543# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009544if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545 withval=$with_threads;
9546fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009547
9548
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009549# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009552if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009553 withval=$with_thread; with_threads=$with_thread
9554fi
9555
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009556
9557if test -z "$with_threads"
9558then with_threads="yes"
9559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9561$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009562
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009563
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009564if test "$with_threads" = "no"
9565then
9566 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009567elif test "$ac_cv_pthread_is_default" = yes
9568then
Matthias Kloseb9621712010-04-24 17:59:49 +00009569 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009570
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009571 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009573
9574 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009576elif test "$ac_cv_kpthread" = "yes"
9577then
9578 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009579 if test "$ac_cv_cxx_thread" = "yes"; then
9580 CXX="$CXX -Kpthread"
9581 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009583
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009584 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009585 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009586elif test "$ac_cv_kthread" = "yes"
9587then
9588 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009589 if test "$ac_cv_cxx_thread" = "yes"; then
9590 CXX="$CXX -Kthread"
9591 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009593
9594 posix_threads=yes
9595 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009596elif test "$ac_cv_pthread" = "yes"
9597then
9598 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009599 if test "$ac_cv_cxx_thread" = "yes"; then
9600 CXX="$CXX -pthread"
9601 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009603
9604 posix_threads=yes
9605 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009606else
9607 if test ! -z "$with_threads" -a -d "$with_threads"
9608 then LDFLAGS="$LDFLAGS -L$with_threads"
9609 fi
9610 if test ! -z "$withval" -a -d "$withval"
9611 then LDFLAGS="$LDFLAGS -L$withval"
9612 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009613
9614 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009615 # define _POSIX_THREADS in unistd.h. Some apparently don't
9616 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9618$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009620/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009622#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009623#ifdef _POSIX_THREADS
9624yes
9625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009626
9627_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009630 unistd_defines_pthreads=yes
9631else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009632 unistd_defines_pthreads=no
9633fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009634rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009635
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9637$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009638
Matthias Kloseb9621712010-04-24 17:59:49 +00009639 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009640
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009641 # Just looking for pthread_create in libpthread is not enough:
9642 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9643 # So we really have to include pthread.h, and then link.
9644 _libs=$LIBS
9645 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9647$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009649/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009650
9651#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009652#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009653
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009655int
9656main ()
9657{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009658
9659pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ;
9661 return 0;
9662}
9663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009664if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009665
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9667$as_echo "yes" >&6; }
9668 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009669
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009670 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009671 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009672else
Martin v. Löwis11437992002-04-12 09:54:03 +00009673
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009674 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009676if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009677 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009678
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009679 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009680 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009681else
Guido van Rossumad678af1998-10-02 14:42:15 +00009682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9684$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9718$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009723 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009724 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009725else
Greg Steinadf63d62000-07-05 10:38:09 +00009726
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9728$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009729if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009730 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009733LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009754else
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9762$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009765
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009766 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009767 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009769else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009770
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9772$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009773if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009777LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009791return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009798else
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9806$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009807if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009809
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009810 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009811 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009812 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009814
Matthias Kloseb9621712010-04-24 17:59:49 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9816$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009817if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009819else
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009821LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009825/* Override any GCC internal prototype to avoid an error.
9826 Use char because int might match the return type of a GCC
9827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828#ifdef __cplusplus
9829extern "C"
9830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009831char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009832int
9833main ()
9834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009835return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ;
9837 return 0;
9838}
9839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009842else
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845rm -f core conftest.err conftest.$ac_objext \
9846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009847LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9850$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009851if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009852 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009854 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009855 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009856 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009857else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009858
Martin v. Löwis130fb172001-07-19 11:00:41 +00009859 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009860fi
9861
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009863fi
9864
Guido van Rossum0be3e491997-05-22 20:33:33 +00009865fi
9866
Guido van Rossum49545951997-12-02 19:28:29 +00009867fi
9868
Guido van Rossumb93a8621998-05-07 13:27:32 +00009869fi
9870
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872rm -f core conftest.err conftest.$ac_objext \
9873 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009874
Matthias Kloseb9621712010-04-24 17:59:49 +00009875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9876$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009879else
Martin v. Löwis11437992002-04-12 09:54:03 +00009880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009881LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009891char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009907LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9910$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009912 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009913
Martin v. Löwis130fb172001-07-19 11:00:41 +00009914 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009915 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009916 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009917fi
9918
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009919
Neal Norwitza978ab02002-11-02 16:58:05 +00009920 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9922$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009927LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009931/* Override any GCC internal prototype to avoid an error.
9932 Use char because int might match the return type of a GCC
9933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009934#ifdef __cplusplus
9935extern "C"
9936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009937char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009938int
9939main ()
9940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009941return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009942 ;
9943 return 0;
9944}
9945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009947 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009948else
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009951rm -f core conftest.err conftest.$ac_objext \
9952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009953LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9956$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009957if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009959
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009960 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009961 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009962 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009963fi
9964
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009965 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009966fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009967
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009968if test "$posix_threads" = "yes"; then
9969 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009972
9973 fi
9974
9975 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9976 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009977 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009979
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009980 ;;
9981 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009982$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009983
9984 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009985 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009987
9988 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989 esac
9990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9992$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009993 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009997 ac_cv_pthread_system_supported=no
9998else
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010000/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010001
10002 #include <stdio.h>
10003 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010004 void *foo(void *parm) {
10005 return NULL;
10006 }
10007 main() {
10008 pthread_attr_t attr;
10009 pthread_t id;
10010 if (pthread_attr_init(&attr)) exit(-1);
10011 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10012 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10013 exit(0);
10014 }
10015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010016if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 ac_cv_pthread_system_supported=yes
10018else
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010024
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025
Guido van Rossum627b2d71993-12-24 10:39:16 +000010026fi
10027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10029$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010030 if test "$ac_cv_pthread_system_supported" = "yes"; then
10031
Matthias Kloseb9621712010-04-24 17:59:49 +000010032$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033
10034 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 for ac_func in pthread_sigmask
10036do :
10037 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010038if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010039 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010040#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010041_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010042 case $ac_sys_system in
10043 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010046
10047 ;;
10048 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010049fi
10050done
10051
Christian Heimesf77b4b22013-08-21 13:26:05 +020010052 for ac_func in pthread_atfork
10053do :
10054 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10055if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10056 cat >>confdefs.h <<_ACEOF
10057#define HAVE_PTHREAD_ATFORK 1
10058_ACEOF
10059
10060fi
10061done
10062
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010063fi
10064
10065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010066# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010067
Matthias Kloseb9621712010-04-24 17:59:49 +000010068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10069$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010071if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010073 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076 ipv6=no
10077 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10079$as_echo "yes" >&6; }
10080 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081
10082 ipv6=yes
10083 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010085else
Martin v. Löwis11437992002-04-12 09:54:03 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010088/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089 /* AF_INET6 available check */
10090#include <sys/types.h>
10091#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010092int
10093main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010095int domain = AF_INET6;
10096 ;
10097 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098}
Martin v. Löwis11437992002-04-12 09:54:03 +000010099_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010100if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10103$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010105
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010106else
Matthias Kloseb159a552010-04-25 21:00:44 +000010107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10109$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010110 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010115if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10117$as_echo_n "checking if RFC2553 API is available... " >&6; }
10118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010120
10121 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010122#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010123int
10124main ()
10125{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010126struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010127 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010128 ;
10129 return 0;
10130}
Matthias Kloseb159a552010-04-25 21:00:44 +000010131
Martin v. Löwis11437992002-04-12 09:54:03 +000010132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010133if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010134
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010136$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010137 ipv6=yes
10138
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010139else
Matthias Kloseb159a552010-04-25 21:00:44 +000010140
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010142$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010143 ipv6=no
10144
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010145fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010147fi
10148
10149if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010150 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010151
10152fi
10153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154fi
10155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156
10157ipv6type=unknown
10158ipv6lib=none
10159ipv6trylibc=no
10160
10161if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10163$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010164 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10165 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010166 case $i in
10167 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010169/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010170
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171#include <netinet/in.h>
10172#ifdef IPV6_INRIA_VERSION
10173yes
10174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010175_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010178 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010180rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010181
10182 ;;
10183 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010185/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010186
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010187#include <netinet/in.h>
10188#ifdef __KAME__
10189yes
10190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010191_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194 ipv6type=$i;
10195 ipv6lib=inet6
10196 ipv6libdir=/usr/local/v6/lib
10197 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010198fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010199rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200
10201 ;;
10202 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010204/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010205
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010206#include <features.h>
10207#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10208yes
10209#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010210_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213 ipv6type=$i;
10214 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217
10218 ;;
10219 linux-inet6)
10220 if test -d /usr/inet6; then
10221 ipv6type=$i
10222 ipv6lib=inet6
10223 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010224 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010225 fi
10226 ;;
10227 solaris)
10228 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010229 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230 ipv6type=$i
10231 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010232 fi
10233 fi
10234 ;;
10235 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010237/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010238
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010239#include <sys/param.h>
10240#ifdef _TOSHIBA_INET6
10241yes
10242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010243_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010244if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010245 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010246 ipv6type=$i;
10247 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010248 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010250rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010251
10252 ;;
10253 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010256
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257#include </usr/local/v6/include/sys/v6config.h>
10258#ifdef __V6D__
10259yes
10260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010261_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264 ipv6type=$i;
10265 ipv6lib=v6;
10266 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010267 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010269rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010270
10271 ;;
10272 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010274/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010275
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010276#include <sys/param.h>
10277#ifdef _ZETA_MINAMI_INET6
10278yes
10279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010280_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010283 ipv6type=$i;
10284 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010285 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010287rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010288
10289 ;;
10290 esac
10291 if test "$ipv6type" != "unknown"; then
10292 break
10293 fi
10294 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10296$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010297fi
10298
10299if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10300 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10301 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10302 echo "using lib$ipv6lib"
10303 else
10304 if test $ipv6trylibc = "yes"; then
10305 echo "using libc"
10306 else
10307 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10308 echo "You need to fetch lib$ipv6lib.a from appropriate"
10309 echo 'ipv6 kit and compile beforehand.'
10310 exit 1
10311 fi
10312 fi
10313fi
10314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10316$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010318/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010319
10320 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010321int
10322main ()
10323{
10324FSIORefNum fRef = 0
10325 ;
10326 return 0;
10327}
Matthias Kloseb159a552010-04-25 21:00:44 +000010328
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010330if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010331
Matthias Kloseb159a552010-04-25 21:00:44 +000010332
Matthias Kloseb9621712010-04-24 17:59:49 +000010333$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10336$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010337
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010338else
Matthias Kloseb159a552010-04-25 21:00:44 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010342
10343fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10345
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010346# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10348$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010351if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352 withval=$with_doc_strings;
10353fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010354
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010355
10356if test -z "$with_doc_strings"
10357then with_doc_strings="yes"
10358fi
10359if test "$with_doc_strings" != "no"
10360then
10361
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010363
10364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10366$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010367
Antoine Pitrou042b1282010-08-13 21:15:58 +000010368# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10370$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010372# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010373if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010375if test "$withval" != no
10376then
10377
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010379
Matthias Kloseb9621712010-04-24 17:59:49 +000010380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10381$as_echo "yes" >&6; }
10382else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10383$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010384fi
10385else
Matthias Kloseb9621712010-04-24 17:59:49 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388fi
10389
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010390
10391# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10393$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010396if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397 withval=$with_pymalloc;
10398fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010399
Neil Schemenauera35c6882001-02-27 04:45:05 +000010400
Neil Schemenauer16c22972002-03-22 15:34:49 +000010401if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010402then
10403 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010404fi
10405if test "$with_pymalloc" != "no"
10406then
Martin v. Löwis11437992002-04-12 09:54:03 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010409
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010410 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10413$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010414
Benjamin Peterson05159c42009-12-03 03:01:27 +000010415# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10417$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010418
10419# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010420if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010421 withval=$with_valgrind;
10422else
10423 with_valgrind=no
10424fi
10425
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10427$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010428if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010429 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 +020010430if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010431
Matthias Kloseb9621712010-04-24 17:59:49 +000010432$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010433
10434else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010435 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010436
10437fi
10438
10439
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010440 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010441fi
10442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010443# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010444
Guido van Rossum98935bf2001-09-05 19:13:16 +000010445DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010446
Guido van Rossume97ee181999-12-20 21:27:22 +000010447# the dlopen() function means we might want to use dynload_shlib.o. some
10448# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010449for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010450do :
10451 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010452if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010454#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010455_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010456
Guido van Rossume97ee181999-12-20 21:27:22 +000010457fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010458done
Guido van Rossume97ee181999-12-20 21:27:22 +000010459
Michael W. Hudson54241132001-12-07 15:38:26 +000010460
Guido van Rossume97ee181999-12-20 21:27:22 +000010461# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10462# loading of modules.
10463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10465$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010466if test -z "$DYNLOADFILE"
10467then
10468 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010469 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10470 if test "$ac_cv_func_dlopen" = yes
10471 then DYNLOADFILE="dynload_shlib.o"
10472 else DYNLOADFILE="dynload_aix.o"
10473 fi
10474 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010475 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010476 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10477 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010478 *)
10479 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10480 # out any dynamic loading
10481 if test "$ac_cv_func_dlopen" = yes
10482 then DYNLOADFILE="dynload_shlib.o"
10483 else DYNLOADFILE="dynload_stub.o"
10484 fi
10485 ;;
10486 esac
10487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10489$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010490if test "$DYNLOADFILE" != "dynload_stub.o"
10491then
Martin v. Löwis11437992002-04-12 09:54:03 +000010492
Matthias Kloseb9621712010-04-24 17:59:49 +000010493$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010494
10495fi
10496
Neil Schemenauer4e425612001-06-19 15:44:15 +000010497# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10498
Michael W. Hudson54241132001-12-07 15:38:26 +000010499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10501$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010502if test -z "$MACHDEP_OBJS"
10503then
Jack Jansene578a632001-08-15 01:27:14 +000010504 MACHDEP_OBJS=$extra_machdep_objs
10505else
10506 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010507fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010508if test -z "$MACHDEP_OBJS"; then
10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10510$as_echo "none" >&6; }
10511else
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10513$as_echo "$MACHDEP_OBJS" >&6; }
10514fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010515
Guido van Rossum627b2d71993-12-24 10:39:16 +000010516# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010517for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010518 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010519 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010520 futimens futimes gai_strerror \
10521 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010522 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010523 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010524 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10525 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010526 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010527 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010528 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010529 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010530 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010531 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010532 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10533 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010534 sigaction sigaltstack siginterrupt sigpending sigrelse \
10535 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010536 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010537 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010538 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010539do :
10540 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10541ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010542if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010544#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010545_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010546
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010547fi
10548done
10549
Michael W. Hudson54241132001-12-07 15:38:26 +000010550
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010551ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10552 #include <dirent.h>
10553"
10554if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10555
10556$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10557
10558fi
10559
10560
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010561# For some functions, having a definition is not sufficient, since
10562# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10564$as_echo_n "checking for chroot... " >&6; }
10565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010566/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010567#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010568int
10569main ()
10570{
10571void *x=chroot
10572 ;
10573 return 0;
10574}
10575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010577
Matthias Kloseb9621712010-04-24 17:59:49 +000010578$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010579
Matthias Kloseb159a552010-04-25 21:00:44 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010581$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010582else
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585
10586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10589$as_echo_n "checking for link... " >&6; }
10590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010591/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010592#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010593int
10594main ()
10595{
10596void *x=link
10597 ;
10598 return 0;
10599}
10600_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010601if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010602
Matthias Kloseb9621712010-04-24 17:59:49 +000010603$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010604
Matthias Kloseb159a552010-04-25 21:00:44 +000010605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010610
10611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10614$as_echo_n "checking for symlink... " >&6; }
10615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010617#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010618int
10619main ()
10620{
10621void *x=symlink
10622 ;
10623 return 0;
10624}
10625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010627
Matthias Kloseb9621712010-04-24 17:59:49 +000010628$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010629
Matthias Kloseb159a552010-04-25 21:00:44 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010632else
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10634$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010635
10636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10639$as_echo_n "checking for fchdir... " >&6; }
10640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010641/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010642#include <unistd.h>
10643int
10644main ()
10645{
10646void *x=fchdir
10647 ;
10648 return 0;
10649}
10650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010654
Matthias Kloseb159a552010-04-25 21:00:44 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10659$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010660
10661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10664$as_echo_n "checking for fsync... " >&6; }
10665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010666/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010667#include <unistd.h>
10668int
10669main ()
10670{
10671void *x=fsync
10672 ;
10673 return 0;
10674}
10675_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010677
Matthias Kloseb9621712010-04-24 17:59:49 +000010678$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010679
Matthias Kloseb159a552010-04-25 21:00:44 +000010680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010682else
Matthias Kloseb9621712010-04-24 17:59:49 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010685
10686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10689$as_echo_n "checking for fdatasync... " >&6; }
10690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010691/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010692#include <unistd.h>
10693int
10694main ()
10695{
10696void *x=fdatasync
10697 ;
10698 return 0;
10699}
10700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010701if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010702
Matthias Kloseb9621712010-04-24 17:59:49 +000010703$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010704
Matthias Kloseb159a552010-04-25 21:00:44 +000010705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010707else
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010710
10711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10714$as_echo_n "checking for epoll... " >&6; }
10715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010716/* end confdefs.h. */
10717#include <sys/epoll.h>
10718int
10719main ()
10720{
10721void *x=epoll_create
10722 ;
10723 return 0;
10724}
10725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010729
Matthias Kloseb159a552010-04-25 21:00:44 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010731$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010732else
Matthias Kloseb9621712010-04-24 17:59:49 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10734$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010735
10736fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10739$as_echo_n "checking for epoll_create1... " >&6; }
10740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10741/* end confdefs.h. */
10742#include <sys/epoll.h>
10743int
10744main ()
10745{
10746void *x=epoll_create1
10747 ;
10748 return 0;
10749}
10750_ACEOF
10751if ac_fn_c_try_compile "$LINENO"; then :
10752
10753$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10754
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10756$as_echo "yes" >&6; }
10757else
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759$as_echo "no" >&6; }
10760
10761fi
10762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10764$as_echo_n "checking for kqueue... " >&6; }
10765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010766/* end confdefs.h. */
10767
10768#include <sys/types.h>
10769#include <sys/event.h>
10770
10771int
10772main ()
10773{
10774int x=kqueue()
10775 ;
10776 return 0;
10777}
10778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010779if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010780
Matthias Kloseb9621712010-04-24 17:59:49 +000010781$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010782
Matthias Kloseb159a552010-04-25 21:00:44 +000010783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010785else
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010788
10789fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10792$as_echo_n "checking for prlimit... " >&6; }
10793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10794/* end confdefs.h. */
10795
10796#include <sys/time.h>
10797#include <sys/resource.h>
10798
10799int
10800main ()
10801{
10802void *x=prlimit
10803 ;
10804 return 0;
10805}
10806_ACEOF
10807if ac_fn_c_try_compile "$LINENO"; then :
10808
10809$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10810
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10812$as_echo "yes" >&6; }
10813else
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
10816
10817fi
10818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10819
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820# On some systems (eg. FreeBSD 5), we would find a definition of the
10821# functions ctermid_r, setgroups in the library, but no prototype
10822# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10823# address to avoid compiler warnings and potential miscompilations
10824# because of the missing prototypes.
10825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10827$as_echo_n "checking for ctermid_r... " >&6; }
10828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010830
Martin v. Löwisd5843682002-11-21 20:41:28 +000010831#include <stdio.h>
10832
Martin v. Löwisd5843682002-11-21 20:41:28 +000010833int
10834main ()
10835{
10836void* p = ctermid_r
10837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010842
Matthias Kloseb9621712010-04-24 17:59:49 +000010843$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010844
Matthias Kloseb159a552010-04-25 21:00:44 +000010845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010846$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010850
10851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10855$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010856if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010857 $as_echo_n "(cached) " >&6
10858else
10859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010861#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010862int
10863main ()
10864{
10865void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010866
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010867 ;
10868 return 0;
10869}
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010872 ac_cv_flock_decl=yes
10873else
10874 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010875
10876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010878
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010879fi
10880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10881$as_echo "$ac_cv_flock_decl" >&6; }
10882if test "x${ac_cv_flock_decl}" = xyes; then
10883 for ac_func in flock
10884do :
10885 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010886if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010887 cat >>confdefs.h <<_ACEOF
10888#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010889_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010890
Antoine Pitroua3000072010-09-07 14:52:42 +000010891else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010893$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010894if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010895 $as_echo_n "(cached) " >&6
10896else
10897 ac_check_lib_save_LIBS=$LIBS
10898LIBS="-lbsd $LIBS"
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10900/* end confdefs.h. */
10901
10902/* Override any GCC internal prototype to avoid an error.
10903 Use char because int might match the return type of a GCC
10904 builtin and then its argument prototype would still apply. */
10905#ifdef __cplusplus
10906extern "C"
10907#endif
10908char flock ();
10909int
10910main ()
10911{
10912return flock ();
10913 ;
10914 return 0;
10915}
10916_ACEOF
10917if ac_fn_c_try_link "$LINENO"; then :
10918 ac_cv_lib_bsd_flock=yes
10919else
10920 ac_cv_lib_bsd_flock=no
10921fi
10922rm -f core conftest.err conftest.$ac_objext \
10923 conftest$ac_exeext conftest.$ac_ext
10924LIBS=$ac_check_lib_save_LIBS
10925fi
10926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10927$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010928if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010929 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010930
10931
10932$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10933
10934
10935fi
10936
10937
10938fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010939done
10940
Antoine Pitroua3000072010-09-07 14:52:42 +000010941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942
Matthias Kloseb9621712010-04-24 17:59:49 +000010943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10944$as_echo_n "checking for getpagesize... " >&6; }
10945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010946/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010947
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010948#include <unistd.h>
10949
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010950int
10951main ()
10952{
10953void* p = getpagesize
10954 ;
10955 return 0;
10956}
10957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010958if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010961
Matthias Kloseb159a552010-04-25 21:00:44 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010964else
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10966$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010967
10968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010970
Victor Stinner984890f2011-11-24 13:53:38 +010010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10972$as_echo_n "checking for broken unsetenv... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10974/* end confdefs.h. */
10975
10976#include <stdlib.h>
10977
10978int
10979main ()
10980{
10981int res = unsetenv("DUMMY")
10982 ;
10983 return 0;
10984}
10985_ACEOF
10986if ac_fn_c_try_compile "$LINENO"; then :
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
10989else
10990
10991$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10992
10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10994$as_echo "yes" >&6; }
10995
10996fi
10997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010999for ac_prog in true
11000do
11001 # Extract the first word of "$ac_prog", so it can be a program name with args.
11002set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11004$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011005if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011007else
11008 if test -n "$TRUE"; then
11009 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11010else
11011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11012for as_dir in $PATH
11013do
11014 IFS=$as_save_IFS
11015 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011016 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011017 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011019 $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 +000011020 break 2
11021 fi
11022done
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011025
11026fi
11027fi
11028TRUE=$ac_cv_prog_TRUE
11029if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11031$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011032else
Matthias Kloseb9621712010-04-24 17:59:49 +000011033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011035fi
11036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011037
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011038 test -n "$TRUE" && break
11039done
11040test -n "$TRUE" || TRUE="/bin/true"
11041
11042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11044$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011045if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011047else
11048 ac_check_lib_save_LIBS=$LIBS
11049LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011051/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011053/* Override any GCC internal prototype to avoid an error.
11054 Use char because int might match the return type of a GCC
11055 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056#ifdef __cplusplus
11057extern "C"
11058#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011059char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060int
11061main ()
11062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064 ;
11065 return 0;
11066}
11067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069 ac_cv_lib_c_inet_aton=yes
11070else
Matthias Kloseb9621712010-04-24 17:59:49 +000011071 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011073rm -f core conftest.err conftest.$ac_objext \
11074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011075LIBS=$ac_check_lib_save_LIBS
11076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11078$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011079if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011080 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11083$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011084if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011085 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086else
11087 ac_check_lib_save_LIBS=$LIBS
11088LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011090/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011092/* Override any GCC internal prototype to avoid an error.
11093 Use char because int might match the return type of a GCC
11094 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011095#ifdef __cplusplus
11096extern "C"
11097#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011098char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099int
11100main ()
11101{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011103 ;
11104 return 0;
11105}
11106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011107if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108 ac_cv_lib_resolv_inet_aton=yes
11109else
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011112rm -f core conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011114LIBS=$ac_check_lib_save_LIBS
11115fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11117$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011118if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119 cat >>confdefs.h <<_ACEOF
11120#define HAVE_LIBRESOLV 1
11121_ACEOF
11122
11123 LIBS="-lresolv $LIBS"
11124
11125fi
11126
11127
11128fi
11129
11130
Christian Heimesd0764e22007-12-04 15:00:33 +000011131# On Tru64, chflags seems to be present, but calling it will
11132# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11134$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011135if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011139 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011140else
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011142/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011143
Christian Heimesd0764e22007-12-04 15:00:33 +000011144#include <sys/stat.h>
11145#include <unistd.h>
11146int main(int argc, char*argv[])
11147{
11148 if(chflags(argv[0], 0) != 0)
11149 return 1;
11150 return 0;
11151}
Ned Deily3eb67d52011-06-28 00:00:28 -070011152
Christian Heimesd0764e22007-12-04 15:00:33 +000011153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011154if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011155 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011156else
Matthias Kloseb9621712010-04-24 17:59:49 +000011157 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011161fi
11162
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11166$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011167if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011168 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011169if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011170 ac_cv_have_chflags="yes"
11171else
11172 ac_cv_have_chflags="no"
11173fi
11174
11175fi
11176if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011177
Matthias Kloseb9621712010-04-24 17:59:49 +000011178$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011179
11180fi
11181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11183$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011184if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011188 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011191/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011192
Christian Heimesd0764e22007-12-04 15:00:33 +000011193#include <sys/stat.h>
11194#include <unistd.h>
11195int main(int argc, char*argv[])
11196{
11197 if(lchflags(argv[0], 0) != 0)
11198 return 1;
11199 return 0;
11200}
Ned Deily3eb67d52011-06-28 00:00:28 -070011201
Christian Heimesd0764e22007-12-04 15:00:33 +000011202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011204 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011205else
Matthias Kloseb9621712010-04-24 17:59:49 +000011206 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11209 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011210fi
11211
11212
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11215$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011216if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011218if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011219 ac_cv_have_lchflags="yes"
11220else
11221 ac_cv_have_lchflags="no"
11222fi
11223
11224fi
11225if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011226
Matthias Kloseb9621712010-04-24 17:59:49 +000011227$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011228
11229fi
11230
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011231case $ac_sys_system/$ac_sys_release in
11232Darwin/*)
11233 _CUR_CFLAGS="${CFLAGS}"
11234 _CUR_LDFLAGS="${LDFLAGS}"
11235 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11236 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11237 ;;
11238esac
11239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11241$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011242if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011243 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011244else
11245 ac_check_lib_save_LIBS=$LIBS
11246LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011248/* end confdefs.h. */
11249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250/* Override any GCC internal prototype to avoid an error.
11251 Use char because int might match the return type of a GCC
11252 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011253#ifdef __cplusplus
11254extern "C"
11255#endif
11256char inflateCopy ();
11257int
11258main ()
11259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011260return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011266 ac_cv_lib_z_inflateCopy=yes
11267else
Matthias Kloseb9621712010-04-24 17:59:49 +000011268 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011270rm -f core conftest.err conftest.$ac_objext \
11271 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011272LIBS=$ac_check_lib_save_LIBS
11273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11275$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011276if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011277
Matthias Kloseb9621712010-04-24 17:59:49 +000011278$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011279
11280fi
11281
11282
11283case $ac_sys_system/$ac_sys_release in
11284Darwin/*)
11285 CFLAGS="${_CUR_CFLAGS}"
11286 LDFLAGS="${_CUR_LDFLAGS}"
11287 ;;
11288esac
11289
Matthias Kloseb9621712010-04-24 17:59:49 +000011290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11291$as_echo_n "checking for hstrerror... " >&6; }
11292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011293/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011294
Martin v. Löwise9416172003-05-03 10:12:45 +000011295#include <netdb.h>
11296
Martin v. Löwise9416172003-05-03 10:12:45 +000011297int
11298main ()
11299{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011300void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011301 ;
11302 return 0;
11303}
11304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011306
Matthias Kloseb9621712010-04-24 17:59:49 +000011307$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011308
Matthias Kloseb159a552010-04-25 21:00:44 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011311else
Matthias Kloseb9621712010-04-24 17:59:49 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011314
11315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011316rm -f core conftest.err conftest.$ac_objext \
11317 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011318
Matthias Kloseb9621712010-04-24 17:59:49 +000011319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11320$as_echo_n "checking for inet_aton... " >&6; }
11321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011323
Martin v. Löwis86d66262006-02-17 08:40:11 +000011324#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011325#include <sys/socket.h>
11326#include <netinet/in.h>
11327#include <arpa/inet.h>
11328
Martin v. Löwise9416172003-05-03 10:12:45 +000011329int
11330main ()
11331{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011332void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011333 ;
11334 return 0;
11335}
11336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011337if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011338
Matthias Kloseb9621712010-04-24 17:59:49 +000011339$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011340
Matthias Kloseb159a552010-04-25 21:00:44 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011342$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011343else
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11345$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011346
11347fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011348rm -f core conftest.err conftest.$ac_objext \
11349 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11352$as_echo_n "checking for inet_pton... " >&6; }
11353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011354/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011355
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011356#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011357#include <sys/socket.h>
11358#include <netinet/in.h>
11359#include <arpa/inet.h>
11360
Martin v. Löwise9416172003-05-03 10:12:45 +000011361int
11362main ()
11363{
11364void* p = inet_pton
11365 ;
11366 return 0;
11367}
11368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011370
Matthias Kloseb9621712010-04-24 17:59:49 +000011371$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011372
Matthias Kloseb159a552010-04-25 21:00:44 +000011373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011375else
Matthias Kloseb9621712010-04-24 17:59:49 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11377$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011378
11379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011381
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011382# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11384$as_echo_n "checking for setgroups... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011388#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011389#ifdef HAVE_GRP_H
11390#include <grp.h>
11391#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011392
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393int
11394main ()
11395{
11396void* p = setgroups
11397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011404
Matthias Kloseb159a552010-04-25 21:00:44 +000011405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011406$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011407else
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011410
11411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011414# check for openpty and forkpty
11415
11416for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011417do :
11418 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011419if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011422_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011423
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011424else
Matthias Kloseb9621712010-04-24 17:59:49 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11426$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011427if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011429else
Martin v. Löwis11437992002-04-12 09:54:03 +000011430 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011431LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435/* Override any GCC internal prototype to avoid an error.
11436 Use char because int might match the return type of a GCC
11437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011438#ifdef __cplusplus
11439extern "C"
11440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011441char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011442int
11443main ()
11444{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 ;
11447 return 0;
11448}
11449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011450if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011451 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452else
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011455rm -f core conftest.err conftest.$ac_objext \
11456 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011457LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11460$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011461if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011462 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011463 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11466$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011467if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011469else
11470 ac_check_lib_save_LIBS=$LIBS
11471LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473/* end confdefs.h. */
11474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475/* Override any GCC internal prototype to avoid an error.
11476 Use char because int might match the return type of a GCC
11477 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011478#ifdef __cplusplus
11479extern "C"
11480#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011481char openpty ();
11482int
11483main ()
11484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011491 ac_cv_lib_bsd_openpty=yes
11492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011495rm -f core conftest.err conftest.$ac_objext \
11496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011497LIBS=$ac_check_lib_save_LIBS
11498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11500$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011503 LIBS="$LIBS -lbsd"
11504fi
11505
11506
11507fi
11508
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509
11510fi
11511done
11512
11513for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011514do :
11515 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011516if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521else
Matthias Kloseb9621712010-04-24 17:59:49 +000011522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11523$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011524if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011525 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011526else
Martin v. Löwis11437992002-04-12 09:54:03 +000011527 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011528LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532/* Override any GCC internal prototype to avoid an error.
11533 Use char because int might match the return type of a GCC
11534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011535#ifdef __cplusplus
11536extern "C"
11537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011538char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011539int
11540main ()
11541{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011542return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011552rm -f core conftest.err conftest.$ac_objext \
11553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011554LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11557$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011558if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11563$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011564if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011566else
11567 ac_check_lib_save_LIBS=$LIBS
11568LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570/* end confdefs.h. */
11571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572/* Override any GCC internal prototype to avoid an error.
11573 Use char because int might match the return type of a GCC
11574 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011575#ifdef __cplusplus
11576extern "C"
11577#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011578char forkpty ();
11579int
11580main ()
11581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011583 ;
11584 return 0;
11585}
11586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011587if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011588 ac_cv_lib_bsd_forkpty=yes
11589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011592rm -f core conftest.err conftest.$ac_objext \
11593 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011594LIBS=$ac_check_lib_save_LIBS
11595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11597$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011600 LIBS="$LIBS -lbsd"
11601fi
11602
11603
11604fi
11605
Fred Drake8cef4cf2000-06-28 16:40:38 +000011606
11607fi
11608done
11609
Jack Jansendd19cf82001-12-06 22:36:17 +000011610
Christian Heimesb186d002008-03-18 15:15:01 +000011611# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011612for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011613do :
11614 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011615if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011616 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011618_ACEOF
11619
11620fi
11621done
11622
11623
Michael W. Hudson54241132001-12-07 15:38:26 +000011624# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011625for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011626do :
11627 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11628ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011629if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011632_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011633
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635done
11636
Michael W. Hudson54241132001-12-07 15:38:26 +000011637
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011638ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011640 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011641
Martin v. Löwis1142de32002-03-29 16:28:31 +000011642else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011644 *" dup2.$ac_objext "* ) ;;
11645 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011647esac
11648
Martin v. Löwis1142de32002-03-29 16:28:31 +000011649fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011650
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011651ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011652if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011653 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11654
11655else
11656 case " $LIBOBJS " in
11657 *" strdup.$ac_objext "* ) ;;
11658 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11659 ;;
11660esac
11661
11662fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011663
11664
11665for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011666do :
11667 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011668if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011670#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011673/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011675int
11676main ()
11677{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011678getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011679 ;
11680 return 0;
11681}
11682_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011683if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011684
Matthias Kloseb9621712010-04-24 17:59:49 +000011685$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011686
Guido van Rossum627b2d71993-12-24 10:39:16 +000011687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011689
Guido van Rossum627b2d71993-12-24 10:39:16 +000011690fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011691done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011692
Jack Jansen150753c2003-03-29 22:07:47 +000011693for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011694do :
11695 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011702#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011703int
11704main ()
11705{
11706setpgrp(0,0);
11707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011714
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011717
11718fi
11719done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011720
Thomas Wouters3a584202000-08-05 23:28:51 +000011721for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011722do :
11723 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011724if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011725 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011729/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011730#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011731int
11732main ()
11733{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_compile "$LINENO"; then :
11740
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741else
Skip Montanaro6dead952003-09-25 14:50:04 +000011742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011744
Martin v. Löwis11437992002-04-12 09:54:03 +000011745
Guido van Rossum627b2d71993-12-24 10:39:16 +000011746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011748
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011749fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011750done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011751
Michael W. Hudson54241132001-12-07 15:38:26 +000011752
Victor Stinnere0be4232011-10-25 13:06:09 +020011753for ac_func in clock_gettime
11754do :
11755 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11756if test "x$ac_cv_func_clock_gettime" = xyes; then :
11757 cat >>confdefs.h <<_ACEOF
11758#define HAVE_CLOCK_GETTIME 1
11759_ACEOF
11760
11761else
11762
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11764$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11765if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11766 $as_echo_n "(cached) " >&6
11767else
11768 ac_check_lib_save_LIBS=$LIBS
11769LIBS="-lrt $LIBS"
11770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11771/* end confdefs.h. */
11772
11773/* Override any GCC internal prototype to avoid an error.
11774 Use char because int might match the return type of a GCC
11775 builtin and then its argument prototype would still apply. */
11776#ifdef __cplusplus
11777extern "C"
11778#endif
11779char clock_gettime ();
11780int
11781main ()
11782{
11783return clock_gettime ();
11784 ;
11785 return 0;
11786}
11787_ACEOF
11788if ac_fn_c_try_link "$LINENO"; then :
11789 ac_cv_lib_rt_clock_gettime=yes
11790else
11791 ac_cv_lib_rt_clock_gettime=no
11792fi
11793rm -f core conftest.err conftest.$ac_objext \
11794 conftest$ac_exeext conftest.$ac_ext
11795LIBS=$ac_check_lib_save_LIBS
11796fi
11797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11798$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11799if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11800
11801 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11802
11803
11804$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11805
11806
11807fi
11808
11809
11810fi
11811done
11812
11813
11814for ac_func in clock_getres
11815do :
11816 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11817if test "x$ac_cv_func_clock_getres" = xyes; then :
11818 cat >>confdefs.h <<_ACEOF
11819#define HAVE_CLOCK_GETRES 1
11820_ACEOF
11821
11822else
11823
11824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11825$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11826if ${ac_cv_lib_rt_clock_getres+:} false; then :
11827 $as_echo_n "(cached) " >&6
11828else
11829 ac_check_lib_save_LIBS=$LIBS
11830LIBS="-lrt $LIBS"
11831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11832/* end confdefs.h. */
11833
11834/* Override any GCC internal prototype to avoid an error.
11835 Use char because int might match the return type of a GCC
11836 builtin and then its argument prototype would still apply. */
11837#ifdef __cplusplus
11838extern "C"
11839#endif
11840char clock_getres ();
11841int
11842main ()
11843{
11844return clock_getres ();
11845 ;
11846 return 0;
11847}
11848_ACEOF
11849if ac_fn_c_try_link "$LINENO"; then :
11850 ac_cv_lib_rt_clock_getres=yes
11851else
11852 ac_cv_lib_rt_clock_getres=no
11853fi
11854rm -f core conftest.err conftest.$ac_objext \
11855 conftest$ac_exeext conftest.$ac_ext
11856LIBS=$ac_check_lib_save_LIBS
11857fi
11858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11859$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11860if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11861
11862 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11863
11864
11865fi
11866
11867
11868fi
11869done
11870
11871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11873$as_echo_n "checking for major... " >&6; }
11874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011876
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011877#if defined(MAJOR_IN_MKDEV)
11878#include <sys/mkdev.h>
11879#elif defined(MAJOR_IN_SYSMACROS)
11880#include <sys/sysmacros.h>
11881#else
11882#include <sys/types.h>
11883#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011884
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011885int
11886main ()
11887{
11888
11889 makedev(major(0),minor(0));
11890
11891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011896
11897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11901$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011902
11903else
Skip Montanaro6dead952003-09-25 14:50:04 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011907
11908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011911
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011912# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011913# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11915$as_echo_n "checking for getaddrinfo... " >&6; }
11916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011917/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011918
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011919#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011920#include <sys/socket.h>
11921#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011922#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923
Martin v. Löwis11437992002-04-12 09:54:03 +000011924int
11925main ()
11926{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011927getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011928 ;
11929 return 0;
11930}
11931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011932if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011933 have_getaddrinfo=yes
11934else
Matthias Kloseb9621712010-04-24 17:59:49 +000011935 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
11939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11940$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011941if test $have_getaddrinfo = yes
11942then
Matthias Kloseb9621712010-04-24 17:59:49 +000011943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11944$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011945 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011947else
Matthias Kloseb9621712010-04-24 17:59:49 +000011948 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011949
11950if test "${enable_ipv6+set}" = set; then
11951 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11952else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011953 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011954fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011957/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011958
Stefan Krah19c21392012-11-22 23:47:32 +010011959#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011960#include <sys/types.h>
11961#include <netdb.h>
11962#include <string.h>
11963#include <sys/socket.h>
11964#include <netinet/in.h>
11965
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011966int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011967{
11968 int passive, gaierr, inet4 = 0, inet6 = 0;
11969 struct addrinfo hints, *ai, *aitop;
11970 char straddr[INET6_ADDRSTRLEN], strport[16];
11971
11972 for (passive = 0; passive <= 1; passive++) {
11973 memset(&hints, 0, sizeof(hints));
11974 hints.ai_family = AF_UNSPEC;
11975 hints.ai_flags = passive ? AI_PASSIVE : 0;
11976 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011977 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11979 (void)gai_strerror(gaierr);
11980 goto bad;
11981 }
11982 for (ai = aitop; ai; ai = ai->ai_next) {
11983 if (ai->ai_addr == NULL ||
11984 ai->ai_addrlen == 0 ||
11985 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11986 straddr, sizeof(straddr), strport, sizeof(strport),
11987 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11988 goto bad;
11989 }
11990 switch (ai->ai_family) {
11991 case AF_INET:
11992 if (strcmp(strport, "54321") != 0) {
11993 goto bad;
11994 }
11995 if (passive) {
11996 if (strcmp(straddr, "0.0.0.0") != 0) {
11997 goto bad;
11998 }
11999 } else {
12000 if (strcmp(straddr, "127.0.0.1") != 0) {
12001 goto bad;
12002 }
12003 }
12004 inet4++;
12005 break;
12006 case AF_INET6:
12007 if (strcmp(strport, "54321") != 0) {
12008 goto bad;
12009 }
12010 if (passive) {
12011 if (strcmp(straddr, "::") != 0) {
12012 goto bad;
12013 }
12014 } else {
12015 if (strcmp(straddr, "::1") != 0) {
12016 goto bad;
12017 }
12018 }
12019 inet6++;
12020 break;
12021 case AF_UNSPEC:
12022 goto bad;
12023 break;
12024 default:
12025 /* another family support? */
12026 break;
12027 }
12028 }
12029 }
12030
12031 if (!(inet4 == 0 || inet4 == 2))
12032 goto bad;
12033 if (!(inet6 == 0 || inet6 == 2))
12034 goto bad;
12035
12036 if (aitop)
12037 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012038 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012039
12040 bad:
12041 if (aitop)
12042 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012043 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012044}
12045
Martin v. Löwis11437992002-04-12 09:54:03 +000012046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012048 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012056fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012057
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12061$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12062
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012063if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012064then
12065 if test $ipv6 = yes
12066 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067 echo 'Fatal: You must get working getaddrinfo() function.'
12068 echo ' or you can specify "--disable-ipv6"'.
12069 exit 1
12070 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012071else
Martin v. Löwis11437992002-04-12 09:54:03 +000012072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012074
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012076
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012077for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012078do :
12079 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012080if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012083_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085fi
12086done
12087
Michael W. Hudson54241132001-12-07 15:38:26 +000012088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12091$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012097#include <sys/types.h>
12098#include <sys/time.h>
12099#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Martin v. Löwis11437992002-04-12 09:54:03 +000012101int
12102main ()
12103{
12104if ((struct tm *) 0)
12105return 0;
12106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012111 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012112else
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12118$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012119if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122
12123fi
12124
Matthias Kloseb9621712010-04-24 17:59:49 +000012125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12126$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012131/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012132#include <sys/types.h>
12133#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135int
12136main ()
12137{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138struct tm tm;
12139 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012140 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012146 ac_cv_struct_tm=time.h
12147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12153$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012154if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012155
Matthias Kloseb9621712010-04-24 17:59:49 +000012156$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157
12158fi
12159
Matthias Kloseb9621712010-04-24 17:59:49 +000012160ac_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 +000012161#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163"
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012165
12166cat >>confdefs.h <<_ACEOF
12167#define HAVE_STRUCT_TM_TM_ZONE 1
12168_ACEOF
12169
12170
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12174
Matthias Kloseb9621712010-04-24 17:59:49 +000012175$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012176
12177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12179"
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012184fi
12185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012187#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188_ACEOF
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12191$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012193 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194else
Matthias Kloseb9621712010-04-24 17:59:49 +000012195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012196/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012197#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198#if !HAVE_DECL_TZNAME
12199extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012201
Martin v. Löwis11437992002-04-12 09:54:03 +000012202int
12203main ()
12204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012211 ac_cv_var_tzname=yes
12212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215rm -f core conftest.err conftest.$ac_objext \
12216 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12219$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012220 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
Matthias Kloseb9621712010-04-24 17:59:49 +000012222$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224 fi
12225fi
12226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227ac_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 +020012228if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
12230cat >>confdefs.h <<_ACEOF
12231#define HAVE_STRUCT_STAT_ST_RDEV 1
12232_ACEOF
12233
12234
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012235fi
12236
Matthias Kloseb9621712010-04-24 17:59:49 +000012237ac_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 +020012238if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240cat >>confdefs.h <<_ACEOF
12241#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12242_ACEOF
12243
12244
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012245fi
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247ac_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 +020012248if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012249
12250cat >>confdefs.h <<_ACEOF
12251#define HAVE_STRUCT_STAT_ST_FLAGS 1
12252_ACEOF
12253
12254
12255fi
12256
Matthias Kloseb9621712010-04-24 17:59:49 +000012257ac_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 +020012258if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012259
12260cat >>confdefs.h <<_ACEOF
12261#define HAVE_STRUCT_STAT_ST_GEN 1
12262_ACEOF
12263
12264
12265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267ac_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 +020012268if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012269
12270cat >>confdefs.h <<_ACEOF
12271#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12272_ACEOF
12273
12274
12275fi
12276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277ac_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 +020012278if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012279
Martin v. Löwis11437992002-04-12 09:54:03 +000012280cat >>confdefs.h <<_ACEOF
12281#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12282_ACEOF
12283
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012286
12287else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012288 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012289 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12291 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012292esac
12293
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012294fi
12295
Michael W. Hudson54241132001-12-07 15:38:26 +000012296
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12299$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012302else
Matthias Kloseb159a552010-04-25 21:00:44 +000012303
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012306#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316 ac_cv_header_time_altzone=yes
12317else
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012322fi
12323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12325$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Matthias Kloseb9621712010-04-24 17:59:49 +000012328$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329
12330fi
12331
Guido van Rossumda88dad1995-01-26 00:46:29 +000012332was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12334$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012336/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012337
12338#include <sys/types.h>
12339#include <sys/select.h>
12340#include <sys/time.h>
12341
Martin v. Löwis11437992002-04-12 09:54:03 +000012342int
12343main ()
12344{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012345;
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 ;
12347 return 0;
12348}
12349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012351
12352
Matthias Kloseb9621712010-04-24 17:59:49 +000012353$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012355 was_it_defined=yes
12356
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12360$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12363$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012364if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012368/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012369#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012370int
12371main ()
12372{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012373struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379 ac_cv_struct_addrinfo=yes
12380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12384fi
12385
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12387$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391
12392fi
12393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12395$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012396if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012400/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401
12402# include <sys/types.h>
12403# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012404int
12405main ()
12406{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 ;
12409 return 0;
12410}
12411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012413 ac_cv_struct_sockaddr_storage=yes
12414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12418fi
12419
Matthias Kloseb9621712010-04-24 17:59:49 +000012420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12421$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Kloseb9621712010-04-24 17:59:49 +000012424$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012425
12426fi
12427
Guido van Rossum627b2d71993-12-24 10:39:16 +000012428# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012429
Matthias Kloseb9621712010-04-24 17:59:49 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12431$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012432if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012434else
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012437$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012438int
12439main ()
12440{
12441static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012442test_array [0] = 0;
12443return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
12445 ;
12446 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012447}
Martin v. Löwis11437992002-04-12 09:54:03 +000012448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012449if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012450 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012451else
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12457$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012458if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012460
12461fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12464$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012465if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012476 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012477 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012478 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480 char const *const *pcpcc;
12481 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 /* NEC SVR4.0.2 mips cc rejects this. */
12483 struct point {int x, y;};
12484 static struct point const zero = {0,0};
12485 /* AIX XL C 1.02.0.0 rejects this.
12486 It does not let you subtract one const X* pointer from another in
12487 an arm of an if-expression whose if-part is not a constant
12488 expression */
12489 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 ++pcpcc;
12493 ppc = (char**) pcpcc;
12494 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012495 { /* SCO 3.2v4 cc rejects this sort of thing. */
12496 char tx;
12497 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012499
Martin v. Löwis11437992002-04-12 09:54:03 +000012500 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 }
12503 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12504 int x[] = {25, 17};
12505 const int *foo = &x[0];
12506 ++foo;
12507 }
12508 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12509 typedef const int *iptr;
12510 iptr p = 0;
12511 ++p;
12512 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012513 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012515 struct s { int j; const int *ap[3]; } bx;
12516 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 }
12518 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12519 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012521 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012523#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012524
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ;
12526 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012527}
Martin v. Löwis11437992002-04-12 09:54:03 +000012528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012529if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012530 ac_cv_c_const=yes
12531else
Matthias Kloseb9621712010-04-24 17:59:49 +000012532 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12537$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012538if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012541
12542fi
12543
Michael W. Hudson54241132001-12-07 15:38:26 +000012544
Guido van Rossumda88dad1995-01-26 00:46:29 +000012545works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12547$as_echo_n "checking for working volatile... " >&6; }
12548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012550
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012554volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012559if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012560 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012561else
Skip Montanaro6dead952003-09-25 14:50:04 +000012562
Matthias Kloseb9621712010-04-24 17:59:49 +000012563$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012564
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012565
Guido van Rossum627b2d71993-12-24 10:39:16 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12569$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012570
Guido van Rossumda88dad1995-01-26 00:46:29 +000012571works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12573$as_echo_n "checking for working signed char... " >&6; }
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012576
Martin v. Löwis11437992002-04-12 09:54:03 +000012577int
12578main ()
12579{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012580signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 ;
12582 return 0;
12583}
12584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012586 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012587else
Skip Montanaro6dead952003-09-25 14:50:04 +000012588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012590
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012591
Guido van Rossum7f43da71994-08-01 12:15:30 +000012592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12595$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012596
Guido van Rossumda88dad1995-01-26 00:46:29 +000012597have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12599$as_echo_n "checking for prototypes... " >&6; }
12600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012601/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012602int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012603int
12604main ()
12605{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012606return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 ;
12608 return 0;
12609}
12610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
Matthias Kloseb159a552010-04-25 21:00:44 +000012615 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12619$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012620
Guido van Rossumda88dad1995-01-26 00:46:29 +000012621works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12623$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012625/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012626
12627#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012628int foo(int x, ...) {
12629 va_list va;
12630 va_start(va, x);
12631 va_arg(va, int);
12632 va_arg(va, char *);
12633 va_arg(va, double);
12634 return 0;
12635}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012636
Martin v. Löwis11437992002-04-12 09:54:03 +000012637int
12638main ()
12639{
Guido van Rossum90eea071996-08-30 20:58:57 +000012640return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 ;
12642 return 0;
12643}
12644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
12647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012650 works=yes
12651
Guido van Rossum627b2d71993-12-24 10:39:16 +000012652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12655$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656
Martin v. Löwisd6320502004-08-12 13:45:08 +000012657# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12659$as_echo_n "checking for socketpair... " >&6; }
12660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012661/* end confdefs.h. */
12662
12663#include <sys/types.h>
12664#include <sys/socket.h>
12665
12666int
12667main ()
12668{
12669void *x=socketpair
12670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012677
Matthias Kloseb159a552010-04-25 21:00:44 +000012678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012679$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012680else
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12682$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012683
12684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012686
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012687# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12689$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012691/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012692#include <sys/types.h>
12693#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012694int
12695main ()
12696{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012697struct sockaddr x;
12698x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ;
12700 return 0;
12701}
12702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703if ac_fn_c_try_compile "$LINENO"; then :
12704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12705$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012708
12709else
Matthias Kloseb9621712010-04-24 17:59:49 +000012710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12711$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012712
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012715
Guido van Rossumda88dad1995-01-26 00:46:29 +000012716va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12718$as_echo_n "checking whether va_list is an array... " >&6; }
12719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012720/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012721
12722#ifdef HAVE_STDARG_PROTOTYPES
12723#include <stdarg.h>
12724#else
12725#include <varargs.h>
12726#endif
12727
Martin v. Löwis11437992002-04-12 09:54:03 +000012728int
12729main ()
12730{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ;
12733 return 0;
12734}
12735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012736if ac_fn_c_try_compile "$LINENO"; then :
12737
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012738else
Skip Montanaro6dead952003-09-25 14:50:04 +000012739
Martin v. Löwis11437992002-04-12 09:54:03 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Guido van Rossumda88dad1995-01-26 00:46:29 +000012743 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12748$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012751
12752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012754if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12759$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012760 OLD_CFLAGS=$CFLAGS
12761 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012763/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012764
12765# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767int
12768main ()
12769{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012770
12771 char *name;
12772 struct hostent *he, *res;
12773 char buffer[2048];
12774 int buflen = 2048;
12775 int h_errnop;
12776
12777 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
12779 ;
12780 return 0;
12781}
12782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
Matthias Kloseb9621712010-04-24 17:59:49 +000012785 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12791$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012792
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012793else
Skip Montanaro6dead952003-09-25 14:50:04 +000012794
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12796$as_echo "no" >&6; }
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12798$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012800/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012801
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012802# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Martin v. Löwis11437992002-04-12 09:54:03 +000012804int
12805main ()
12806{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012807
12808 char *name;
12809 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012810 char buffer[2048];
12811 int buflen = 2048;
12812 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012813
Matthias Kloseb159a552010-04-25 21:00:44 +000012814 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
12816 ;
12817 return 0;
12818}
12819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824
Matthias Kloseb159a552010-04-25 21:00:44 +000012825$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012826
Matthias Kloseb9621712010-04-24 17:59:49 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12828$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012829
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012830else
Skip Montanaro6dead952003-09-25 14:50:04 +000012831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12833$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12835$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12837/* end confdefs.h. */
12838
12839# include <netdb.h>
12840
12841int
12842main ()
12843{
12844
12845 char *name;
12846 struct hostent *he;
12847 struct hostent_data data;
12848
12849 (void) gethostbyname_r(name, he, &data);
12850
12851 ;
12852 return 0;
12853}
12854_ACEOF
12855if ac_fn_c_try_compile "$LINENO"; then :
12856
12857 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12858
12859
12860$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12861
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12863$as_echo "yes" >&6; }
12864
12865else
12866
12867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12868$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012869
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012878 CFLAGS=$OLD_CFLAGS
12879
12880else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882 for ac_func in gethostbyname
12883do :
12884 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012885if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012887#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012888_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012889
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012890fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012891done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012892
Michael W. Hudson54241132001-12-07 15:38:26 +000012893
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012894fi
12895
Michael W. Hudson54241132001-12-07 15:38:26 +000012896
12897
12898
12899
12900
12901
Guido van Rossum627b2d71993-12-24 10:39:16 +000012902# checks for system services
12903# (none yet)
12904
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012906ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012907if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012908
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012909else
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12911$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012912if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012914else
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012916LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920/* Override any GCC internal prototype to avoid an error.
12921 Use char because int might match the return type of a GCC
12922 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012923#ifdef __cplusplus
12924extern "C"
12925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012926char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012927int
12928main ()
12929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 ;
12932 return 0;
12933}
12934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012940rm -f core conftest.err conftest.$ac_objext \
12941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012942LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12945$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012946if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 cat >>confdefs.h <<_ACEOF
12948#define HAVE_LIBIEEE 1
12949_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012951 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953fi
12954
Michael W. Hudson54241132001-12-07 15:38:26 +000012955
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012956fi
12957
Michael W. Hudson54241132001-12-07 15:38:26 +000012958
Guido van Rossum7f253911997-05-09 02:42:48 +000012959# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12961$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012964if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012966if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012967then
12968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Matthias Kloseb9621712010-04-24 17:59:49 +000012971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12972$as_echo "yes" >&6; }
12973else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12974$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012975fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12978$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979fi
12980
Guido van Rossum7f253911997-05-09 02:42:48 +000012981
Guido van Rossum7f43da71994-08-01 12:15:30 +000012982# check for --with-libm=...
12983
Guido van Rossum563e7081996-09-10 18:20:48 +000012984case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012985Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012986*) LIBM=-lm
12987esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12989$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012994if test "$withval" = no
12995then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12997$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012998elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012999then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13001$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013002else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013003fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013004else
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13006$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007fi
13008
Guido van Rossum7f43da71994-08-01 12:15:30 +000013009
13010# check for --with-libc=...
13011
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13013$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013016if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013018if test "$withval" = no
13019then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13021$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013022elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013023then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13025$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013026else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013027fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013028else
Matthias Kloseb9621712010-04-24 17:59:49 +000013029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13030$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031fi
13032
Guido van Rossum7f43da71994-08-01 12:15:30 +000013033
Stefan Krah1919b7e2012-03-21 18:25:23 +010013034# **************************************
13035# * Check for gcc x64 inline assembler *
13036# **************************************
13037
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13039$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041/* end confdefs.h. */
13042
13043int
13044main ()
13045{
13046
13047 __asm__ __volatile__ ("movq %rcx, %rax");
13048
13049 ;
13050 return 0;
13051}
13052_ACEOF
13053if ac_fn_c_try_compile "$LINENO"; then :
13054 have_gcc_asm_for_x64=yes
13055else
13056 have_gcc_asm_for_x64=no
13057fi
13058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13060$as_echo "$have_gcc_asm_for_x64" >&6; }
13061if test "$have_gcc_asm_for_x64" = yes
13062then
13063
13064$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13065
13066fi
13067
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013068# **************************************************
13069# * Check for various properties of floating point *
13070# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13073$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013074if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013076else
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013079 ac_cv_little_endian_double=no
13080else
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013082/* end confdefs.h. */
13083
13084#include <string.h>
13085int main() {
13086 double x = 9006104071832581.0;
13087 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13088 return 0;
13089 else
13090 return 1;
13091}
13092
13093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013094if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013095 ac_cv_little_endian_double=yes
13096else
Matthias Kloseb9621712010-04-24 17:59:49 +000013097 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013101fi
13102
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013103fi
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13106$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013107if test "$ac_cv_little_endian_double" = yes
13108then
13109
Matthias Kloseb9621712010-04-24 17:59:49 +000013110$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013111
13112fi
13113
Matthias Kloseb9621712010-04-24 17:59:49 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13115$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013116if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013117 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013118else
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013121 ac_cv_big_endian_double=no
13122else
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013124/* end confdefs.h. */
13125
13126#include <string.h>
13127int main() {
13128 double x = 9006104071832581.0;
13129 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13130 return 0;
13131 else
13132 return 1;
13133}
13134
13135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013136if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013137 ac_cv_big_endian_double=yes
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013143fi
13144
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013145fi
13146
Matthias Kloseb9621712010-04-24 17:59:49 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13148$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013149if test "$ac_cv_big_endian_double" = yes
13150then
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013153
13154fi
13155
13156# Some ARM platforms use a mixed-endian representation for doubles.
13157# While Python doesn't currently have full support for these platforms
13158# (see e.g., issue 1762561), we can at least make sure that float <-> string
13159# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13161$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013162if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013163 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013164else
13165
Matthias Kloseb9621712010-04-24 17:59:49 +000013166if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013167 ac_cv_mixed_endian_double=no
13168else
Matthias Kloseb9621712010-04-24 17:59:49 +000013169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013170/* end confdefs.h. */
13171
13172#include <string.h>
13173int main() {
13174 double x = 9006104071832581.0;
13175 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13176 return 0;
13177 else
13178 return 1;
13179}
13180
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183 ac_cv_mixed_endian_double=yes
13184else
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013189fi
13190
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013191fi
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13194$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013195if test "$ac_cv_mixed_endian_double" = yes
13196then
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013199
13200fi
13201
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013202# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013203# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013204# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013205# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013206# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013207# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013208
13209# This inline assembler syntax may also work for suncc and icc,
13210# so we try it on all platforms.
13211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13213$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013215/* end confdefs.h. */
13216
13217int
13218main ()
13219{
13220
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013221 unsigned short cw;
13222 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13223 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013224
13225 ;
13226 return 0;
13227}
13228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013230 have_gcc_asm_for_x87=yes
13231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013233fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13236$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013237if test "$have_gcc_asm_for_x87" = yes
13238then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013242fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13245$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247/* end confdefs.h. */
13248
13249int
13250main ()
13251{
13252
13253 unsigned int fpcr;
13254 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13255 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13256
13257 ;
13258 return 0;
13259}
13260_ACEOF
13261if ac_fn_c_try_compile "$LINENO"; then :
13262 have_gcc_asm_for_mc68881=yes
13263else
13264 have_gcc_asm_for_mc68881=no
13265fi
13266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13268$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13269if test "$have_gcc_asm_for_mc68881" = yes
13270then
13271
13272$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13273
13274fi
13275
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013276# Detect whether system arithmetic is subject to x87-style double
13277# rounding issues. The result of this test has little meaning on non
13278# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13279# mode is round-to-nearest and double rounding issues are present, and
13280# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13282$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013283# $BASECFLAGS may affect the result
13284ac_save_cc="$CC"
13285CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013286if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013287 ac_cv_x87_double_rounding=no
13288else
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013290/* end confdefs.h. */
13291
13292#include <stdlib.h>
13293#include <math.h>
13294int main() {
13295 volatile double x, y, z;
13296 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13297 x = 0.99999999999999989; /* 1-2**-53 */
13298 y = 1./x;
13299 if (y != 1.)
13300 exit(0);
13301 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13302 x = 1e16;
13303 y = 2.99999;
13304 z = x + y;
13305 if (z != 1e16+4.)
13306 exit(0);
13307 /* both tests show evidence of double rounding */
13308 exit(1);
13309}
13310
13311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013312if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013313 ac_cv_x87_double_rounding=no
13314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013319fi
13320
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013321CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13323$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013324if test "$ac_cv_x87_double_rounding" = yes
13325then
13326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013328
13329fi
13330
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013331# ************************************
13332# * Check for mathematical functions *
13333# ************************************
13334
13335LIBS_SAVE=$LIBS
13336LIBS="$LIBS $LIBM"
13337
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013338for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13339do :
13340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013343 cat >>confdefs.h <<_ACEOF
13344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13345_ACEOF
13346
13347fi
13348done
13349
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013350for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013351do :
13352 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13353ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013354if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013355 cat >>confdefs.h <<_ACEOF
13356#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13357_ACEOF
13358
13359fi
13360done
13361
13362ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13363"
Victor Stinnere0be4232011-10-25 13:06:09 +020013364if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013365 ac_have_decl=1
13366else
13367 ac_have_decl=0
13368fi
13369
13370cat >>confdefs.h <<_ACEOF
13371#define HAVE_DECL_ISINF $ac_have_decl
13372_ACEOF
13373ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13374"
Victor Stinnere0be4232011-10-25 13:06:09 +020013375if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013376 ac_have_decl=1
13377else
13378 ac_have_decl=0
13379fi
13380
13381cat >>confdefs.h <<_ACEOF
13382#define HAVE_DECL_ISNAN $ac_have_decl
13383_ACEOF
13384ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13385"
Victor Stinnere0be4232011-10-25 13:06:09 +020013386if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013387 ac_have_decl=1
13388else
13389 ac_have_decl=0
13390fi
13391
13392cat >>confdefs.h <<_ACEOF
13393#define HAVE_DECL_ISFINITE $ac_have_decl
13394_ACEOF
13395
13396
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013397# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13398# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13400$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013401if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013402 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013403else
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013406 ac_cv_tanh_preserves_zero_sign=no
13407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013409/* end confdefs.h. */
13410
13411#include <math.h>
13412#include <stdlib.h>
13413int main() {
13414 /* return 0 if either negative zeros don't exist
13415 on this platform or if negative zeros exist
13416 and tanh(-0.) == -0. */
13417 if (atan2(0., -1.) == atan2(-0., -1.) ||
13418 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13419 else exit(1);
13420}
13421
13422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013423if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013424 ac_cv_tanh_preserves_zero_sign=yes
13425else
Matthias Kloseb9621712010-04-24 17:59:49 +000013426 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013430fi
13431
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013432fi
13433
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13435$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013436if test "$ac_cv_tanh_preserves_zero_sign" = yes
13437then
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013440
13441fi
13442
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013443if test "$ac_cv_func_log1p" = yes
13444then
13445 # On some versions of AIX, log1p(-0.) returns 0. instead of
13446 # -0. See issue #9920.
13447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13448$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013449 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013450 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013451else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013452
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013453 if test "$cross_compiling" = yes; then :
13454 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013455else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013458
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013459 #include <math.h>
13460 #include <stdlib.h>
13461 int main() {
13462 /* Fail if the signs of log1p(-0.) and -0. can be
13463 distinguished. */
13464 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13465 return 0;
13466 else
13467 return 1;
13468 }
13469
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013470_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013471if ac_fn_c_try_run "$LINENO"; then :
13472 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013473else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013474 ac_cv_log1p_drops_zero_sign=yes
13475fi
13476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013478fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013479
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013480fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013481
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13483$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13484fi
13485if test "$ac_cv_log1p_drops_zero_sign" = yes
13486then
13487
13488$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13489
13490fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013491
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013492LIBS=$LIBS_SAVE
13493
Mark Dickinsona614f042009-11-28 12:48:43 +000013494# For multiprocessing module, check that sem_open
13495# actually works. For FreeBSD versions <= 7.2,
13496# the kernel module that provides POSIX semaphores
13497# isn't loaded by default, so an attempt to call
13498# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13500$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013501if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013502 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013503else
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013505 ac_cv_posix_semaphores_enabled=yes
13506else
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013508/* end confdefs.h. */
13509
13510#include <unistd.h>
13511#include <fcntl.h>
13512#include <stdio.h>
13513#include <semaphore.h>
13514#include <sys/stat.h>
13515
13516int main(void) {
13517 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13518 if (a == SEM_FAILED) {
13519 perror("sem_open");
13520 return 1;
13521 }
13522 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013523 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013524 return 0;
13525}
13526
13527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013528if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013529 ac_cv_posix_semaphores_enabled=yes
13530else
Matthias Kloseb9621712010-04-24 17:59:49 +000013531 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013535fi
13536
13537
Mark Dickinsona614f042009-11-28 12:48:43 +000013538fi
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13541$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013542if test $ac_cv_posix_semaphores_enabled = no
13543then
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013546
13547fi
13548
Mark Dickinson10683072009-04-18 21:18:19 +000013549# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13551$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013552if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013554else
Matthias Kloseb9621712010-04-24 17:59:49 +000013555 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013556 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013557else
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013559/* end confdefs.h. */
13560
13561#include <unistd.h>
13562#include <fcntl.h>
13563#include <stdio.h>
13564#include <semaphore.h>
13565#include <sys/stat.h>
13566
13567int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013568 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013569 int count;
13570 int res;
13571 if(a==SEM_FAILED){
13572 perror("sem_open");
13573 return 1;
13574
13575 }
13576 res = sem_getvalue(a, &count);
13577 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013578 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013579 return res==-1 ? 1 : 0;
13580}
13581
Mark Dickinson10683072009-04-18 21:18:19 +000013582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013583if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013584 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13589 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013590fi
13591
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593fi
13594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13596$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597if test $ac_cv_broken_sem_getvalue = yes
13598then
13599
Matthias Kloseb9621712010-04-24 17:59:49 +000013600$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
13602fi
13603
Mark Dickinsonbd792642009-03-18 20:06:12 +000013604# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13606$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013607# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013609 enableval=$enable_big_digits; case $enable_big_digits in
13610yes)
13611 enable_big_digits=30 ;;
13612no)
13613 enable_big_digits=15 ;;
1361415|30)
13615 ;;
13616*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013617 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 +000013618esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13620$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013621
13622cat >>confdefs.h <<_ACEOF
13623#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13624_ACEOF
13625
13626
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13629$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013630fi
13631
13632
Guido van Rossumef2255b2000-03-10 22:30:29 +000013633# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013634ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013635if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013639
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013640 wchar_h="yes"
13641
Guido van Rossumef2255b2000-03-10 22:30:29 +000013642else
Martin v. Löwis11437992002-04-12 09:54:03 +000013643 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013644
13645fi
13646
Michael W. Hudson54241132001-12-07 15:38:26 +000013647
Martin v. Löwis11437992002-04-12 09:54:03 +000013648
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013649# determine wchar_t size
13650if test "$wchar_h" = yes
13651then
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13657$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013658if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13662"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Martin v. Löwis11437992002-04-12 09:54:03 +000013664else
Matthias Kloseb9621712010-04-24 17:59:49 +000013665 if test "$ac_cv_type_wchar_t" = yes; then
13666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013668as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670 else
13671 ac_cv_sizeof_wchar_t=0
13672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013674
Martin v. Löwis11437992002-04-12 09:54:03 +000013675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13677$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013678
13679
13680
Martin v. Löwis11437992002-04-12 09:54:03 +000013681cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013682#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013683_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013684
Michael W. Hudson54241132001-12-07 15:38:26 +000013685
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013686fi
13687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13689$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013690have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013692/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013693
13694#include <tcl.h>
13695#if TCL_UTF_MAX != 6
13696# error "NOT UCS4_TCL"
13697#endif
13698int
13699main ()
13700{
13701
13702 ;
13703 return 0;
13704}
13705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013706if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013707
13708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013710
13711 have_ucs4_tcl=yes
13712
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13716$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013717
Skip Montanaro6dead952003-09-25 14:50:04 +000013718# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013719if test "$wchar_h" = yes
13720then
13721 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13723$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013724 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013725 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013726else
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013729 ac_cv_wchar_t_signed=yes
13730else
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013732/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013733
13734 #include <wchar.h>
13735 int main()
13736 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013737 /* Success: exit code 0 */
13738 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013739 }
13740
13741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013743 ac_cv_wchar_t_signed=yes
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013749fi
13750
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013751fi
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13754$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755fi
13756
Georg Brandl52d168a2008-01-07 18:10:24 +000013757# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013758if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013759 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013760then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013761 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013762
Matthias Kloseb9621712010-04-24 17:59:49 +000013763$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013764
Georg Brandl52d168a2008-01-07 18:10:24 +000013765else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013766 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013767fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13769$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013770
13771# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13773$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013776else
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 ac_cv_c_bigendian=unknown
13778 # See if we're dealing with a universal compiler.
13779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13780/* end confdefs.h. */
13781#ifndef __APPLE_CC__
13782 not a universal capable compiler
13783 #endif
13784 typedef int dummy;
13785
Skip Montanaro6dead952003-09-25 14:50:04 +000013786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
13788
13789 # Check for potential -arch flags. It is not universal unless
13790 # there are at least two -arch flags with different values.
13791 ac_arch=
13792 ac_prev=
13793 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13794 if test -n "$ac_prev"; then
13795 case $ac_word in
13796 i?86 | x86_64 | ppc | ppc64)
13797 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13798 ac_arch=$ac_word
13799 else
13800 ac_cv_c_bigendian=universal
13801 break
13802 fi
13803 ;;
13804 esac
13805 ac_prev=
13806 elif test "x$ac_word" = "x-arch"; then
13807 ac_prev=arch
13808 fi
13809 done
13810fi
13811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812 if test $ac_cv_c_bigendian = unknown; then
13813 # See if sys/param.h defines the BYTE_ORDER macro.
13814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013815/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013816#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013817 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819int
13820main ()
13821{
Matthias Kloseb9621712010-04-24 17:59:49 +000013822#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13823 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13824 && LITTLE_ENDIAN)
13825 bogus endian macros
13826 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
13828 ;
13829 return 0;
13830}
13831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013832if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013833 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013835/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013836#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013838
Martin v. Löwis11437992002-04-12 09:54:03 +000013839int
13840main ()
13841{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013842#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013843 not big endian
13844 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
13846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013851 ac_cv_c_bigendian=yes
13852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013856fi
13857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13858 fi
13859 if test $ac_cv_c_bigendian = unknown; then
13860 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013863#include <limits.h>
13864
Martin v. Löwis11437992002-04-12 09:54:03 +000013865int
13866main ()
13867{
Matthias Kloseb9621712010-04-24 17:59:49 +000013868#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13869 bogus endian macros
13870 #endif
13871
Martin v. Löwis11437992002-04-12 09:54:03 +000013872 ;
13873 return 0;
13874}
13875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013876if ac_fn_c_try_compile "$LINENO"; then :
13877 # It does; now see whether it defined to _BIG_ENDIAN or not.
13878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13879/* end confdefs.h. */
13880#include <limits.h>
13881
13882int
13883main ()
13884{
13885#ifndef _BIG_ENDIAN
13886 not big endian
13887 #endif
13888
13889 ;
13890 return 0;
13891}
13892_ACEOF
13893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013895else
Matthias Kloseb9621712010-04-24 17:59:49 +000013896 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13899fi
13900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13901 fi
13902 if test $ac_cv_c_bigendian = unknown; then
13903 # Compile a test program.
13904 if test "$cross_compiling" = yes; then :
13905 # Try to guess by grepping values from an object file.
13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907/* end confdefs.h. */
13908short int ascii_mm[] =
13909 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13910 short int ascii_ii[] =
13911 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13912 int use_ascii (int i) {
13913 return ascii_mm[i] + ascii_ii[i];
13914 }
13915 short int ebcdic_ii[] =
13916 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13917 short int ebcdic_mm[] =
13918 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13919 int use_ebcdic (int i) {
13920 return ebcdic_mm[i] + ebcdic_ii[i];
13921 }
13922 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924int
13925main ()
13926{
13927return use_ascii (foo) == use_ebcdic (foo);
13928 ;
13929 return 0;
13930}
13931_ACEOF
13932if ac_fn_c_try_compile "$LINENO"; then :
13933 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13934 ac_cv_c_bigendian=yes
13935 fi
13936 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13937 if test "$ac_cv_c_bigendian" = unknown; then
13938 ac_cv_c_bigendian=no
13939 else
13940 # finding both strings is unlikely to happen, but who knows?
13941 ac_cv_c_bigendian=unknown
13942 fi
13943 fi
13944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013946else
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013948/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013950int
13951main ()
13952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013953
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 /* Are we little or big endian? From Harbison&Steele. */
13955 union
13956 {
13957 long int l;
13958 char c[sizeof (long int)];
13959 } u;
13960 u.l = 1;
13961 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962
13963 ;
13964 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013965}
Martin v. Löwis11437992002-04-12 09:54:03 +000013966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013967if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013968 ac_cv_c_bigendian=no
13969else
Matthias Kloseb9621712010-04-24 17:59:49 +000013970 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13979$as_echo "$ac_cv_c_bigendian" >&6; }
13980 case $ac_cv_c_bigendian in #(
13981 yes)
13982 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13983;; #(
13984 no)
13985 ;; #(
13986 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 ;; #(
13991 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013992 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013993 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013995
Michael W. Hudson54241132001-12-07 15:38:26 +000013996
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013997# ABI version string for Python extension modules. This appears between the
13998# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13999# from the following attributes which affect the ABI of this Python build (in
14000# this order):
14001#
14002# * The Python implementation (always 'cpython-' for us)
14003# * The major and minor version numbers
14004# * --with-pydebug (adds a 'd')
14005# * --with-pymalloc (adds a 'm')
14006# * --with-wide-unicode (adds a 'u')
14007#
14008# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014009# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14010# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014011
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14013$as_echo_n "checking ABIFLAGS... " >&6; }
14014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14015$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14017$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014018SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14020$as_echo "$SOABI" >&6; }
14021
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014022
14023case $ac_sys_system in
14024 Linux*|GNU*)
14025 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14026 *)
14027 EXT_SUFFIX=${SHLIB_SUFFIX};;
14028esac
14029
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14031$as_echo_n "checking LDVERSION... " >&6; }
14032LDVERSION='$(VERSION)$(ABIFLAGS)'
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14034$as_echo "$LDVERSION" >&6; }
14035
doko@python.org87421192013-01-26 11:39:31 +010014036
14037LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
14038
14039
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014040# Check whether right shifting a negative integer extends the sign bit
14041# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14043$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014044if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014046else
Martin v. Löwis11437992002-04-12 09:54:03 +000014047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014049 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014050else
Matthias Kloseb9621712010-04-24 17:59:49 +000014051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014052/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014053
14054int main()
14055{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014056 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014057}
14058
Martin v. Löwis11437992002-04-12 09:54:03 +000014059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014060if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014061 ac_cv_rshift_extends_sign=yes
14062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14066 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014067fi
14068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069fi
14070
Matthias Kloseb9621712010-04-24 17:59:49 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14072$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014073if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014074then
Martin v. Löwis11437992002-04-12 09:54:03 +000014075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014077
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014078fi
14079
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014080# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14082$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014083if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014085else
Martin v. Löwis11437992002-04-12 09:54:03 +000014086
Matthias Kloseb9621712010-04-24 17:59:49 +000014087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014088/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014089#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014090int
14091main ()
14092{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014093
14094 FILE *f = fopen("/dev/null", "r");
14095 flockfile(f);
14096 getc_unlocked(f);
14097 funlockfile(f);
14098
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ;
14100 return 0;
14101}
14102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014103if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014104 ac_cv_have_getc_unlocked=yes
14105else
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 ac_cv_have_getc_unlocked=no
14107fi
14108rm -f core conftest.err conftest.$ac_objext \
14109 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014110fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14113$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014114if test "$ac_cv_have_getc_unlocked" = yes
14115then
Martin v. Löwis11437992002-04-12 09:54:03 +000014116
Matthias Kloseb9621712010-04-24 17:59:49 +000014117$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014118
14119fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014120
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014121# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014122# save the value of LIBS so we don't actually link Python with readline
14123LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014124
Gregory P. Smith18820942008-09-07 06:24:49 +000014125# On some systems we need to link readline to a termcap compatible
14126# library. NOTE: Keep the precedence of listed libraries synchronised
14127# with setup.py.
14128py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14130$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014131for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014132 if test -z "$py_libtermcap"; then
14133 READLINE_LIBS="-lreadline"
14134 else
14135 READLINE_LIBS="-lreadline -l$py_libtermcap"
14136 fi
14137 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014139/* end confdefs.h. */
14140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014141/* Override any GCC internal prototype to avoid an error.
14142 Use char because int might match the return type of a GCC
14143 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014144#ifdef __cplusplus
14145extern "C"
14146#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014147char readline ();
14148int
14149main ()
14150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014152 ;
14153 return 0;
14154}
14155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014157 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159rm -f core conftest.err conftest.$ac_objext \
14160 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014161 if test $py_cv_lib_readline = yes; then
14162 break
14163 fi
14164done
14165# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14166#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014167if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14169$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014170else
Matthias Kloseb9621712010-04-24 17:59:49 +000014171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14172$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014173
Matthias Kloseb9621712010-04-24 17:59:49 +000014174$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014175
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014176fi
14177
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014178# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14180$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014181if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014183else
14184 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014185LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014187/* end confdefs.h. */
14188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189/* Override any GCC internal prototype to avoid an error.
14190 Use char because int might match the return type of a GCC
14191 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014192#ifdef __cplusplus
14193extern "C"
14194#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014195char rl_callback_handler_install ();
14196int
14197main ()
14198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014200 ;
14201 return 0;
14202}
14203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014204if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014205 ac_cv_lib_readline_rl_callback_handler_install=yes
14206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014211LIBS=$ac_check_lib_save_LIBS
14212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14214$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014218
14219fi
14220
14221
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014222# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014224/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014225#include <readline/readline.h>
14226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014227if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014228 have_readline=yes
14229else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014230 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014231
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014232fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014233rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014234if test $have_readline = yes
14235then
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014238#include <readline/readline.h>
14239
14240_ACEOF
14241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014243
Matthias Kloseb9621712010-04-24 17:59:49 +000014244$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014245
14246fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014247rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014250/* end confdefs.h. */
14251#include <readline/readline.h>
14252
14253_ACEOF
14254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014258
14259fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014260rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014261
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014262fi
14263
Martin v. Löwis0daad592001-09-30 21:09:59 +000014264# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14266$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014267if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014269else
Martin v. Löwis11437992002-04-12 09:54:03 +000014270 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014271LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014275/* Override any GCC internal prototype to avoid an error.
14276 Use char because int might match the return type of a GCC
14277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014278#ifdef __cplusplus
14279extern "C"
14280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014281char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014282int
14283main ()
14284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 ;
14287 return 0;
14288}
14289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014291 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295rm -f core conftest.err conftest.$ac_objext \
14296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014297LIBS=$ac_check_lib_save_LIBS
14298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14300$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014301if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014302
Matthias Kloseb9621712010-04-24 17:59:49 +000014303$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014304
Martin v. Löwis0daad592001-09-30 21:09:59 +000014305fi
14306
Michael W. Hudson54241132001-12-07 15:38:26 +000014307
Thomas Wouters89d996e2007-09-08 17:39:28 +000014308# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14310$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014311if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014313else
14314 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014315LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014317/* end confdefs.h. */
14318
14319/* Override any GCC internal prototype to avoid an error.
14320 Use char because int might match the return type of a GCC
14321 builtin and then its argument prototype would still apply. */
14322#ifdef __cplusplus
14323extern "C"
14324#endif
14325char rl_completion_display_matches_hook ();
14326int
14327main ()
14328{
14329return rl_completion_display_matches_hook ();
14330 ;
14331 return 0;
14332}
14333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014334if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014335 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14336else
Matthias Kloseb9621712010-04-24 17:59:49 +000014337 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014339rm -f core conftest.err conftest.$ac_objext \
14340 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014341LIBS=$ac_check_lib_save_LIBS
14342fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14344$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014345if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014346
Matthias Kloseb9621712010-04-24 17:59:49 +000014347$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014348
14349fi
14350
14351
Martin v. Löwis0daad592001-09-30 21:09:59 +000014352# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14354$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014355if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014356 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014359LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363/* Override any GCC internal prototype to avoid an error.
14364 Use char because int might match the return type of a GCC
14365 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014366#ifdef __cplusplus
14367extern "C"
14368#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014369char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014370int
14371main ()
14372{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014378if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014380else
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014383rm -f core conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014385LIBS=$ac_check_lib_save_LIBS
14386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14388$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014389if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014392
Guido van Rossum353ae582001-07-10 16:45:32 +000014393fi
14394
Jack Jansendd19cf82001-12-06 22:36:17 +000014395
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014396# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014398/* end confdefs.h. */
14399#include <readline/readline.h>
14400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014401if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014402 have_readline=yes
14403else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014404 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014405
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014406fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014407rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014408if test $have_readline = yes
14409then
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014411/* end confdefs.h. */
14412#include <readline/readline.h>
14413
14414_ACEOF
14415if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014417
Matthias Kloseb9621712010-04-24 17:59:49 +000014418$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014419
14420fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014421rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014422
14423fi
14424
Martin v. Löwis82bca632006-02-10 20:49:30 +000014425# End of readline checks: restore LIBS
14426LIBS=$LIBS_no_readline
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14429$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014430if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014431 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014432else
Martin v. Löwis11437992002-04-12 09:54:03 +000014433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014435 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014436else
Matthias Kloseb9621712010-04-24 17:59:49 +000014437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014438/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014439
14440int main()
14441{
14442 int val1 = nice(1);
14443 if (val1 != -1 && val1 == nice(2))
14444 exit(0);
14445 exit(1);
14446}
14447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014449if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014450 ac_cv_broken_nice=yes
14451else
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014454rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14455 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014456fi
14457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458fi
14459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14461$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014462if test "$ac_cv_broken_nice" = yes
14463then
Martin v. Löwis11437992002-04-12 09:54:03 +000014464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014466
14467fi
14468
Matthias Kloseb9621712010-04-24 17:59:49 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14470$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014471if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014475 ac_cv_broken_poll=no
14476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014478/* end confdefs.h. */
14479
14480#include <poll.h>
14481
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014482int main()
14483{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014484 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014485 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014486
14487 close (42);
14488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014489 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014490 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014491 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014492 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014493 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014494 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014495 return 1;
14496}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014497
14498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014499if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014500 ac_cv_broken_poll=yes
14501else
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14505 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014508fi
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14511$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014512if test "$ac_cv_broken_poll" = yes
14513then
14514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014516
14517fi
14518
Brett Cannon43802422005-02-10 20:48:03 +000014519# 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 +000014520# (which is not required by ISO C or UNIX spec) and/or if we support
14521# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014522ac_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 +000014523#include <$ac_cv_struct_tm>
14524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525"
Victor Stinnere0be4232011-10-25 13:06:09 +020014526if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014527
14528cat >>confdefs.h <<_ACEOF
14529#define HAVE_STRUCT_TM_TM_ZONE 1
14530_ACEOF
14531
14532
14533fi
14534
14535if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14536
Matthias Kloseb9621712010-04-24 17:59:49 +000014537$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014538
14539else
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14541"
Victor Stinnere0be4232011-10-25 13:06:09 +020014542if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014543 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546fi
14547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014549#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014550_ACEOF
14551
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14553$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014554if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014555 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556else
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014558/* end confdefs.h. */
14559#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014560#if !HAVE_DECL_TZNAME
14561extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014562#endif
14563
14564int
14565main ()
14566{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014567return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014568 ;
14569 return 0;
14570}
14571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014573 ac_cv_var_tzname=yes
14574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014576fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014577rm -f core conftest.err conftest.$ac_objext \
14578 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14581$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014582 if test $ac_cv_var_tzname = yes; then
14583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014585
14586 fi
14587fi
14588
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014589
Martin v. Löwis1d459062005-03-14 21:23:33 +000014590# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14592$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014593if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014595else
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014598 ac_cv_working_tzset=no
14599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014601/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014602
14603#include <stdlib.h>
14604#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014605#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014606
14607#if HAVE_TZNAME
14608extern char *tzname[];
14609#endif
14610
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014611int main()
14612{
Brett Cannon18367812003-09-19 00:59:16 +000014613 /* Note that we need to ensure that not only does tzset(3)
14614 do 'something' with localtime, but it works as documented
14615 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014616 This includes making sure that tzname is set properly if
14617 tm->tm_zone does not exist since it is the alternative way
14618 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014619
14620 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014621 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014622 */
14623
Martin v. Löwis1d459062005-03-14 21:23:33 +000014624 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014625 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14626
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014627 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014628 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014629 if (localtime(&groundhogday)->tm_hour != 0)
14630 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014631#if HAVE_TZNAME
14632 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14633 if (strcmp(tzname[0], "UTC") ||
14634 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14635 exit(1);
14636#endif
Brett Cannon18367812003-09-19 00:59:16 +000014637
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014638 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014639 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014640 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014641 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014642#if HAVE_TZNAME
14643 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14644 exit(1);
14645#endif
Brett Cannon18367812003-09-19 00:59:16 +000014646
14647 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14648 tzset();
14649 if (localtime(&groundhogday)->tm_hour != 11)
14650 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014651#if HAVE_TZNAME
14652 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14653 exit(1);
14654#endif
14655
14656#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014657 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14658 exit(1);
14659 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14660 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014661#endif
Brett Cannon18367812003-09-19 00:59:16 +000014662
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014663 exit(0);
14664}
14665
14666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014667if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014668 ac_cv_working_tzset=yes
14669else
Matthias Kloseb9621712010-04-24 17:59:49 +000014670 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014674fi
14675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676fi
14677
Matthias Kloseb9621712010-04-24 17:59:49 +000014678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14679$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014680if test "$ac_cv_working_tzset" = yes
14681then
14682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014684
14685fi
14686
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014687# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14689$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014690if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014691 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014692else
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014694/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014695#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014696int
14697main ()
14698{
14699
14700struct stat st;
14701st.st_mtim.tv_nsec = 1;
14702
14703 ;
14704 return 0;
14705}
14706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014708 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014709else
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14713fi
14714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14716$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014717if test "$ac_cv_stat_tv_nsec" = yes
14718then
14719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014721
14722fi
14723
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014724# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14726$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014727if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014728 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014729else
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014731/* end confdefs.h. */
14732#include <sys/stat.h>
14733int
14734main ()
14735{
14736
14737struct stat st;
14738st.st_mtimespec.tv_nsec = 1;
14739
14740 ;
14741 return 0;
14742}
14743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014744if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014745 ac_cv_stat_tv_nsec2=yes
14746else
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14750fi
14751
Matthias Kloseb9621712010-04-24 17:59:49 +000014752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14753$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014754if test "$ac_cv_stat_tv_nsec2" = yes
14755then
14756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014758
14759fi
14760
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014761# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014762ac_save_cppflags="$CPPFLAGS"
14763CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014764
14765for ac_header in curses.h ncurses.h
14766do :
14767 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14768ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14769if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14770 cat >>confdefs.h <<_ACEOF
14771#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14772_ACEOF
14773
14774fi
14775
14776done
14777
14778
14779# On Solaris, term.h requires curses.h
14780for ac_header in term.h
14781do :
14782 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14783#ifdef HAVE_CURSES_H
14784#include <curses.h>
14785#endif
14786
14787"
14788if test "x$ac_cv_header_term_h" = xyes; then :
14789 cat >>confdefs.h <<_ACEOF
14790#define HAVE_TERM_H 1
14791_ACEOF
14792
14793fi
14794
14795done
14796
14797
Jack Jansen666b1e72001-10-31 12:11:48 +000014798# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14800$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014801if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014805/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014806#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014807int
14808main ()
14809{
Jack Jansen666b1e72001-10-31 12:11:48 +000014810
14811 int rtn;
14812 rtn = mvwdelch(0,0,0);
14813
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ;
14815 return 0;
14816}
14817_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014818if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014819 ac_cv_mvwdelch_is_expression=yes
14820else
Matthias Kloseb9621712010-04-24 17:59:49 +000014821 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14824fi
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14827$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014828
14829if test "$ac_cv_mvwdelch_is_expression" = yes
14830then
Martin v. Löwis11437992002-04-12 09:54:03 +000014831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014833
14834fi
14835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14837$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014838if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014842/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014843#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014844int
14845main ()
14846{
Jack Jansen666b1e72001-10-31 12:11:48 +000014847
14848 WINDOW *w;
14849 w->_flags = 0;
14850
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ;
14852 return 0;
14853}
14854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014855if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014856 ac_cv_window_has_flags=yes
14857else
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14861fi
14862
Matthias Kloseb9621712010-04-24 17:59:49 +000014863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14864$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014865
Jack Jansen666b1e72001-10-31 12:11:48 +000014866
14867if test "$ac_cv_window_has_flags" = yes
14868then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014871
14872fi
14873
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14875$as_echo_n "checking for is_term_resized... " >&6; }
14876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014877/* end confdefs.h. */
14878#include <curses.h>
14879int
14880main ()
14881{
14882void *x=is_term_resized
14883 ;
14884 return 0;
14885}
14886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014887if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014888
Matthias Kloseb9621712010-04-24 17:59:49 +000014889$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014890
Matthias Kloseb159a552010-04-25 21:00:44 +000014891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014892$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014893else
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14895$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014896
14897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14899
Matthias Kloseb9621712010-04-24 17:59:49 +000014900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14901$as_echo_n "checking for resize_term... " >&6; }
14902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014903/* end confdefs.h. */
14904#include <curses.h>
14905int
14906main ()
14907{
14908void *x=resize_term
14909 ;
14910 return 0;
14911}
14912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014913if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014916
Matthias Kloseb159a552010-04-25 21:00:44 +000014917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014918$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014919else
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14921$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014922
14923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14925
Matthias Kloseb9621712010-04-24 17:59:49 +000014926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14927$as_echo_n "checking for resizeterm... " >&6; }
14928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014929/* end confdefs.h. */
14930#include <curses.h>
14931int
14932main ()
14933{
14934void *x=resizeterm
14935 ;
14936 return 0;
14937}
14938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014939if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014942
Matthias Kloseb159a552010-04-25 21:00:44 +000014943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014944$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014945else
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14947$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014948
14949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014951# last curses configure check
14952CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14955$as_echo "$as_me: checking for device files" >&6;}
14956
14957if test "x$cross_compiling" = xyes; then
14958 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14960$as_echo_n "checking for /dev/ptmx... " >&6; }
14961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14962$as_echo "not set" >&6; }
14963 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14964 fi
14965 if test "${ac_cv_file__dev_ptc+set}" != set; then
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14967$as_echo_n "checking for /dev/ptc... " >&6; }
14968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14969$as_echo "not set" >&6; }
14970 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14971 fi
14972fi
14973
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14975$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014976if ${ac_cv_file__dev_ptmx+:} false; then :
14977 $as_echo_n "(cached) " >&6
14978else
14979 test "$cross_compiling" = yes &&
14980 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14981if test -r "/dev/ptmx"; then
14982 ac_cv_file__dev_ptmx=yes
14983else
14984 ac_cv_file__dev_ptmx=no
14985fi
14986fi
14987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14988$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14989if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014990
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014991fi
14992
14993if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014996
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14999$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015000if ${ac_cv_file__dev_ptc+:} false; then :
15001 $as_echo_n "(cached) " >&6
15002else
15003 test "$cross_compiling" = yes &&
15004 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15005if test -r "/dev/ptc"; then
15006 ac_cv_file__dev_ptc=yes
15007else
15008 ac_cv_file__dev_ptc=no
15009fi
15010fi
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15012$as_echo "$ac_cv_file__dev_ptc" >&6; }
15013if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015014
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015015fi
15016
15017if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015020
Neal Norwitz865400f2003-03-21 01:42:58 +000015021fi
15022
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015023if test "$have_long_long" = yes
15024then
Matthias Kloseb9621712010-04-24 17:59:49 +000015025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15026$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015027 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015028 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015029else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015031 ac_cv_have_long_long_format="cross -- assuming no"
15032 if test x$GCC = xyes; then
15033 save_CFLAGS=$CFLAGS
15034 CFLAGS="$CFLAGS -Werror -Wformat"
15035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15036/* end confdefs.h. */
15037
15038 #include <stdio.h>
15039 #include <stddef.h>
15040
15041int
15042main ()
15043{
15044
15045 char *buffer;
15046 sprintf(buffer, "%lld", (long long)123);
15047 sprintf(buffer, "%lld", (long long)-123);
15048 sprintf(buffer, "%llu", (unsigned long long)123);
15049
15050 ;
15051 return 0;
15052}
15053_ACEOF
15054if ac_fn_c_try_compile "$LINENO"; then :
15055 ac_cv_have_long_long_format=yes
15056
15057fi
15058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15059 CFLAGS=$save_CFLAGS
15060 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015061else
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015063/* end confdefs.h. */
15064
15065 #include <stdio.h>
15066 #include <stddef.h>
15067 #include <string.h>
15068
15069 #ifdef HAVE_SYS_TYPES_H
15070 #include <sys/types.h>
15071 #endif
15072
15073 int main()
15074 {
15075 char buffer[256];
15076
15077 if (sprintf(buffer, "%lld", (long long)123) < 0)
15078 return 1;
15079 if (strcmp(buffer, "123"))
15080 return 1;
15081
15082 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15083 return 1;
15084 if (strcmp(buffer, "-123"))
15085 return 1;
15086
15087 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15088 return 1;
15089 if (strcmp(buffer, "123"))
15090 return 1;
15091
15092 return 0;
15093 }
15094
15095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015096if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015097 ac_cv_have_long_long_format=yes
15098else
Matthias Kloseb9621712010-04-24 17:59:49 +000015099 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15102 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015103fi
15104
15105
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015106fi
15107
Matthias Kloseb9621712010-04-24 17:59:49 +000015108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15109$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015110fi
15111
Mark Dickinson89d7d412009-12-31 20:50:59 +000015112if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015113then
15114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015116
15117fi
15118
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015119if test $ac_sys_system = Darwin
15120then
15121 LIBS="$LIBS -framework CoreFoundation"
15122fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015123
Matthias Kloseb9621712010-04-24 17:59:49 +000015124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15125$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015126if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015130 ac_cv_have_size_t_format="cross -- assuming yes"
15131
Thomas Wouters477c8d52006-05-27 19:21:47 +000015132else
Matthias Kloseb9621712010-04-24 17:59:49 +000015133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015134/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015135
Thomas Wouters477c8d52006-05-27 19:21:47 +000015136#include <stdio.h>
15137#include <stddef.h>
15138#include <string.h>
15139
Christian Heimes2c181612007-12-17 20:04:13 +000015140#ifdef HAVE_SYS_TYPES_H
15141#include <sys/types.h>
15142#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015143
15144#ifdef HAVE_SSIZE_T
15145typedef ssize_t Py_ssize_t;
15146#elif SIZEOF_VOID_P == SIZEOF_LONG
15147typedef long Py_ssize_t;
15148#else
15149typedef int Py_ssize_t;
15150#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015151
Christian Heimes2c181612007-12-17 20:04:13 +000015152int main()
15153{
15154 char buffer[256];
15155
Thomas Wouters477c8d52006-05-27 19:21:47 +000015156 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15157 return 1;
15158
Thomas Wouters89f507f2006-12-13 04:49:30 +000015159 if (strcmp(buffer, "123"))
15160 return 1;
15161
15162 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15163 return 1;
15164
15165 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015166 return 1;
15167
15168 return 0;
15169}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015170
Thomas Wouters477c8d52006-05-27 19:21:47 +000015171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015172if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015173 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015179fi
15180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15183$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015184if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015187
15188fi
15189
Matthias Kloseb9621712010-04-24 17:59:49 +000015190ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015191#ifdef HAVE_SYS_TYPES_H
15192#include <sys/types.h>
15193#endif
15194#ifdef HAVE_SYS_SOCKET_H
15195#include <sys/socket.h>
15196#endif
15197
Matthias Kloseb9621712010-04-24 17:59:49 +000015198"
Victor Stinnere0be4232011-10-25 13:06:09 +020015199if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015200
Martin v. Löwis11437992002-04-12 09:54:03 +000015201else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015202
Matthias Kloseb9621712010-04-24 17:59:49 +000015203$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015204
15205fi
15206
Michael W. Hudson54241132001-12-07 15:38:26 +000015207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15209$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015210if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015211 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015212else
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015214 ac_cv_broken_mbstowcs=no
15215else
Matthias Kloseb9621712010-04-24 17:59:49 +000015216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015217/* end confdefs.h. */
15218
Stefan Krah19c21392012-11-22 23:47:32 +010015219#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015220#include<stdlib.h>
15221int main() {
15222 size_t len = -1;
15223 const char *str = "text";
15224 len = mbstowcs(NULL, str, 0);
15225 return (len != 4);
15226}
15227
15228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015229if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015230 ac_cv_broken_mbstowcs=no
15231else
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015236fi
15237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015238fi
15239
Matthias Kloseb9621712010-04-24 17:59:49 +000015240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15241$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015242if test "$ac_cv_broken_mbstowcs" = yes
15243then
15244
Matthias Kloseb9621712010-04-24 17:59:49 +000015245$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015246
15247fi
15248
Antoine Pitroub52ec782009-01-25 16:34:23 +000015249# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15251$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015252
15253# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015254if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015255 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015256if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015257then
15258
Matthias Kloseb9621712010-04-24 17:59:49 +000015259$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15262$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015263fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015264if test "$withval" = no
15265then
15266
15267$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15268
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15270$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015271fi
15272
Antoine Pitrou042b1282010-08-13 21:15:58 +000015273else
15274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15275$as_echo "no value specified" >&6; }
15276fi
15277
Antoine Pitroub52ec782009-01-25 16:34:23 +000015278
Matthias Kloseb17289e2012-03-15 19:51:34 +010015279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15280$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15281if ${ac_cv_computed_gotos+:} false; then :
15282 $as_echo_n "(cached) " >&6
15283else
15284 if test "$cross_compiling" = yes; then :
15285 if test "${with_computed_gotos+set}" = set; then
15286 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15287 else
15288 ac_cv_computed_gotos=no
15289 fi
15290else
15291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15292/* end confdefs.h. */
15293
15294int main(int argc, char **argv)
15295{
15296 static void *targets[1] = { &&LABEL1 };
15297 goto LABEL2;
15298LABEL1:
15299 return 0;
15300LABEL2:
15301 goto *targets[0];
15302 return 1;
15303}
15304
15305_ACEOF
15306if ac_fn_c_try_run "$LINENO"; then :
15307 ac_cv_computed_gotos=yes
15308else
15309 ac_cv_computed_gotos=no
15310fi
15311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15312 conftest.$ac_objext conftest.beam conftest.$ac_ext
15313fi
15314
15315fi
15316
15317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15318$as_echo "$ac_cv_computed_gotos" >&6; }
15319case "$ac_cv_computed_gotos" in yes*)
15320
15321$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15322
15323esac
15324
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015325case $ac_sys_system in
15326AIX*)
15327
15328$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15329 ;;
15330esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015331
Michael W. Hudson54241132001-12-07 15:38:26 +000015332
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015333
15334
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015335for h in `(cd $srcdir;echo Python/thread_*.h)`
15336do
15337 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15338done
15339
Michael W. Hudson54241132001-12-07 15:38:26 +000015340
Neal Norwitzd24499d2005-12-18 21:36:39 +000015341SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15343$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015344for dir in $SRCDIRS; do
15345 if test ! -d $dir; then
15346 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015347 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015348done
Matthias Kloseb9621712010-04-24 17:59:49 +000015349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15350$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015351
Stefan Krah1919b7e2012-03-21 18:25:23 +010015352# Availability of -O2:
15353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15354$as_echo_n "checking for -O2... " >&6; }
15355saved_cflags="$CFLAGS"
15356CFLAGS="-O2"
15357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358/* end confdefs.h. */
15359
15360int
15361main ()
15362{
15363
15364
15365 ;
15366 return 0;
15367}
15368_ACEOF
15369if ac_fn_c_try_compile "$LINENO"; then :
15370 have_O2=yes
15371else
15372 have_O2=no
15373fi
15374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15376$as_echo "$have_O2" >&6; }
15377CFLAGS="$saved_cflags"
15378
15379# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15380# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15382$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15383saved_cflags="$CFLAGS"
15384CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15385if test "$have_O2" = no; then
15386 CFLAGS=""
15387fi
15388if test "$cross_compiling" = yes; then :
15389 have_glibc_memmove_bug=undefined
15390else
15391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15392/* end confdefs.h. */
15393
15394#include <stdio.h>
15395#include <stdlib.h>
15396#include <string.h>
15397void foo(void *p, void *q) { memmove(p, q, 19); }
15398int main() {
15399 char a[32] = "123456789000000000";
15400 foo(&a[9], a);
15401 if (strcmp(a, "123456789123456789000000000") != 0)
15402 return 1;
15403 foo(a, &a[9]);
15404 if (strcmp(a, "123456789000000000") != 0)
15405 return 1;
15406 return 0;
15407}
15408
15409_ACEOF
15410if ac_fn_c_try_run "$LINENO"; then :
15411 have_glibc_memmove_bug=no
15412else
15413 have_glibc_memmove_bug=yes
15414fi
15415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15416 conftest.$ac_objext conftest.beam conftest.$ac_ext
15417fi
15418
15419CFLAGS="$saved_cflags"
15420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15421$as_echo "$have_glibc_memmove_bug" >&6; }
15422if test "$have_glibc_memmove_bug" = yes; then
15423
15424$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15425
15426fi
15427
15428if test "$have_gcc_asm_for_x87" = yes; then
15429 # Some versions of gcc miscompile inline asm:
15430 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15431 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15432 case $CC in
15433 *gcc*)
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15435$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15436 saved_cflags="$CFLAGS"
15437 CFLAGS="-O2"
15438 if test "$cross_compiling" = yes; then :
15439 have_ipa_pure_const_bug=undefined
15440else
15441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15442/* end confdefs.h. */
15443
15444 __attribute__((noinline)) int
15445 foo(int *p) {
15446 int r;
15447 asm ( "movl \$6, (%1)\n\t"
15448 "xorl %0, %0\n\t"
15449 : "=r" (r) : "r" (p) : "memory"
15450 );
15451 return r;
15452 }
15453 int main() {
15454 int p = 8;
15455 if ((foo(&p) ? : p) != 6)
15456 return 1;
15457 return 0;
15458 }
15459
15460_ACEOF
15461if ac_fn_c_try_run "$LINENO"; then :
15462 have_ipa_pure_const_bug=no
15463else
15464 have_ipa_pure_const_bug=yes
15465fi
15466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15467 conftest.$ac_objext conftest.beam conftest.$ac_ext
15468fi
15469
15470 CFLAGS="$saved_cflags"
15471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15472$as_echo "$have_ipa_pure_const_bug" >&6; }
15473 if test "$have_ipa_pure_const_bug" = yes; then
15474
15475$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15476
15477 fi
15478 ;;
15479 esac
15480fi
15481
Ned Deily322f5ba2013-11-21 23:01:59 -080015482# ensurepip option
15483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15484$as_echo_n "checking for ensurepip... " >&6; }
15485
15486# Check whether --with-ensurepip was given.
15487if test "${with_ensurepip+set}" = set; then :
15488 withval=$with_ensurepip;
15489else
15490 with_ensurepip=upgrade
15491fi
15492
15493case $with_ensurepip in #(
15494 yes|upgrade) :
15495 ENSUREPIP=upgrade ;; #(
15496 install) :
15497 ENSUREPIP=install ;; #(
15498 no) :
15499 ENSUREPIP=no ;; #(
15500 *) :
15501 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15502esac
15503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15504$as_echo "$ENSUREPIP" >&6; }
15505
15506
Guido van Rossum627b2d71993-12-24 10:39:16 +000015507# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015508ac_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 +000015509
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015510ac_config_files="$ac_config_files Modules/ld_so_aix"
15511
Martin v. Löwis11437992002-04-12 09:54:03 +000015512cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015513# This file is a shell script that caches the results of configure
15514# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015515# scripts and configure runs, see configure's option --config-cache.
15516# It is not useful on other systems. If it contains results you don't
15517# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015518#
Martin v. Löwis11437992002-04-12 09:54:03 +000015519# config.status only pays attention to the cache file if you give it
15520# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015521#
Skip Montanaro6dead952003-09-25 14:50:04 +000015522# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015523# loading this file, other *unset* `ac_cv_foo' will be assigned the
15524# following values.
15525
15526_ACEOF
15527
Guido van Rossumf78abae1997-01-21 22:02:36 +000015528# The following way of writing the cache mishandles newlines in values,
15529# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015531# Ultrix sh set writes to stderr and can't be redirected directly,
15532# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533(
15534 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15535 eval ac_val=\$$ac_var
15536 case $ac_val in #(
15537 *${as_nl}*)
15538 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015539 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15540$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 esac
15542 case $ac_var in #(
15543 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15545 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546 esac ;;
15547 esac
15548 done
15549
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015551 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15552 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 # `set' does not quote correctly, so add quotes: double-quote
15554 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015556 "s/'/'\\\\''/g;
15557 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015559 *)
15560 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015561 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563 esac |
15564 sort
15565) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015568 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015569 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015570 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15571 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015572 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15573 :end' >>confcache
15574if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15575 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015576 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15578$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015579 if test ! -f "$cache_file" || test -h "$cache_file"; then
15580 cat confcache >"$cache_file"
15581 else
15582 case $cache_file in #(
15583 */* | ?:*)
15584 mv -f confcache "$cache_file"$$ &&
15585 mv -f "$cache_file"$$ "$cache_file" ;; #(
15586 *)
15587 mv -f confcache "$cache_file" ;;
15588 esac
15589 fi
15590 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015591 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15593$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015594 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015595fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015596rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015598test "x$prefix" = xNONE && prefix=$ac_default_prefix
15599# Let make expand exec_prefix.
15600test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015601
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015602DEFS=-DHAVE_CONFIG_H
15603
Skip Montanaro6dead952003-09-25 14:50:04 +000015604ac_libobjs=
15605ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015606U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015607for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15608 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15612 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15614 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015615done
15616LIBOBJS=$ac_libobjs
15617
15618LTLIBOBJS=$ac_ltlibobjs
15619
15620
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622
Victor Stinnere0be4232011-10-25 13:06:09 +020015623: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015624ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015625ac_clean_files_save=$ac_clean_files
15626ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015627{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15628$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15629as_write_fail=0
15630cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015631#! $SHELL
15632# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015633# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015634# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015635# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015638ac_cs_recheck=false
15639ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015640
Matthias Kloseb9621712010-04-24 17:59:49 +000015641SHELL=\${CONFIG_SHELL-$SHELL}
15642export SHELL
15643_ASEOF
15644cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15645## -------------------- ##
15646## M4sh Initialization. ##
15647## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649# Be more Bourne compatible
15650DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015651if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 emulate sh
15653 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015655 # is contrary to our usage. Disable this feature.
15656 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 case `(set -o) 2>/dev/null` in #(
15660 *posix*) :
15661 set -o posix ;; #(
15662 *) :
15663 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015665fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015666
15667
Matthias Kloseb9621712010-04-24 17:59:49 +000015668as_nl='
15669'
15670export as_nl
15671# Printing a long string crashes Solaris 7 /usr/bin/printf.
15672as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15673as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15674as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15675# Prefer a ksh shell builtin over an external printf program on Solaris,
15676# but without wasting forks for bash or zsh.
15677if test -z "$BASH_VERSION$ZSH_VERSION" \
15678 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15679 as_echo='print -r --'
15680 as_echo_n='print -rn --'
15681elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15682 as_echo='printf %s\n'
15683 as_echo_n='printf %s'
15684else
15685 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15686 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15687 as_echo_n='/usr/ucb/echo -n'
15688 else
15689 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15690 as_echo_n_body='eval
15691 arg=$1;
15692 case $arg in #(
15693 *"$as_nl"*)
15694 expr "X$arg" : "X\\(.*\\)$as_nl";
15695 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15696 esac;
15697 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15698 '
15699 export as_echo_n_body
15700 as_echo_n='sh -c $as_echo_n_body as_echo'
15701 fi
15702 export as_echo_body
15703 as_echo='sh -c $as_echo_body as_echo'
15704fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
15706# The user is always right.
15707if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015708 PATH_SEPARATOR=:
15709 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15710 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15711 PATH_SEPARATOR=';'
15712 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715
15716# IFS
15717# We need space, tab and new line, in precisely that order. Quoting is
15718# there to prevent editors from complaining about space-tab.
15719# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15720# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721IFS=" "" $as_nl"
15722
15723# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015724as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015725case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726 *[\\/]* ) as_myself=$0 ;;
15727 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015728for as_dir in $PATH
15729do
15730 IFS=$as_save_IFS
15731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15733 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 ;;
15737esac
15738# We did not find ourselves, most probably we were run as `sh COMMAND'
15739# in which case we are not to be found in the path.
15740if test "x$as_myself" = x; then
15741 as_myself=$0
15742fi
15743if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15745 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746fi
15747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748# Unset variables that we do not need and which cause bugs (e.g. in
15749# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15750# suppresses any "Segmentation fault" message there. '((' could
15751# trigger a bug in pdksh 5.2.14.
15752for as_var in BASH_ENV ENV MAIL MAILPATH
15753do eval test x\${$as_var+set} = xset \
15754 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015755done
15756PS1='$ '
15757PS2='> '
15758PS4='+ '
15759
15760# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015761LC_ALL=C
15762export LC_ALL
15763LANGUAGE=C
15764export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765
Matthias Kloseb9621712010-04-24 17:59:49 +000015766# CDPATH.
15767(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15768
15769
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015770# as_fn_error STATUS ERROR [LINENO LOG_FD]
15771# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015772# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15773# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015774# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015775as_fn_error ()
15776{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015777 as_status=$1; test $as_status -eq 0 && as_status=1
15778 if test "$4"; then
15779 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15780 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015782 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015783 as_fn_exit $as_status
15784} # as_fn_error
15785
15786
15787# as_fn_set_status STATUS
15788# -----------------------
15789# Set $? to STATUS, without forking.
15790as_fn_set_status ()
15791{
15792 return $1
15793} # as_fn_set_status
15794
15795# as_fn_exit STATUS
15796# -----------------
15797# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15798as_fn_exit ()
15799{
15800 set +e
15801 as_fn_set_status $1
15802 exit $1
15803} # as_fn_exit
15804
15805# as_fn_unset VAR
15806# ---------------
15807# Portably unset VAR.
15808as_fn_unset ()
15809{
15810 { eval $1=; unset $1;}
15811}
15812as_unset=as_fn_unset
15813# as_fn_append VAR VALUE
15814# ----------------------
15815# Append the text in VALUE to the end of the definition contained in VAR. Take
15816# advantage of any shell optimizations that allow amortized linear growth over
15817# repeated appends, instead of the typical quadratic growth present in naive
15818# implementations.
15819if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15820 eval 'as_fn_append ()
15821 {
15822 eval $1+=\$2
15823 }'
15824else
15825 as_fn_append ()
15826 {
15827 eval $1=\$$1\$2
15828 }
15829fi # as_fn_append
15830
15831# as_fn_arith ARG...
15832# ------------------
15833# Perform arithmetic evaluation on the ARGs, and store the result in the
15834# global $as_val. Take advantage of shells that can avoid forks. The arguments
15835# must be portable across $(()) and expr.
15836if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15837 eval 'as_fn_arith ()
15838 {
15839 as_val=$(( $* ))
15840 }'
15841else
15842 as_fn_arith ()
15843 {
15844 as_val=`expr "$@" || test $? -eq 1`
15845 }
15846fi # as_fn_arith
15847
15848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849if expr a : '\(a\)' >/dev/null 2>&1 &&
15850 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15851 as_expr=expr
15852else
15853 as_expr=false
15854fi
15855
15856if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15857 as_basename=basename
15858else
15859 as_basename=false
15860fi
15861
Matthias Kloseb9621712010-04-24 17:59:49 +000015862if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15863 as_dirname=dirname
15864else
15865 as_dirname=false
15866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868as_me=`$as_basename -- "$0" ||
15869$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15870 X"$0" : 'X\(//\)$' \| \
15871 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015872$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873 sed '/^.*\/\([^/][^/]*\)\/*$/{
15874 s//\1/
15875 q
15876 }
15877 /^X\/\(\/\/\)$/{
15878 s//\1/
15879 q
15880 }
15881 /^X\/\(\/\).*/{
15882 s//\1/
15883 q
15884 }
15885 s/.*/./; q'`
15886
Matthias Kloseb9621712010-04-24 17:59:49 +000015887# Avoid depending upon Character Ranges.
15888as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15889as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15890as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15891as_cr_digits='0123456789'
15892as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015893
15894ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015895case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 xy) ECHO_C='\c';;
15900 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15901 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902 esac;;
15903*)
15904 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015905esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015908if test -d conf$$.dir; then
15909 rm -f conf$$.dir/conf$$.file
15910else
15911 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015912 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015914if (echo >conf$$.file) 2>/dev/null; then
15915 if ln -s conf$$.file conf$$ 2>/dev/null; then
15916 as_ln_s='ln -s'
15917 # ... but there are two gotchas:
15918 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15919 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015920 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015922 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 elif ln conf$$.file conf$$ 2>/dev/null; then
15924 as_ln_s=ln
15925 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015926 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015928else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015929 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15932rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015933
Matthias Kloseb9621712010-04-24 17:59:49 +000015934
15935# as_fn_mkdir_p
15936# -------------
15937# Create "$as_dir" as a directory, including parents if necessary.
15938as_fn_mkdir_p ()
15939{
15940
15941 case $as_dir in #(
15942 -*) as_dir=./$as_dir;;
15943 esac
15944 test -d "$as_dir" || eval $as_mkdir_p || {
15945 as_dirs=
15946 while :; do
15947 case $as_dir in #(
15948 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15949 *) as_qdir=$as_dir;;
15950 esac
15951 as_dirs="'$as_qdir' $as_dirs"
15952 as_dir=`$as_dirname -- "$as_dir" ||
15953$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15954 X"$as_dir" : 'X\(//\)[^/]' \| \
15955 X"$as_dir" : 'X\(//\)$' \| \
15956 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15957$as_echo X"$as_dir" |
15958 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15959 s//\1/
15960 q
15961 }
15962 /^X\(\/\/\)[^/].*/{
15963 s//\1/
15964 q
15965 }
15966 /^X\(\/\/\)$/{
15967 s//\1/
15968 q
15969 }
15970 /^X\(\/\).*/{
15971 s//\1/
15972 q
15973 }
15974 s/.*/./; q'`
15975 test -d "$as_dir" && break
15976 done
15977 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015978 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015979
15980
15981} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015982if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015984else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015986 as_mkdir_p=false
15987fi
15988
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015989
15990# as_fn_executable_p FILE
15991# -----------------------
15992# Test if FILE is an executable regular file.
15993as_fn_executable_p ()
15994{
15995 test -f "$1" && test -x "$1"
15996} # as_fn_executable_p
15997as_test_x='test -x'
15998as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015999
16000# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016001as_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 +000016002
16003# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016004as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016005
16006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016008## ----------------------------------- ##
16009## Main body of $CONFIG_STATUS script. ##
16010## ----------------------------------- ##
16011_ASEOF
16012test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16015# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016016# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017# values after options handling.
16018ac_log="
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016019This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016020generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016021
16022 CONFIG_FILES = $CONFIG_FILES
16023 CONFIG_HEADERS = $CONFIG_HEADERS
16024 CONFIG_LINKS = $CONFIG_LINKS
16025 CONFIG_COMMANDS = $CONFIG_COMMANDS
16026 $ $0 $@
16027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028on `(hostname || uname -n) 2>/dev/null | sed 1q`
16029"
16030
Martin v. Löwis11437992002-04-12 09:54:03 +000016031_ACEOF
16032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033case $ac_config_files in *"
16034"*) set x $ac_config_files; shift; ac_config_files=$*;;
16035esac
16036
16037case $ac_config_headers in *"
16038"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16039esac
16040
16041
16042cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016043# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016044config_files="$ac_config_files"
16045config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016047_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016048
Matthias Kloseb9621712010-04-24 17:59:49 +000016049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016050ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016051\`$as_me' instantiates files and other configuration actions
16052from templates according to the current configuration. Unless the files
16053and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016056
16057 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016059 --config print configuration, then exit
16060 -q, --quiet, --silent
16061 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 -d, --debug don't remove temporary files
16063 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016064 --file=FILE[:TEMPLATE]
16065 instantiate the configuration file FILE
16066 --header=FILE[:TEMPLATE]
16067 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
16069Configuration files:
16070$config_files
16071
16072Configuration headers:
16073$config_headers
16074
Matthias Kloseb9621712010-04-24 17:59:49 +000016075Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016076
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016078cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16079ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016080ac_cs_version="\\
Larry Hastingsf5002bd2014-03-16 23:05:59 -070016081python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016082configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016083 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016084
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016085Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016086This config.status script is free software; the Free Software Foundation
16087gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088
16089ac_pwd='$ac_pwd'
16090srcdir='$srcdir'
16091INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016092MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016093test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016094_ACEOF
16095
Matthias Kloseb9621712010-04-24 17:59:49 +000016096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16097# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016098ac_need_defaults=:
16099while test $# != 0
16100do
16101 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016102 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16104 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016105 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016106 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016107 --*=)
16108 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16109 ac_optarg=
16110 ac_shift=:
16111 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016113 ac_option=$1
16114 ac_optarg=$2
16115 ac_shift=shift
16116 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 esac
16118
Skip Montanaro6dead952003-09-25 14:50:04 +000016119 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016121 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16122 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 $as_echo "$ac_cs_version"; exit ;;
16125 --config | --confi | --conf | --con | --co | --c )
16126 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016127 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016128 debug=: ;;
16129 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016130 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016131 case $ac_optarg in
16132 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016133 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016134 esac
16135 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 ac_need_defaults=false;;
16137 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016138 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 case $ac_optarg in
16140 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16141 esac
16142 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 --he | --h)
16145 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016146 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016147Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016148 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016149 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016150 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16151 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16152 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
16154 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016155 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016156Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016157
Matthias Kloseb9621712010-04-24 17:59:49 +000016158 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016159 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016160
16161 esac
16162 shift
16163done
16164
Skip Montanaro6dead952003-09-25 14:50:04 +000016165ac_configure_extra_args=
16166
16167if $ac_cs_silent; then
16168 exec 6>/dev/null
16169 ac_configure_extra_args="$ac_configure_extra_args --silent"
16170fi
16171
16172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016174if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016175 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 shift
16177 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16178 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016179 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016181fi
16182
Martin v. Löwis11437992002-04-12 09:54:03 +000016183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185exec 5>>config.log
16186{
16187 echo
16188 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16189## Running $as_me. ##
16190_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016191 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016197
Matthias Kloseb9621712010-04-24 17:59:49 +000016198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199
16200# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016201for ac_config_target in $ac_config_targets
16202do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 case $ac_config_target in
16204 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16205 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16206 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016207 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16208 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16210 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016211 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016212 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016213 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214
Victor Stinnere0be4232011-10-25 13:06:09 +020016215 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 esac
16217done
16218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219
Martin v. Löwis11437992002-04-12 09:54:03 +000016220# If the user did not use the arguments to specify the items to instantiate,
16221# then the envvar interface is used. Set only those that are not.
16222# We use the long form for the default assignment because of an extremely
16223# bizarre bug on SunOS 4.1.3.
16224if $ac_need_defaults; then
16225 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16226 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16227fi
16228
Skip Montanaro6dead952003-09-25 14:50:04 +000016229# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016231# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232# Hook for its removal unless debugging.
16233# Note that there is a small window in which the directory will not be cleaned:
16234# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016235$debug ||
16236{
Victor Stinnere0be4232011-10-25 13:06:09 +020016237 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016239 : "${ac_tmp:=$tmp}"
16240 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016243}
Martin v. Löwis11437992002-04-12 09:54:03 +000016244# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016245
Martin v. Löwis11437992002-04-12 09:54:03 +000016246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016248 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016249} ||
16250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 tmp=./conf$$-$RANDOM
16252 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016253} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016254ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256# Set up the scripts for CONFIG_FILES section.
16257# No need to generate them if there are no CONFIG_FILES.
16258# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016260
Matthias Kloseb9621712010-04-24 17:59:49 +000016261
16262ac_cr=`echo X | tr X '\015'`
16263# On cygwin, bash can eat \r inside `` if the user requested igncr.
16264# But we know of no other shell where ac_cr would be empty at this
16265# point, so we can use a bashism as a fallback.
16266if test "x$ac_cr" = x; then
16267 eval ac_cr=\$\'\\r\'
16268fi
16269ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16270if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016271 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016272else
16273 ac_cs_awk_cr=$ac_cr
16274fi
16275
Victor Stinnere0be4232011-10-25 13:06:09 +020016276echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016277_ACEOF
16278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{
16281 echo "cat >conf$$subs.awk <<_ACEOF" &&
16282 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16283 echo "_ACEOF"
16284} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016285 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16286ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287ac_delim='%!_!# '
16288for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016289 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016290 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291
Matthias Kloseb9621712010-04-24 17:59:49 +000016292 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16293 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016294 break
16295 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297 else
16298 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300done
Matthias Kloseb9621712010-04-24 17:59:49 +000016301rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302
Matthias Kloseb9621712010-04-24 17:59:49 +000016303cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016304cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016306sed -n '
16307h
16308s/^/S["/; s/!.*/"]=/
16309p
16310g
16311s/^[^!]*!//
16312:repl
16313t repl
16314s/'"$ac_delim"'$//
16315t delim
16316:nl
16317h
16318s/\(.\{148\}\)..*/\1/
16319t more1
16320s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16321p
16322n
16323b repl
16324:more1
16325s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16326p
16327g
16328s/.\{148\}//
16329t nl
16330:delim
16331h
16332s/\(.\{148\}\)..*/\1/
16333t more2
16334s/["\\]/\\&/g; s/^/"/; s/$/"/
16335p
16336b
16337:more2
16338s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16339p
16340g
16341s/.\{148\}//
16342t delim
16343' <conf$$subs.awk | sed '
16344/^[^""]/{
16345 N
16346 s/\n//
16347}
16348' >>$CONFIG_STATUS || ac_write_fail=1
16349rm -f conf$$subs.awk
16350cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16351_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016352cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016353 for (key in S) S_is_set[key] = 1
16354 FS = ""
16355
16356}
16357{
16358 line = $ 0
16359 nfields = split(line, field, "@")
16360 substed = 0
16361 len = length(field[1])
16362 for (i = 2; i < nfields; i++) {
16363 key = field[i]
16364 keylen = length(key)
16365 if (S_is_set[key]) {
16366 value = S[key]
16367 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16368 len += length(value) + length(field[++i])
16369 substed = 1
16370 } else
16371 len += 1 + keylen
16372 }
16373
16374 print line
16375}
16376
16377_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16380if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16381 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16382else
16383 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016384fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016385 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016386_ACEOF
16387
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016388# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16389# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390# trailing colons and then remove the whole line if VPATH becomes empty
16391# (actually we leave an empty line to preserve line numbers).
16392if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016393 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16394h
16395s///
16396s/^/:/
16397s/[ ]*$/:/
16398s/:\$(srcdir):/:/g
16399s/:\${srcdir}:/:/g
16400s/:@srcdir@:/:/g
16401s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016403x
16404s/\(=[ ]*\).*/\1/
16405G
16406s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407s/^[^=]*=[ ]*$//
16408}'
16409fi
16410
Matthias Kloseb9621712010-04-24 17:59:49 +000016411cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016412fi # test -n "$CONFIG_FILES"
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414# Set up the scripts for CONFIG_HEADERS section.
16415# No need to generate them if there are no CONFIG_HEADERS.
16416# This happens for instance with `./config.status Makefile'.
16417if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016418cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016419BEGIN {
16420_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421
Matthias Kloseb9621712010-04-24 17:59:49 +000016422# Transform confdefs.h into an awk script `defines.awk', embedded as
16423# here-document in config.status, that substitutes the proper values into
16424# config.h.in to produce config.h.
16425
16426# Create a delimiter string that does not exist in confdefs.h, to ease
16427# handling of long lines.
16428ac_delim='%!_!# '
16429for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016430 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16431 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016432 break
16433 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016434 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016435 else
16436 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16437 fi
16438done
16439
16440# For the awk script, D is an array of macro values keyed by name,
16441# likewise P contains macro parameters if any. Preserve backslash
16442# newline sequences.
16443
16444ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16445sed -n '
16446s/.\{148\}/&'"$ac_delim"'/g
16447t rset
16448:rset
16449s/^[ ]*#[ ]*define[ ][ ]*/ /
16450t def
16451d
16452:def
16453s/\\$//
16454t bsnl
16455s/["\\]/\\&/g
16456s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16457D["\1"]=" \3"/p
16458s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16459d
16460:bsnl
16461s/["\\]/\\&/g
16462s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16463D["\1"]=" \3\\\\\\n"\\/p
16464t cont
16465s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16466t cont
16467d
16468:cont
16469n
16470s/.\{148\}/&'"$ac_delim"'/g
16471t clear
16472:clear
16473s/\\$//
16474t bsnlc
16475s/["\\]/\\&/g; s/^/"/; s/$/"/p
16476d
16477:bsnlc
16478s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16479b cont
16480' <confdefs.h | sed '
16481s/'"$ac_delim"'/"\\\
16482"/g' >>$CONFIG_STATUS || ac_write_fail=1
16483
16484cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16485 for (key in D) D_is_set[key] = 1
16486 FS = ""
16487}
16488/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16489 line = \$ 0
16490 split(line, arg, " ")
16491 if (arg[1] == "#") {
16492 defundef = arg[2]
16493 mac1 = arg[3]
16494 } else {
16495 defundef = substr(arg[1], 2)
16496 mac1 = arg[2]
16497 }
16498 split(mac1, mac2, "(") #)
16499 macro = mac2[1]
16500 prefix = substr(line, 1, index(line, defundef) - 1)
16501 if (D_is_set[macro]) {
16502 # Preserve the white space surrounding the "#".
16503 print prefix "define", macro P[macro] D[macro]
16504 next
16505 } else {
16506 # Replace #undef with comments. This is necessary, for example,
16507 # in the case of _POSIX_SOURCE, which is predefined and required
16508 # on some systems where configure will not decide to define it.
16509 if (defundef == "undef") {
16510 print "/*", prefix defundef, macro, "*/"
16511 next
16512 }
16513 }
16514}
16515{ print }
16516_ACAWK
16517_ACEOF
16518cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016519 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016520fi # test -n "$CONFIG_HEADERS"
16521
16522
16523eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16524shift
16525for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526do
16527 case $ac_tag in
16528 :[FHLC]) ac_mode=$ac_tag; continue;;
16529 esac
16530 case $ac_mode$ac_tag in
16531 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016532 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 :[FH]-) ac_tag=-:-;;
16534 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16535 esac
16536 ac_save_IFS=$IFS
16537 IFS=:
16538 set x $ac_tag
16539 IFS=$ac_save_IFS
16540 shift
16541 ac_file=$1
16542 shift
16543
16544 case $ac_mode in
16545 :L) ac_source=$1;;
16546 :[FH])
16547 ac_file_inputs=
16548 for ac_f
16549 do
16550 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016551 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 *) # Look for the file first in the build tree, then in the source tree
16553 # (if the path is not absolute). The absolute path cannot be DOS-style,
16554 # because $ac_f cannot contain `:'.
16555 test -f "$ac_f" ||
16556 case $ac_f in
16557 [\\/$]*) false;;
16558 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16559 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016560 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016562 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16563 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 done
16565
16566 # Let's still pretend it is `configure' which instantiates (i.e., don't
16567 # use $as_me), people would be surprised to read:
16568 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 configure_input='Generated from '`
16570 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16571 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 if test x"$ac_file" != x-; then
16573 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16575$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016577 # Neutralize special characters interpreted by sed in replacement strings.
16578 case $configure_input in #(
16579 *\&* | *\|* | *\\* )
16580 ac_sed_conf_input=`$as_echo "$configure_input" |
16581 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16582 *) ac_sed_conf_input=$configure_input;;
16583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584
16585 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016586 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16587 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 esac
16589 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 esac
16591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016593$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 X"$ac_file" : 'X\(//\)[^/]' \| \
16595 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016597$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16599 s//\1/
16600 q
16601 }
16602 /^X\(\/\/\)[^/].*/{
16603 s//\1/
16604 q
16605 }
16606 /^X\(\/\/\)$/{
16607 s//\1/
16608 q
16609 }
16610 /^X\(\/\).*/{
16611 s//\1/
16612 q
16613 }
16614 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016615 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 ac_builddir=.
16617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618case "$ac_dir" in
16619.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16620*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016621 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016622 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016623 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624 case $ac_top_builddir_sub in
16625 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16626 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16627 esac ;;
16628esac
16629ac_abs_top_builddir=$ac_pwd
16630ac_abs_builddir=$ac_pwd$ac_dir_suffix
16631# for backward compatibility:
16632ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016633
16634case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 ac_top_srcdir=$ac_top_builddir_sub
16638 ac_abs_top_srcdir=$ac_pwd ;;
16639 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016640 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016641 ac_top_srcdir=$srcdir
16642 ac_abs_top_srcdir=$srcdir ;;
16643 *) # Relative name.
16644 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16645 ac_top_srcdir=$ac_top_build_prefix$srcdir
16646 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016647esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016648ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016649
Martin v. Löwis11437992002-04-12 09:54:03 +000016650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016651 case $ac_mode in
16652 :F)
16653 #
16654 # CONFIG_FILE
16655 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016656
16657 case $INSTALL in
16658 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016661 ac_MKDIR_P=$MKDIR_P
16662 case $MKDIR_P in
16663 [\\/$]* | ?:[\\/]* ) ;;
16664 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16665 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016666_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667
Matthias Kloseb9621712010-04-24 17:59:49 +000016668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669# If the template does not know about datarootdir, expand it.
16670# FIXME: This hack should be removed a few years after 2.60.
16671ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016672ac_sed_dataroot='
16673/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 p
16675 q
16676}
16677/@datadir@/p
16678/@docdir@/p
16679/@infodir@/p
16680/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016681/@mandir@/p'
16682case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683*datarootdir*) ac_datarootdir_seen=yes;;
16684*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16686$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016688cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689 ac_datarootdir_hack='
16690 s&@datadir@&$datadir&g
16691 s&@docdir@&$docdir&g
16692 s&@infodir@&$infodir&g
16693 s&@localedir@&$localedir&g
16694 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696esac
16697_ACEOF
16698
16699# Neutralize VPATH when `$srcdir' = `.'.
16700# Shell code in configure.ac might set extrasub.
16701# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016702cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16703ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016704$extrasub
16705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016707:t
16708/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016709s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016711s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712s&@srcdir@&$ac_srcdir&;t t
16713s&@abs_srcdir@&$ac_abs_srcdir&;t t
16714s&@top_srcdir@&$ac_top_srcdir&;t t
16715s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16716s&@builddir@&$ac_builddir&;t t
16717s&@abs_builddir@&$ac_abs_builddir&;t t
16718s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16719s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016720s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016722"
Victor Stinnere0be4232011-10-25 13:06:09 +020016723eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16724 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016727 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16728 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16729 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016731which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016732$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016733which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016734
Victor Stinnere0be4232011-10-25 13:06:09 +020016735 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016737 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16738 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016739 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016740 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016741 ;;
16742 :H)
16743 #
16744 # CONFIG_HEADER
16745 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 {
16748 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016749 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16750 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016751 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016752 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016753 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16754$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016756 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016757 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016758 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016759 fi
16760 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016761 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016762 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016763 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016767
16768 esac
16769
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016770
16771 case $ac_file$ac_mode in
16772 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16773
16774 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016775done # for ac_tag
16776
Guido van Rossum627b2d71993-12-24 10:39:16 +000016777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016779_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016780ac_clean_files=$ac_clean_files_save
16781
Matthias Kloseb9621712010-04-24 17:59:49 +000016782test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016783 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016784
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
16786# configure is writing to config.log, and then calls config.status.
16787# config.status does its own redirection, appending to config.log.
16788# Unfortunately, on DOS this fails, as config.log is still kept open
16789# by configure, so config.status won't be able to write to it; its
16790# output is simply discarded. So we exec the FD to /dev/null,
16791# effectively closing config.log, so it can be properly (re)opened and
16792# appended to by config.status. When coming back to configure, we
16793# need to make the FD available again.
16794if test "$no_create" != yes; then
16795 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016796 ac_config_status_args=
16797 test "$silent" = yes &&
16798 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016799 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016800 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 exec 5>>config.log
16802 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16803 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016804 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016805fi
16806if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16808$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016809fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016810
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016811
Christian Heimes75ed8902013-11-20 01:11:18 +010016812echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016813if test ! -f Modules/Setup
16814then
16815 cp $srcdir/Modules/Setup.dist Modules/Setup
16816fi
16817
Christian Heimes75ed8902013-11-20 01:11:18 +010016818echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016819if test ! -f Modules/Setup.local
16820then
16821 echo "# Edit this file for local setup changes" >Modules/Setup.local
16822fi
16823
Christian Heimes75ed8902013-11-20 01:11:18 +010016824echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016825$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16826 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016827 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016828mv config.c Modules