blob: 87e6f3e30e6d13cceb6b420309d5c08e7b4308f7 [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.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
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'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
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
Matthias Klosec4c48422012-10-21 23:05:35 +0200673PYTHON
674ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200675ac_ct_READELF
676READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000677ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200678ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000679AR
680RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000681USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000682GNULD
683LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000684LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000685RUNSHARED
686INSTSONAME
687LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000688PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000689BLDLIBRARY
690DLLLIBRARY
691LDLIBRARY
692LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100693MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000694BUILDEXEEXT
695EGREP
696GREP
697CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200698NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000700MAINCC
701CXX
702OBJEXT
703EXEEXT
704ac_ct_CC
705CPPFLAGS
706LDFLAGS
707CFLAGS
708CC
709EXPORT_MACOSX_DEPLOYMENT_TARGET
710CONFIGURE_MACOSX_DEPLOYMENT_TARGET
711SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200712_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000713MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000714FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000715FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800716FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000717FRAMEWORKALTINSTALLLAST
718FRAMEWORKALTINSTALLFIRST
719FRAMEWORKINSTALLLAST
720FRAMEWORKINSTALLFIRST
721PYTHONFRAMEWORKINSTALLDIR
722PYTHONFRAMEWORKPREFIX
723PYTHONFRAMEWORKDIR
724PYTHONFRAMEWORKIDENTIFIER
725PYTHONFRAMEWORK
726LIPO_32BIT_FLAGS
727ARCH_RUN_32BIT
728UNIVERSALSDK
729CONFIG_ARGS
730SOVERSION
731VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100733host_os
734host_vendor
735host_cpu
736host
737build_os
738build_vendor
739build_cpu
740build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500741HAS_HG
742HGBRANCH
743HGTAG
744HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400745BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000746target_alias
747host_alias
748build_alias
749LIBS
750ECHO_T
751ECHO_N
752ECHO_C
753DEFS
754mandir
755localedir
756libdir
757psdir
758pdfdir
759dvidir
760htmldir
761infodir
762docdir
763oldincludedir
764includedir
765localstatedir
766sharedstatedir
767sysconfdir
768datadir
769datarootdir
770libexecdir
771sbindir
772bindir
773program_transform_name
774prefix
775exec_prefix
776PACKAGE_URL
777PACKAGE_BUGREPORT
778PACKAGE_STRING
779PACKAGE_VERSION
780PACKAGE_TARNAME
781PACKAGE_NAME
782PATH_SEPARATOR
783SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000784ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000785ac_user_opts='
786enable_option_checking
787enable_universalsdk
788with_universal_archs
789with_framework_name
790enable_framework
791with_gcc
792with_cxx_main
793with_suffix
794enable_shared
795enable_profiling
796with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100797with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000798with_libs
799with_system_expat
800with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100801with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000802enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700803with_tcltk_includes
804with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_dbmliborder
806with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_threads
808with_thread
809enable_ipv6
810with_doc_strings
811with_tsc
812with_pymalloc
813with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_fpectl
815with_libm
816with_libc
817enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800819with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000820'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821 ac_precious_vars='build_alias
822host_alias
823target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100824MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825CC
826CFLAGS
827LDFLAGS
828LIBS
829CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200830CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000831
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000834ac_init_help=
835ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000836ac_unrecognized_opts=
837ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838# The variables have the same names as the options, with
839# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000840cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843no_recursion=
844prefix=NONE
845program_prefix=NONE
846program_suffix=NONE
847program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852x_includes=NONE
853x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000854
855# Installation directory options.
856# These are left unexpanded so users can "make install exec_prefix=/foo"
857# and all the variables that are supposed to be based on exec_prefix
858# by default will actually change.
859# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000861bindir='${exec_prefix}/bin'
862sbindir='${exec_prefix}/sbin'
863libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864datarootdir='${prefix}/share'
865datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000866sysconfdir='${prefix}/etc'
867sharedstatedir='${prefix}/com'
868localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869includedir='${prefix}/include'
870oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
872infodir='${datarootdir}/info'
873htmldir='${docdir}'
874dvidir='${docdir}'
875pdfdir='${docdir}'
876psdir='${docdir}'
877libdir='${exec_prefix}/lib'
878localedir='${datarootdir}/locale'
879mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885 # If the previous option needs an argument, assign it.
886 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888 ac_prev=
889 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200893 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
894 *=) ac_optarg= ;;
895 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898 # Accept the important Cygnus configure options, so we can diagnose typos.
899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 case $ac_dashdash$ac_option in
901 --)
902 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904 -bindir | --bindir | --bindi | --bind | --bin | --bi)
905 ac_prev=bindir ;;
906 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000908
909 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 -cache-file | --cache-file | --cache-fil | --cache-fi \
915 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
916 ac_prev=cache_file ;;
917 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
918 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 cache_file=$ac_optarg ;;
920
921 --config-cache | -C)
922 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
930 | --dataroo | --dataro | --datar)
931 ac_prev=datarootdir ;;
932 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
933 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
934 datarootdir=$ac_optarg ;;
935
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000939 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200940 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000941 ac_useropt_orig=$ac_useropt
942 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
943 case $ac_user_opts in
944 *"
945"enable_$ac_useropt"
946"*) ;;
947 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
948 ac_unrecognized_sep=', ';;
949 esac
950 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951
952 -docdir | --docdir | --docdi | --doc | --do)
953 ac_prev=docdir ;;
954 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
955 docdir=$ac_optarg ;;
956
957 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
958 ac_prev=dvidir ;;
959 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
960 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
962 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
979 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
980 | --exec | --exe | --ex)
981 ac_prev=exec_prefix ;;
982 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
983 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
984 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Obsolete; use --with-gas.
989 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 -help | --help | --hel | --he | -h)
992 ac_init_help=long ;;
993 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
994 ac_init_help=recursive ;;
995 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
996 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
998 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001003 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1004 ac_prev=htmldir ;;
1005 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1006 | --ht=*)
1007 htmldir=$ac_optarg ;;
1008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -includedir | --includedir | --includedi | --included | --include \
1010 | --includ | --inclu | --incl | --inc)
1011 ac_prev=includedir ;;
1012 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1013 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -infodir | --infodir | --infodi | --infod | --info | --inf)
1017 ac_prev=infodir ;;
1018 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
1021 -libdir | --libdir | --libdi | --libd)
1022 ac_prev=libdir ;;
1023 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025
1026 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1027 | --libexe | --libex | --libe)
1028 ac_prev=libexecdir ;;
1029 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1030 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -localedir | --localedir | --localedi | --localed | --locale)
1034 ac_prev=localedir ;;
1035 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1036 localedir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001039 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 ac_prev=localstatedir ;;
1041 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001042 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1046 ac_prev=mandir ;;
1047 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001051 # Obsolete; use --without-fp.
1052 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 no_create=yes ;;
1057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1059 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1060 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1063 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1064 | --oldin | --oldi | --old | --ol | --o)
1065 ac_prev=oldincludedir ;;
1066 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1067 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1068 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1072 ac_prev=prefix ;;
1073 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1077 | --program-pre | --program-pr | --program-p)
1078 ac_prev=program_prefix ;;
1079 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1080 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1084 | --program-suf | --program-su | --program-s)
1085 ac_prev=program_suffix ;;
1086 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1087 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-transform-name | --program-transform-name \
1091 | --program-transform-nam | --program-transform-na \
1092 | --program-transform-n | --program-transform- \
1093 | --program-transform | --program-transfor \
1094 | --program-transfo | --program-transf \
1095 | --program-trans | --program-tran \
1096 | --progr-tra | --program-tr | --program-t)
1097 ac_prev=program_transform_name ;;
1098 -program-transform-name=* | --program-transform-name=* \
1099 | --program-transform-nam=* | --program-transform-na=* \
1100 | --program-transform-n=* | --program-transform-=* \
1101 | --program-transform=* | --program-transfor=* \
1102 | --program-transfo=* | --program-transf=* \
1103 | --program-trans=* | --program-tran=* \
1104 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001107 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1108 ac_prev=pdfdir ;;
1109 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1110 pdfdir=$ac_optarg ;;
1111
1112 -psdir | --psdir | --psdi | --psd | --ps)
1113 ac_prev=psdir ;;
1114 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1115 psdir=$ac_optarg ;;
1116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1118 | -silent | --silent | --silen | --sile | --sil)
1119 silent=yes ;;
1120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1122 ac_prev=sbindir ;;
1123 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1124 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
1127 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1128 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1129 | --sharedst | --shareds | --shared | --share | --shar \
1130 | --sha | --sh)
1131 ac_prev=sharedstatedir ;;
1132 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1133 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1134 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1135 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138 -site | --site | --sit)
1139 ac_prev=site ;;
1140 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1144 ac_prev=srcdir ;;
1145 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1149 | --syscon | --sysco | --sysc | --sys | --sy)
1150 ac_prev=sysconfdir ;;
1151 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1152 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1161 verbose=yes ;;
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 -version | --version | --versio | --versi | --vers | -V)
1164 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001169 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001170 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 ac_useropt_orig=$ac_useropt
1172 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1173 case $ac_user_opts in
1174 *"
1175"with_$ac_useropt"
1176"*) ;;
1177 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1178 ac_unrecognized_sep=', ';;
1179 esac
1180 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001184 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001186 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt_orig=$ac_useropt
1188 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1189 case $ac_user_opts in
1190 *"
1191"with_$ac_useropt"
1192"*) ;;
1193 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1194 ac_unrecognized_sep=', ';;
1195 esac
1196 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 --x)
1199 # Obsolete; use --with-x.
1200 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1203 | --x-incl | --x-inc | --x-in | --x-i)
1204 ac_prev=x_includes ;;
1205 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1206 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1210 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1211 ac_prev=x_libraries ;;
1212 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1213 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1217Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218 ;;
1219
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 *=*)
1221 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1222 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 case $ac_envvar in #(
1224 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001227 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 export $ac_envvar ;;
1229
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001230 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001232 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001234 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001235 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236 ;;
1237
1238 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001239done
1240
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244fi
1245
Matthias Kloseb9621712010-04-24 17:59:49 +00001246if test -n "$ac_unrecognized_opts"; then
1247 case $enable_option_checking in
1248 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1251 esac
1252fi
1253
1254# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1256 datadir sysconfdir sharedstatedir localstatedir includedir \
1257 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1258 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001259do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 # Remove trailing slashes.
1262 case $ac_val in
1263 */ )
1264 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1265 eval $ac_var=\$ac_val;;
1266 esac
1267 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001269 [\\/$]* | ?:[\\/]* ) continue;;
1270 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001273done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Martin v. Löwis11437992002-04-12 09:54:03 +00001275# There might be people who depend on the old broken behavior: `$host'
1276# used to hold the argument of --host etc.
1277# FIXME: To remove some day.
1278build=$build_alias
1279host=$host_alias
1280target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282# FIXME: To remove some day.
1283if test "x$host_alias" != x; then
1284 if test "x$build_alias" = x; then
1285 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 elif test "x$build_alias" != "x$host_alias"; then
1287 cross_compiling=yes
1288 fi
1289fi
1290
1291ac_tool_prefix=
1292test -n "$host_alias" && ac_tool_prefix=$host_alias-
1293
1294test "$silent" = yes && exec 6>/dev/null
1295
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297ac_pwd=`pwd` && test -n "$ac_pwd" &&
1298ac_ls_di=`ls -di .` &&
1299ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001301test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303
1304
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305# Find the source files, if location was not specified.
1306if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001309 ac_confdir=`$as_dirname -- "$as_myself" ||
1310$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1311 X"$as_myself" : 'X\(//\)[^/]' \| \
1312 X"$as_myself" : 'X\(//\)$' \| \
1313 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1314$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)[^/].*/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\/\)$/{
1324 s//\1/
1325 q
1326 }
1327 /^X\(\/\).*/{
1328 s//\1/
1329 q
1330 }
1331 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334 srcdir=..
1335 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336else
1337 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339if test ! -r "$srcdir/$ac_unique_file"; then
1340 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1344ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001345 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 pwd)`
1347# When building in place, set srcdir=.
1348if test "$ac_abs_confdir" = "$ac_pwd"; then
1349 srcdir=.
1350fi
1351# Remove unnecessary trailing slashes from srcdir.
1352# Double slashes in file names in object file debugging info
1353# mess up M-x gdb in Emacs.
1354case $srcdir in
1355*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1356esac
1357for ac_var in $ac_precious_vars; do
1358 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1359 eval ac_env_${ac_var}_value=\$${ac_var}
1360 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1361 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1362done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363
Martin v. Löwis11437992002-04-12 09:54:03 +00001364#
1365# Report the --help message.
1366#
1367if test "$ac_init_help" = "long"; then
1368 # Omit some internal or obsolete options to make the list less imposing.
1369 # This message is too long to be a string in the A/UX 3.1 sh.
1370 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001371\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001372
1373Usage: $0 [OPTION]... [VAR=VALUE]...
1374
1375To assign environment variables (e.g., CC, CFLAGS...), specify them as
1376VAR=VALUE. See below for descriptions of some of the useful variables.
1377
1378Defaults for the options are specified in brackets.
1379
1380Configuration:
1381 -h, --help display this help and exit
1382 --help=short display options specific to this package
1383 --help=recursive display the short help of all the included packages
1384 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001385 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001386 --cache-file=FILE cache test results in FILE [disabled]
1387 -C, --config-cache alias for \`--cache-file=config.cache'
1388 -n, --no-create do not create output files
1389 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391Installation directories:
1392 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001394 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397By default, \`make install' will install all the files in
1398\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1399an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1400for instance \`--prefix=\$HOME'.
1401
1402For better control, use the options below.
1403
1404Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001405 --bindir=DIR user executables [EPREFIX/bin]
1406 --sbindir=DIR system admin executables [EPREFIX/sbin]
1407 --libexecdir=DIR program executables [EPREFIX/libexec]
1408 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1409 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1410 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1411 --libdir=DIR object code libraries [EPREFIX/lib]
1412 --includedir=DIR C header files [PREFIX/include]
1413 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1414 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1415 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1416 --infodir=DIR info documentation [DATAROOTDIR/info]
1417 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1418 --mandir=DIR man documentation [DATAROOTDIR/man]
1419 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1420 --htmldir=DIR html documentation [DOCDIR]
1421 --dvidir=DIR dvi documentation [DOCDIR]
1422 --pdfdir=DIR pdf documentation [DOCDIR]
1423 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424_ACEOF
1425
1426 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001427
1428System types:
1429 --build=BUILD configure for building on BUILD [guessed]
1430 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431_ACEOF
1432fi
1433
1434if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001435 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001436 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001437 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 cat <<\_ACEOF
1439
1440Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001442 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1443 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001444 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001445 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-framework[=INSTALLDIR]
1447 Build (MacOSX|Darwin) framework
1448 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001449 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001450 --enable-loadable-sqlite-extensions
1451 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-ipv6 Enable ipv6 (with ipv4) support
1453 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001454 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001455 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001456
1457Optional Packages:
1458 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1459 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001460 --with-universal-archs=ARCH
1461 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001462 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001463 --with-framework-name=FRAMEWORK
1464 specify an alternate name of the framework built
1465 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001467 --with-cxx-main=<compiler>
1468 compile main() and link python executable with C++
1469 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with-suffix=.exe set executable suffix
1471 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001472 --with-hash-algorithm=[fnv|siphash24]
1473 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001475 --with-system-expat build pyexpat module using an installed expat
1476 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001477 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001478 --with-system-libmpdec build _decimal module using an installed libmpdec
1479 library
Ned Deilyd819b932013-09-06 01:07:05 -07001480 --with-tcltk-includes='-I...'
1481 override search for Tcl and Tk include files
1482 --with-tcltk-libs='-L...'
1483 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001484 --with-dbmliborder=db1:db2:...
1485 order to check db backends for dbm. Valid value is a
1486 colon separated string with the backend names
1487 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-threads[=DIRECTORY]
1490 disable/enable thread support
1491 --with(out)-thread[=DIRECTORY]
1492 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001494 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001496 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-fpectl enable SIGFPE catching
1498 --with-libm=STRING math library
1499 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001500 --with(out)-computed-gotos
1501 Use computed gotos in evaluation loop (enabled by
1502 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001503 --with(out)-ensurepip=[=upgrade]
1504 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001505
1506Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001507 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 CC C compiler command
1509 CFLAGS C compiler flags
1510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1511 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001513 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 CPP C preprocessor
1516
1517Use these variables to override the choices made by `configure' or to help
1518it to find libraries and programs with nonstandard names/locations.
1519
Georg Brandle2e15612009-05-20 18:25:10 +00001520Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001521_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001522ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001523fi
1524
1525if test "$ac_init_help" = "recursive"; then
1526 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001527 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 test -d "$ac_dir" ||
1529 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1530 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 ac_builddir=.
1532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533case "$ac_dir" in
1534.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1535*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001536 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 case $ac_top_builddir_sub in
1540 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1541 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1542 esac ;;
1543esac
1544ac_abs_top_builddir=$ac_pwd
1545ac_abs_builddir=$ac_pwd$ac_dir_suffix
1546# for backward compatibility:
1547ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001548
1549case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552 ac_top_srcdir=$ac_top_builddir_sub
1553 ac_abs_top_srcdir=$ac_pwd ;;
1554 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 ac_top_srcdir=$srcdir
1557 ac_abs_top_srcdir=$srcdir ;;
1558 *) # Relative name.
1559 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1560 ac_top_srcdir=$ac_top_build_prefix$srcdir
1561 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001562esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 cd "$ac_dir" || { ac_status=$?; continue; }
1566 # Check for guested configure.
1567 if test -f "$ac_srcdir/configure.gnu"; then
1568 echo &&
1569 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1570 elif test -f "$ac_srcdir/configure"; then
1571 echo &&
1572 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575 fi || ac_status=$?
1576 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 done
1578fi
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001581if $ac_init_version; then
1582 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001583python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001584generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001585
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001586Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001587This configure script is free software; the Free Software Foundation
1588gives unlimited permission to copy, distribute and modify it.
1589_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001592
1593## ------------------------ ##
1594## Autoconf initialization. ##
1595## ------------------------ ##
1596
1597# ac_fn_c_try_compile LINENO
1598# --------------------------
1599# Try to compile conftest.$ac_ext, and return whether this succeeded.
1600ac_fn_c_try_compile ()
1601{
1602 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1603 rm -f conftest.$ac_objext
1604 if { { ac_try="$ac_compile"
1605case "(($ac_try" in
1606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1607 *) ac_try_echo=$ac_try;;
1608esac
1609eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1610$as_echo "$ac_try_echo"; } >&5
1611 (eval "$ac_compile") 2>conftest.err
1612 ac_status=$?
1613 if test -s conftest.err; then
1614 grep -v '^ *+' conftest.err >conftest.er1
1615 cat conftest.er1 >&5
1616 mv -f conftest.er1 conftest.err
1617 fi
1618 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1619 test $ac_status = 0; } && {
1620 test -z "$ac_c_werror_flag" ||
1621 test ! -s conftest.err
1622 } && test -s conftest.$ac_objext; then :
1623 ac_retval=0
1624else
1625 $as_echo "$as_me: failed program was:" >&5
1626sed 's/^/| /' conftest.$ac_ext >&5
1627
1628 ac_retval=1
1629fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001630 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001631 as_fn_set_status $ac_retval
1632
1633} # ac_fn_c_try_compile
1634
Matthias Kloseb9621712010-04-24 17:59:49 +00001635# ac_fn_c_try_link LINENO
1636# -----------------------
1637# Try to link conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_link ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext conftest$ac_exeext
1642 if { { ac_try="$ac_link"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_link") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest$ac_exeext && {
1661 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001662 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001663 }; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
1671 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1672 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1673 # interfere with the next link command; also delete a directory that is
1674 # left behind by Apple's compiler. We do this before executing the actions.
1675 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_link
1680
Matthias Kloseb9621712010-04-24 17:59:49 +00001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001702 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
1718# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1719# -------------------------------------------------------
1720# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1721# the include files in INCLUDES and setting the cache variable VAR
1722# accordingly.
1723ac_fn_c_check_header_mongrel ()
1724{
1725 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001726 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1728$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001729if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 $as_echo_n "(cached) " >&6
1731fi
1732eval ac_res=\$$3
1733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1734$as_echo "$ac_res" >&6; }
1735else
1736 # Is the header compilable?
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1738$as_echo_n "checking $2 usability... " >&6; }
1739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742#include <$2>
1743_ACEOF
1744if ac_fn_c_try_compile "$LINENO"; then :
1745 ac_header_compiler=yes
1746else
1747 ac_header_compiler=no
1748fi
1749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1751$as_echo "$ac_header_compiler" >&6; }
1752
1753# Is the header present?
1754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1755$as_echo_n "checking $2 presence... " >&6; }
1756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1757/* end confdefs.h. */
1758#include <$2>
1759_ACEOF
1760if ac_fn_c_try_cpp "$LINENO"; then :
1761 ac_header_preproc=yes
1762else
1763 ac_header_preproc=no
1764fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001765rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1767$as_echo "$ac_header_preproc" >&6; }
1768
1769# So? What about this header?
1770case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1771 yes:no: )
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1773$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1775$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1776 ;;
1777 no:yes:* )
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1779$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1781$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1783$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1785$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1787$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001788( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001789## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001790## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001791 ) | sed "s/^/$as_me: WARNING: /" >&2
1792 ;;
1793esac
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001796if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001797 $as_echo_n "(cached) " >&6
1798else
1799 eval "$3=\$ac_header_compiler"
1800fi
1801eval ac_res=\$$3
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1803$as_echo "$ac_res" >&6; }
1804fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001805 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001806
1807} # ac_fn_c_check_header_mongrel
1808
1809# ac_fn_c_try_run LINENO
1810# ----------------------
1811# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1812# that executables *can* be run.
1813ac_fn_c_try_run ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if { { ac_try="$ac_link"
1817case "(($ac_try" in
1818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819 *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822$as_echo "$ac_try_echo"; } >&5
1823 (eval "$ac_link") 2>&5
1824 ac_status=$?
1825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1826 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1827 { { case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830esac
1831eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832$as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_try") 2>&5
1834 ac_status=$?
1835 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1836 test $ac_status = 0; }; }; then :
1837 ac_retval=0
1838else
1839 $as_echo "$as_me: program exited with status $ac_status" >&5
1840 $as_echo "$as_me: failed program was:" >&5
1841sed 's/^/| /' conftest.$ac_ext >&5
1842
1843 ac_retval=$ac_status
1844fi
1845 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 as_fn_set_status $ac_retval
1848
1849} # ac_fn_c_try_run
1850
1851# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1852# -------------------------------------------------------
1853# Tests whether HEADER exists and can be compiled using the include files in
1854# INCLUDES, setting the cache variable VAR accordingly.
1855ac_fn_c_check_header_compile ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1859$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001860if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001861 $as_echo_n "(cached) " >&6
1862else
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866#include <$2>
1867_ACEOF
1868if ac_fn_c_try_compile "$LINENO"; then :
1869 eval "$3=yes"
1870else
1871 eval "$3=no"
1872fi
1873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1874fi
1875eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001878 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001879
1880} # ac_fn_c_check_header_compile
1881
Matthias Kloseb9621712010-04-24 17:59:49 +00001882# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1883# -------------------------------------------
1884# Tests whether TYPE exists after having included INCLUDES, setting cache
1885# variable VAR accordingly.
1886ac_fn_c_check_type ()
1887{
1888 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1890$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001891if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001892 $as_echo_n "(cached) " >&6
1893else
1894 eval "$3=no"
1895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1896/* end confdefs.h. */
1897$4
1898int
1899main ()
1900{
1901if (sizeof ($2))
1902 return 0;
1903 ;
1904 return 0;
1905}
1906_ACEOF
1907if ac_fn_c_try_compile "$LINENO"; then :
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909/* end confdefs.h. */
1910$4
1911int
1912main ()
1913{
1914if (sizeof (($2)))
1915 return 0;
1916 ;
1917 return 0;
1918}
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921
1922else
1923 eval "$3=yes"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1928fi
1929eval ac_res=\$$3
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1931$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001933
1934} # ac_fn_c_check_type
1935
1936# ac_fn_c_find_uintX_t LINENO BITS VAR
1937# ------------------------------------
1938# Finds an unsigned integer type with width BITS, setting cache variable VAR
1939# accordingly.
1940ac_fn_c_find_uintX_t ()
1941{
1942 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1944$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001945if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001946 $as_echo_n "(cached) " >&6
1947else
1948 eval "$3=no"
1949 # Order is important - never check a type that is potentially smaller
1950 # than half of the expected target width.
1951 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1952 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1954/* end confdefs.h. */
1955$ac_includes_default
1956int
1957main ()
1958{
1959static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001960test_array [0] = 0;
1961return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968 case $ac_type in #(
1969 uint$2_t) :
1970 eval "$3=yes" ;; #(
1971 *) :
1972 eval "$3=\$ac_type" ;;
1973esac
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001976 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978else
1979 break
1980fi
1981 done
1982fi
1983eval ac_res=\$$3
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1985$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001987
1988} # ac_fn_c_find_uintX_t
1989
1990# ac_fn_c_find_intX_t LINENO BITS VAR
1991# -----------------------------------
1992# Finds a signed integer type with width BITS, setting cache variable VAR
1993# accordingly.
1994ac_fn_c_find_intX_t ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1998$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001999if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002000 $as_echo_n "(cached) " >&6
2001else
2002 eval "$3=no"
2003 # Order is important - never check a type that is potentially smaller
2004 # than half of the expected target width.
2005 for ac_type in int$2_t 'int' 'long int' \
2006 'long long int' 'short int' 'signed char'; do
2007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2008/* end confdefs.h. */
2009$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002010 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002011int
2012main ()
2013{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002014static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002015test_array [0] = 0;
2016return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018 ;
2019 return 0;
2020}
2021_ACEOF
2022if ac_fn_c_try_compile "$LINENO"; then :
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024/* end confdefs.h. */
2025$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002027int
2028main ()
2029{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002030static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002031 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002032test_array [0] = 0;
2033return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035 ;
2036 return 0;
2037}
2038_ACEOF
2039if ac_fn_c_try_compile "$LINENO"; then :
2040
2041else
2042 case $ac_type in #(
2043 int$2_t) :
2044 eval "$3=yes" ;; #(
2045 *) :
2046 eval "$3=\$ac_type" ;;
2047esac
2048fi
2049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2050fi
2051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002052 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002053
2054else
2055 break
2056fi
2057 done
2058fi
2059eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064} # ac_fn_c_find_intX_t
2065
2066# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2067# --------------------------------------------
2068# Tries to find the compile-time value of EXPR in a program that includes
2069# INCLUDES, setting VAR accordingly. Returns whether the value could be
2070# computed
2071ac_fn_c_compute_int ()
2072{
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 if test "$cross_compiling" = yes; then
2075 # Depending upon the size, compute the lo and hi bounds.
2076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_lo=0 ac_mid=0
2092 while :; do
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid; break
2109else
2110 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2111 if test $ac_lo -le $ac_mid; then
2112 ac_lo= ac_hi=
2113 break
2114 fi
2115 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2116fi
2117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118 done
2119else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123int
2124main ()
2125{
2126static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002127test_array [0] = 0;
2128return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002129
2130 ;
2131 return 0;
2132}
2133_ACEOF
2134if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=-1 ac_mid=-1
2136 while :; do
2137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2138/* end confdefs.h. */
2139$4
2140int
2141main ()
2142{
2143static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002144test_array [0] = 0;
2145return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_compile "$LINENO"; then :
2152 ac_lo=$ac_mid; break
2153else
2154 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2155 if test $ac_mid -le $ac_hi; then
2156 ac_lo= ac_hi=
2157 break
2158 fi
2159 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2160fi
2161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2162 done
2163else
2164 ac_lo= ac_hi=
2165fi
2166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2167fi
2168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2169# Binary search between lo and hi bounds.
2170while test "x$ac_lo" != "x$ac_hi"; do
2171 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$4
2175int
2176main ()
2177{
2178static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002179test_array [0] = 0;
2180return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002181
2182 ;
2183 return 0;
2184}
2185_ACEOF
2186if ac_fn_c_try_compile "$LINENO"; then :
2187 ac_hi=$ac_mid
2188else
2189 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192done
2193case $ac_lo in #((
2194?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2195'') ac_retval=1 ;;
2196esac
2197 else
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201static long int longval () { return $2; }
2202static unsigned long int ulongval () { return $2; }
2203#include <stdio.h>
2204#include <stdlib.h>
2205int
2206main ()
2207{
2208
2209 FILE *f = fopen ("conftest.val", "w");
2210 if (! f)
2211 return 1;
2212 if (($2) < 0)
2213 {
2214 long int i = longval ();
2215 if (i != ($2))
2216 return 1;
2217 fprintf (f, "%ld", i);
2218 }
2219 else
2220 {
2221 unsigned long int i = ulongval ();
2222 if (i != ($2))
2223 return 1;
2224 fprintf (f, "%lu", i);
2225 }
2226 /* Do not output a trailing newline, as this causes \r\n confusion
2227 on some platforms. */
2228 return ferror (f) || fclose (f) != 0;
2229
2230 ;
2231 return 0;
2232}
2233_ACEOF
2234if ac_fn_c_try_run "$LINENO"; then :
2235 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2236else
2237 ac_retval=1
2238fi
2239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2240 conftest.$ac_objext conftest.beam conftest.$ac_ext
2241rm -f conftest.val
2242
2243 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002245 as_fn_set_status $ac_retval
2246
2247} # ac_fn_c_compute_int
2248
2249# ac_fn_c_check_func LINENO FUNC VAR
2250# ----------------------------------
2251# Tests whether FUNC exists, setting the cache variable VAR accordingly
2252ac_fn_c_check_func ()
2253{
2254 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2256$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002257if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002258 $as_echo_n "(cached) " >&6
2259else
2260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h. */
2262/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2263 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2264#define $2 innocuous_$2
2265
2266/* System header to define __stub macros and hopefully few prototypes,
2267 which can conflict with char $2 (); below.
2268 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2269 <limits.h> exists even on freestanding compilers. */
2270
2271#ifdef __STDC__
2272# include <limits.h>
2273#else
2274# include <assert.h>
2275#endif
2276
2277#undef $2
2278
2279/* Override any GCC internal prototype to avoid an error.
2280 Use char because int might match the return type of a GCC
2281 builtin and then its argument prototype would still apply. */
2282#ifdef __cplusplus
2283extern "C"
2284#endif
2285char $2 ();
2286/* The GNU C library defines this for functions which it implements
2287 to always fail with ENOSYS. Some functions are actually named
2288 something starting with __ and the normal name is an alias. */
2289#if defined __stub_$2 || defined __stub___$2
2290choke me
2291#endif
2292
2293int
2294main ()
2295{
2296return $2 ();
2297 ;
2298 return 0;
2299}
2300_ACEOF
2301if ac_fn_c_try_link "$LINENO"; then :
2302 eval "$3=yes"
2303else
2304 eval "$3=no"
2305fi
2306rm -f core conftest.err conftest.$ac_objext \
2307 conftest$ac_exeext conftest.$ac_ext
2308fi
2309eval ac_res=\$$3
2310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2311$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002312 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002313
2314} # ac_fn_c_check_func
2315
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002316# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2317# ---------------------------------------------
2318# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2319# accordingly.
2320ac_fn_c_check_decl ()
2321{
2322 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2323 as_decl_name=`echo $2|sed 's/ *(.*//'`
2324 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2326$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2327if eval \${$3+:} false; then :
2328 $as_echo_n "(cached) " >&6
2329else
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h. */
2332$4
2333int
2334main ()
2335{
2336#ifndef $as_decl_name
2337#ifdef __cplusplus
2338 (void) $as_decl_use;
2339#else
2340 (void) $as_decl_name;
2341#endif
2342#endif
2343
2344 ;
2345 return 0;
2346}
2347_ACEOF
2348if ac_fn_c_try_compile "$LINENO"; then :
2349 eval "$3=yes"
2350else
2351 eval "$3=no"
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354fi
2355eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357$as_echo "$ac_res" >&6; }
2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2359
2360} # ac_fn_c_check_decl
2361
Matthias Kloseb9621712010-04-24 17:59:49 +00002362# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2363# ----------------------------------------------------
2364# Tries to find if the field MEMBER exists in type AGGR, after including
2365# INCLUDES, setting cache variable VAR accordingly.
2366ac_fn_c_check_member ()
2367{
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2370$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002371if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002372 $as_echo_n "(cached) " >&6
2373else
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375/* end confdefs.h. */
2376$5
2377int
2378main ()
2379{
2380static $2 ac_aggr;
2381if (ac_aggr.$3)
2382return 0;
2383 ;
2384 return 0;
2385}
2386_ACEOF
2387if ac_fn_c_try_compile "$LINENO"; then :
2388 eval "$4=yes"
2389else
2390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2391/* end confdefs.h. */
2392$5
2393int
2394main ()
2395{
2396static $2 ac_aggr;
2397if (sizeof ac_aggr.$3)
2398return 0;
2399 ;
2400 return 0;
2401}
2402_ACEOF
2403if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$4=yes"
2405else
2406 eval "$4=no"
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2411fi
2412eval ac_res=\$$4
2413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2414$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002415 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002416
2417} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002419This file contains any messages produced by compilers while
2420running configure, to aid debugging if configure makes a mistake.
2421
Georg Brandl08a90122012-09-29 09:34:13 +02002422It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002423generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002424
2425 $ $0 $@
2426
2427_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002429{
2430cat <<_ASUNAME
2431## --------- ##
2432## Platform. ##
2433## --------- ##
2434
2435hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2436uname -m = `(uname -m) 2>/dev/null || echo unknown`
2437uname -r = `(uname -r) 2>/dev/null || echo unknown`
2438uname -s = `(uname -s) 2>/dev/null || echo unknown`
2439uname -v = `(uname -v) 2>/dev/null || echo unknown`
2440
2441/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2442/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2443
2444/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2445/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2446/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002448/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2449/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2450/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2451
2452_ASUNAME
2453
2454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455for as_dir in $PATH
2456do
2457 IFS=$as_save_IFS
2458 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002459 $as_echo "PATH: $as_dir"
2460 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463} >&5
2464
2465cat >&5 <<_ACEOF
2466
2467
2468## ----------- ##
2469## Core tests. ##
2470## ----------- ##
2471
2472_ACEOF
2473
2474
2475# Keep a trace of the command line.
2476# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002477# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002478# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002479# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002480ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002481ac_configure_args0=
2482ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002483ac_must_keep_next=false
2484for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002485do
Skip Montanaro6dead952003-09-25 14:50:04 +00002486 for ac_arg
2487 do
2488 case $ac_arg in
2489 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2490 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2491 | -silent | --silent | --silen | --sile | --sil)
2492 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 esac
2496 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002501 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002503 case $ac_arg in
2504 *=* | --config-cache | -C | -disable-* | --disable-* \
2505 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2506 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2507 | -with-* | --with-* | -without-* | --without-* | --x)
2508 case "$ac_configure_args0 " in
2509 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2510 esac
2511 ;;
2512 -* ) ac_must_keep_next=true ;;
2513 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 ;;
2517 esac
2518 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002519done
Matthias Kloseb9621712010-04-24 17:59:49 +00002520{ ac_configure_args0=; unset ac_configure_args0;}
2521{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002522
2523# When interrupted or exit'd, cleanup temporary files, and complete
2524# config.log. We remove comments because anyway the quotes in there
2525# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526# WARNING: Use '\'' to represent an apostrophe within the trap.
2527# 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 +00002528trap 'exit_status=$?
2529 # Save into config.log some information that might help in debugging.
2530 {
2531 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002532
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002533 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002534## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002535## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 echo
2537 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538(
2539 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2540 eval ac_val=\$$ac_var
2541 case $ac_val in #(
2542 *${as_nl}*)
2543 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2545$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac
2547 case $ac_var in #(
2548 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002549 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2550 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002551 esac ;;
2552 esac
2553 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2556 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 "s/'\''/'\''\\\\'\'''\''/g;
2559 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2560 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002561 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002562 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002563 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564 esac |
2565 sort
2566)
Martin v. Löwis11437992002-04-12 09:54:03 +00002567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002568
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002569 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002570## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002571## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 echo
2573 for ac_var in $ac_subst_vars
2574 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 eval ac_val=\$$ac_var
2576 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002580 done | sort
2581 echo
2582
2583 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 echo
2588 for ac_var in $ac_subst_files
2589 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 eval ac_val=\$$ac_var
2591 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 done | sort
2596 echo
2597 fi
2598
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002601## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002602## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 echo
2606 fi
2607 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 $as_echo "$as_me: caught signal $ac_signal"
2609 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 rm -f core *.core core.conftest.* &&
2612 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002615for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002617done
2618ac_signal=0
2619
2620# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002622
Matthias Kloseb9621712010-04-24 17:59:49 +00002623$as_echo "/* confdefs.h */" > confdefs.h
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625# Predefined preprocessor variables.
2626
2627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_NAME "$PACKAGE_NAME"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_VERSION "$PACKAGE_VERSION"
2637_ACEOF
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_STRING "$PACKAGE_STRING"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2645_ACEOF
2646
Matthias Kloseb9621712010-04-24 17:59:49 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_URL "$PACKAGE_URL"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
2652# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002653# Prefer an explicitly selected file to automatically selected ones.
2654ac_site_file1=NONE
2655ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002657 # We do not want a PATH search for config.site.
2658 case $CONFIG_SITE in #((
2659 -*) ac_site_file1=./$CONFIG_SITE;;
2660 */*) ac_site_file1=$CONFIG_SITE;;
2661 *) ac_site_file1=./$CONFIG_SITE;;
2662 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 ac_site_file1=$prefix/share/config.site
2665 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666else
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 ac_site_file1=$ac_default_prefix/share/config.site
2668 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002670for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671do
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 test "x$ac_site_file" = xNONE && continue
2673 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2675$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 . "$ac_site_file" \
2678 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2680as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002681See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002682 fi
2683done
2684
2685if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002686 # Some versions of bash will fail to source /dev/null (special files
2687 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2688 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2689 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2690$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2693 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002694 esac
2695 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002696else
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2698$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 >$cache_file
2700fi
2701
2702# Check that the precious variables saved in the cache have kept the same
2703# value.
2704ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002705for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2707 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2709 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 case $ac_old_set,$ac_new_set in
2711 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2713$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 +00002714 ac_cache_corrupted=: ;;
2715 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2717$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 ac_cache_corrupted=: ;;
2719 ,);;
2720 *)
2721 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 # differences in whitespace do not lead to failure.
2723 ac_old_val_w=`echo x $ac_old_val`
2724 ac_new_val_w=`echo x $ac_new_val`
2725 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2727$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2728 ac_cache_corrupted=:
2729 else
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2731$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2732 eval $ac_var=\$ac_old_val
2733 fi
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2735$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2737$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 fi;;
2739 esac
2740 # Pass precious variables to config.status.
2741 if test "$ac_new_set" = set; then
2742 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002743 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 *) ac_arg=$ac_var=$ac_new_val ;;
2745 esac
2746 case " $ac_configure_args " in
2747 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002748 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 esac
2750 fi
2751done
2752if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2756$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002757 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002759## -------------------- ##
2760## Main body of script. ##
2761## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762
Guido van Rossum7f43da71994-08-01 12:15:30 +00002763ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002764ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002765ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2766ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2767ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002768
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769
Michael W. Hudson54241132001-12-07 15:38:26 +00002770
Trent Nelson4d4ec652012-10-16 08:51:24 -04002771
Trent Nelson5595ab52012-10-17 04:47:31 -04002772if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002773 # If we're building out-of-tree, we need to make sure the following
2774 # resources get picked up before their $srcdir counterparts.
2775 # Objects/ -> typeslots.inc
2776 # Include/ -> Python-ast.h, graminit.h
2777 # Python/ -> importlib.h
2778 # (A side effect of this is that these resources will automatically be
2779 # regenerated when building out-of-tree, regardless of whether or not
2780 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2781 # off.)
2782 BASECPPFLAGS="-IObjects -IInclude -IPython"
2783else
2784 BASECPPFLAGS=""
2785fi
2786
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002787
2788
2789
2790
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002791if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792then
2793# Extract the first word of "hg", so it can be a program name with args.
2794set dummy hg; ac_word=$2
2795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002797if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002798 $as_echo_n "(cached) " >&6
2799else
2800 if test -n "$HAS_HG"; then
2801 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2802else
2803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2804for as_dir in $PATH
2805do
2806 IFS=$as_save_IFS
2807 test -z "$as_dir" && as_dir=.
2808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810 ac_cv_prog_HAS_HG="found"
2811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2812 break 2
2813 fi
2814done
2815 done
2816IFS=$as_save_IFS
2817
2818 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2819fi
2820fi
2821HAS_HG=$ac_cv_prog_HAS_HG
2822if test -n "$HAS_HG"; then
2823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2824$as_echo "$HAS_HG" >&6; }
2825else
2826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2827$as_echo "no" >&6; }
2828fi
2829
2830
2831else
2832HAS_HG=no-repository
2833fi
2834if test $HAS_HG = found
2835then
2836 HGVERSION="hg id -i \$(srcdir)"
2837 HGTAG="hg id -t \$(srcdir)"
2838 HGBRANCH="hg id -b \$(srcdir)"
2839else
2840 HGVERSION=""
2841 HGTAG=""
2842 HGBRANCH=""
2843fi
2844
2845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002846ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002847
2848
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002849ac_aux_dir=
2850for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2851 if test -f "$ac_dir/install-sh"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/install-sh -c"
2854 break
2855 elif 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/shtool"; then
2860 ac_aux_dir=$ac_dir
2861 ac_install_sh="$ac_aux_dir/shtool install -c"
2862 break
2863 fi
2864done
2865if test -z "$ac_aux_dir"; then
2866 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2867fi
2868
2869# These three variables are undocumented and unsupported,
2870# and are intended to be withdrawn in a future Autoconf release.
2871# They can cause serious problems if a builder's source tree is in a directory
2872# whose full name contains unusual characters.
2873ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2874ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2875ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2876
2877
2878# Make sure we can run config.sub.
2879$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2880 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2881
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2883$as_echo_n "checking build system type... " >&6; }
2884if ${ac_cv_build+:} false; then :
2885 $as_echo_n "(cached) " >&6
2886else
2887 ac_build_alias=$build_alias
2888test "x$ac_build_alias" = x &&
2889 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2890test "x$ac_build_alias" = x &&
2891 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2892ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2893 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2894
2895fi
2896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2897$as_echo "$ac_cv_build" >&6; }
2898case $ac_cv_build in
2899*-*-*) ;;
2900*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2901esac
2902build=$ac_cv_build
2903ac_save_IFS=$IFS; IFS='-'
2904set x $ac_cv_build
2905shift
2906build_cpu=$1
2907build_vendor=$2
2908shift; shift
2909# Remember, the first character of IFS is used to create $*,
2910# except with old shells:
2911build_os=$*
2912IFS=$ac_save_IFS
2913case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2914
2915
2916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2917$as_echo_n "checking host system type... " >&6; }
2918if ${ac_cv_host+:} false; then :
2919 $as_echo_n "(cached) " >&6
2920else
2921 if test "x$host_alias" = x; then
2922 ac_cv_host=$ac_cv_build
2923else
2924 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2925 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2926fi
2927
2928fi
2929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2930$as_echo "$ac_cv_host" >&6; }
2931case $ac_cv_host in
2932*-*-*) ;;
2933*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2934esac
2935host=$ac_cv_host
2936ac_save_IFS=$IFS; IFS='-'
2937set x $ac_cv_host
2938shift
2939host_cpu=$1
2940host_vendor=$2
2941shift; shift
2942# Remember, the first character of IFS is used to create $*,
2943# except with old shells:
2944host_os=$*
2945IFS=$ac_save_IFS
2946case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2947
2948
2949
doko@python.orga10e4a92013-01-25 18:45:12 +01002950
2951
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952if test "$cross_compiling" = yes; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2954$as_echo_n "checking for python interpreter for cross build... " >&6; }
2955 if test -z "$PYTHON_FOR_BUILD"; then
2956 for interp in python$PACKAGE_VERSION python3 python; do
2957 which $interp >/dev/null 2>&1 || continue
2958 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2959 break
2960 fi
2961 interp=
2962 done
2963 if test x$interp = x; then
2964 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2965 fi
2966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2967$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002968 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 +02002969 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002970elif test "$cross_compiling" = maybe; then
2971 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002972else
2973 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2974fi
2975
2976
Martin v. Löwis11437992002-04-12 09:54:03 +00002977
Benjamin Petersond23f8222009-04-05 19:13:16 +00002978if test "$prefix" != "/"; then
2979 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2980fi
2981
2982
Martin v. Löwis11437992002-04-12 09:54:03 +00002983
2984
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002985# We don't use PACKAGE_ variables, and they cause conflicts
2986# with other autoconf-based packages that include Python.h
2987grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2988rm confdefs.h
2989mv confdefs.h.new confdefs.h
2990
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002991
Georg Brandl08a90122012-09-29 09:34:13 +02002992VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002993
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002994# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002995
2996SOVERSION=1.0
2997
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998# The later defininition of _XOPEN_SOURCE disables certain features
2999# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
3003
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003004# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3005# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3006# them.
3007
Matthias Kloseb9621712010-04-24 17:59:49 +00003008$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003009
3010
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003011# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3012# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3013# them.
3014
Matthias Kloseb9621712010-04-24 17:59:49 +00003015$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003016
3017
Martin v. Löwisd6320502004-08-12 13:45:08 +00003018# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3019# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3020
Matthias Kloseb9621712010-04-24 17:59:49 +00003021$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022
3023
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003024# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3025# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3026# them.
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003029
3030
3031
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003032define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003033
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003034# Arguments passed to configure.
3035
3036CONFIG_ARGS="$ac_configure_args"
3037
Matthias Kloseb9621712010-04-24 17:59:49 +00003038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3039$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003041if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043 case $enableval in
3044 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003045 # Locate the best usable SDK, see Mac/README.txt for more
3046 # information
3047 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003048 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003050 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3051 if test ! -d "${enableval}"
3052 then
3053 enableval=/
3054 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003056 ;;
3057 esac
3058 case $enableval in
3059 no)
3060 UNIVERSALSDK=
3061 enable_universalsdk=
3062 ;;
3063 *)
3064 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065 if test ! -d "${UNIVERSALSDK}"
3066 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003067 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069 ;;
3070 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003071
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073else
3074
3075 UNIVERSALSDK=
3076 enable_universalsdk=
3077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003078fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003079
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080if test -n "${UNIVERSALSDK}"
3081then
Matthias Kloseb9621712010-04-24 17:59:49 +00003082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3083$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084else
Matthias Kloseb9621712010-04-24 17:59:49 +00003085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3086$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003089
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003092
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093# For backward compatibility reasons we prefer to select '32-bit' if available,
3094# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003096if test "`uname -s`" = "Darwin"
3097then
3098 if test -n "${UNIVERSALSDK}"
3099 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003100 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101 then
3102 UNIVERSAL_ARCHS="intel"
3103 fi
3104 fi
3105fi
3106
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003107
Matthias Kloseb9621712010-04-24 17:59:49 +00003108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3109$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110
3111# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003112if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114 UNIVERSAL_ARCHS="$withval"
3115
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116fi
3117
Ned Deily87adb6e2013-10-18 21:09:56 -07003118if test -n "${UNIVERSALSDK}"
3119then
3120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3121$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3122else
3123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3124$as_echo "no" >&6; }
3125fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003127
3128# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003129if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003130 withval=$with_framework_name;
3131 PYTHONFRAMEWORK=${withval}
3132 PYTHONFRAMEWORKDIR=${withval}.framework
3133 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3134
3135else
3136
3137 PYTHONFRAMEWORK=Python
3138 PYTHONFRAMEWORKDIR=Python.framework
3139 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3140
3141fi
3142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003143# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003145 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003146 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003147 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003148 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 esac
3150 case $enableval in
3151 no)
3152 PYTHONFRAMEWORK=
3153 PYTHONFRAMEWORKDIR=no-framework
3154 PYTHONFRAMEWORKPREFIX=
3155 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003156 FRAMEWORKINSTALLFIRST=
3157 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 FRAMEWORKALTINSTALLFIRST=
3159 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003160 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003161 if test "x${prefix}" = "xNONE"; then
3162 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3163 else
3164 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3165 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003166 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003167 ;;
3168 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003169 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003172 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003173 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3174 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003175 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003177
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003178 if test "x${prefix}" = "xNONE" ; then
3179 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003181 else
3182 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3183 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
3185 case "${enableval}" in
3186 /System*)
3187 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3188 if test "${prefix}" = "NONE" ; then
3189 # See below
3190 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3191 fi
3192 ;;
3193
3194 /Library*)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 ;;
3197
3198 */Library/Frameworks)
3199 MDIR="`dirname "${enableval}"`"
3200 MDIR="`dirname "${MDIR}"`"
3201 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3202
3203 if test "${prefix}" = "NONE"; then
3204 # User hasn't specified the
3205 # --prefix option, but wants to install
3206 # the framework in a non-default location,
3207 # ensure that the compatibility links get
3208 # installed relative to that prefix as well
3209 # instead of in /usr/local.
3210 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3211 fi
3212 ;;
3213
3214 *)
3215 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3216 ;;
3217 esac
3218
Jack Jansen127e56e2001-09-11 14:41:54 +00003219 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003221 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003222 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3228
3229 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3230
Jack Jansene578a632001-08-15 01:27:14 +00003231 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003232
Guido van Rossum563e7081996-09-10 18:20:48 +00003233else
Martin v. Löwis11437992002-04-12 09:54:03 +00003234
Jack Jansene578a632001-08-15 01:27:14 +00003235 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003236 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003237 PYTHONFRAMEWORKPREFIX=
3238 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239 FRAMEWORKINSTALLFIRST=
3240 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003241 FRAMEWORKALTINSTALLFIRST=
3242 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003243 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003244 if test "x${prefix}" = "xNONE" ; then
3245 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3246 else
3247 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3248 fi
Jack Jansene578a632001-08-15 01:27:14 +00003249 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003251
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252fi
3253
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254
3255
Michael W. Hudson54241132001-12-07 15:38:26 +00003256
3257
3258
3259
Jack Jansene578a632001-08-15 01:27:14 +00003260
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003261
3262
3263
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003264
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003265
Ned Deilyb8f944f2013-11-21 22:42:25 -08003266
Jack Jansene578a632001-08-15 01:27:14 +00003267##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003268## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003269## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003270##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003271# Set name for machine-dependent library files
3272
Matthias Kloseb9621712010-04-24 17:59:49 +00003273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3274$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275if test -z "$MACHDEP"
3276then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 # avoid using uname for cross builds
3278 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003279 # ac_sys_system and ac_sys_release are used for setting
3280 # a lot of different things including 'define_xopen_source'
3281 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003282 case "$host" in
3283 *-*-linux*)
3284 ac_sys_system=Linux
3285 ;;
3286 *-*-cygwin*)
3287 ac_sys_system=Cygwin
3288 ;;
3289 *)
3290 # for now, limit cross builds to known configurations
3291 MACHDEP="unknown"
3292 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3293 esac
3294 ac_sys_release=
3295 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003296 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003297 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003298 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003299 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003301 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003302 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003303 fi
3304 ac_md_system=`echo $ac_sys_system |
3305 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3306 ac_md_release=`echo $ac_sys_release |
3307 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3308 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003309
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003310 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003311 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003312 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003313 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003314 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003315 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003316 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003317fi
Guido van Rossum91922671997-10-09 20:24:13 +00003318
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003319
3320if test "$cross_compiling" = yes; then
3321 case "$host" in
3322 *-*-linux*)
3323 case "$host_cpu" in
3324 arm*)
3325 _host_cpu=arm
3326 ;;
3327 *)
3328 _host_cpu=$host_cpu
3329 esac
3330 ;;
3331 *-*-cygwin*)
3332 _host_cpu=
3333 ;;
3334 *)
3335 # for now, limit cross builds to known configurations
3336 MACHDEP="unknown"
3337 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3338 esac
3339 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3340fi
3341
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003342# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3343# disable features if it is defined, without any means to access these
3344# features as extensions. For these systems, we skip the definition of
3345# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3346# some feature, make sure there is no alternative way to access this
3347# feature. Also, when using wildcards, make sure you have verified the
3348# need for not defining _XOPEN_SOURCE on all systems matching the
3349# wildcard, and that the wildcard does not include future systems
3350# (which may remove their limitations).
3351case $ac_sys_system/$ac_sys_release in
3352 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3353 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003354 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003355 # In addition, Stefan Krah confirms that issue #1244610 exists through
3356 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003357 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003358 define_xopen_source=no
3359 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3360 # also defined. This can be overridden by defining _BSD_SOURCE
3361 # As this has a different meaning on Linux, only define it on OpenBSD
3362
Matthias Kloseb9621712010-04-24 17:59:49 +00003363$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003364
3365 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003366 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003367 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3368 # also defined. This can be overridden by defining _BSD_SOURCE
3369 # As this has a different meaning on Linux, only define it on OpenBSD
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003372
3373 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003374 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3375 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3376 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003377 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 +00003378 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003379 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3380 # request to enable features supported by the standard as a request
3381 # to disable features not supported by the standard. The best way
3382 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3383 # entirely and define __EXTENSIONS__ instead.
3384 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003385 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003386 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3387 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003388 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003389 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 define_xopen_source=no;;
3391 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003392 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003393 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003394 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003395 # On FreeBSD 4, the math functions C89 does not cover are never defined
3396 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3397 FreeBSD/4.*)
3398 define_xopen_source=no;;
3399 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3400 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3401 # identifies itself as Darwin/7.*
3402 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3403 # disables platform specific features beyond repair.
3404 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3405 # has no effect, don't bother defining them
3406 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003407 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003408 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003409 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003410 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3411 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3412 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003413 AIX/4)
3414 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003415 AIX/5)
3416 if test `uname -r` -eq 1; then
3417 define_xopen_source=no
3418 fi
3419 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003420 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3421 # defining NI_NUMERICHOST.
3422 QNX/6.3.2)
3423 define_xopen_source=no
3424 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003426esac
3427
3428if test $define_xopen_source = yes
3429then
Victor Stinner14d098d2011-09-07 22:29:43 +02003430 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003431
Victor Stinner14d098d2011-09-07 22:29:43 +02003432$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003433
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003434
3435 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3436 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3437 # several APIs are not declared. Since this is also needed in some
3438 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003439
Matthias Kloseb9621712010-04-24 17:59:49 +00003440$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003441
3442
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003443
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003444$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446fi
3447
Christian Heimes647cd872013-12-07 23:39:33 +01003448# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3449case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003450 hp*|HP*)
3451 define_stdc_a1=yes;;
3452 *)
3453 define_stdc_a1=no;;
3454esac
3455
3456if test $define_stdc_a1 = yes
3457then
Christian Heimes647cd872013-12-07 23:39:33 +01003458
3459$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3460
Christian Heimesb02bcae2013-12-08 15:21:08 +01003461fi
Christian Heimes647cd872013-12-07 23:39:33 +01003462
Guido van Rossum91922671997-10-09 20:24:13 +00003463#
3464# SGI compilers allow the specification of the both the ABI and the
3465# ISA on the command line. Depending on the values of these switches,
3466# different and often incompatable code will be generated.
3467#
3468# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3469# thus supply support for various ABI/ISA combinations. The MACHDEP
3470# variable is also adjusted.
3471#
3472
3473if test ! -z "$SGI_ABI"
3474then
3475 CC="cc $SGI_ABI"
3476 LDFLAGS="$SGI_ABI $LDFLAGS"
3477 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3478fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3480$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003481
Jack Jansen6b08a402004-06-03 12:41:45 +00003482# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3483# it may influence the way we can build extensions, so distutils
3484# needs to check it
3485
Thomas Wouters477c8d52006-05-27 19:21:47 +00003486
Jack Jansen6b08a402004-06-03 12:41:45 +00003487CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003488EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003489
Guido van Rossum627b2d71993-12-24 10:39:16 +00003490# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003491
3492# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3493# for debug/optimization stuff. BASECFLAGS is for flags that are required
3494# just to get things to compile and link. Users are free to override OPT
3495# when running configure or make. The build should not break if they do.
3496# BASECFLAGS should generally not be messed with, however.
3497
3498# XXX shouldn't some/most/all of this code be merged with the stuff later
3499# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3501$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003504if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003505 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003506 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003507 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003508 without_gcc=yes;;
3509 yes) CC=gcc
3510 without_gcc=no;;
3511 *) CC=$withval
3512 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003513 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003514else
Martin v. Löwis11437992002-04-12 09:54:03 +00003515
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003516 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003517 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003518 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003519 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003520 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521fi
3522
Matthias Kloseb9621712010-04-24 17:59:49 +00003523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3524$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003525
Guido van Rossum8b131c51995-03-09 14:10:13 +00003526# If the user switches compilers, we can't believe the cache
3527if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3528then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003529 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003530(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531fi
3532
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003533# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3534# when the compiler supports them, but we don't always want -O2, and
3535# we set -g later.
3536if test -z "$CFLAGS"; then
3537 CFLAGS=
3538fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003539
3540if test "$ac_sys_system" = "Darwin"
3541then
3542 # Compiler selection on MacOSX is more complicated than
3543 # AC_PROG_CC can handle, see Mac/README.txt for more
3544 # information
3545 if test -z "${CC}"
3546 then
3547 found_gcc=
3548 found_clang=
3549 as_save_IFS=$IFS; IFS=:
3550 for as_dir in $PATH
3551 do
3552 IFS=$as_save_IFS
3553 if test -x $as_dir/gcc; then
3554 if test -z "${found_gcc}"; then
3555 found_gcc=$as_dir/gcc
3556 fi
3557 fi
3558 if test -x $as_dir/clang; then
3559 if test -z "${found_clang}"; then
3560 found_clang=$as_dir/clang
3561 fi
3562 fi
3563 done
3564 IFS=$as_save_IFS
3565
3566 if test -n "$found_gcc" -a -n "$found_clang"
3567 then
3568 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3569 then
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3571$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3572 CC="$found_clang"
3573 CXX="$found_clang++"
3574 fi
3575
3576
3577 elif test -z "$found_gcc" -a -n "$found_clang"
3578 then
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3580$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3581 CC="$found_clang"
3582 CXX="$found_clang++"
3583
3584 elif test -z "$found_gcc" -a -z "$found_clang"
3585 then
3586 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3587 if test -n "${found_clang}"
3588 then
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3590$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3591 CC="${found_clang}"
3592 CXX="`/usr/bin/xcrun -find clang++`"
3593
3594 # else: use default behaviour
3595 fi
3596 fi
3597 fi
3598fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003599ac_ext=c
3600ac_cpp='$CPP $CPPFLAGS'
3601ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3602ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3603ac_compiler_gnu=$ac_cv_c_compiler_gnu
3604if test -n "$ac_tool_prefix"; then
3605 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3606set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003609if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003611else
3612 if test -n "$CC"; then
3613 ac_cv_prog_CC="$CC" # Let the user override the test.
3614else
Martin v. Löwis11437992002-04-12 09:54:03 +00003615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH
3617do
3618 IFS=$as_save_IFS
3619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $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 +00003624 break 2
3625 fi
3626done
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003629
Jack Jansendd19cf82001-12-06 22:36:17 +00003630fi
3631fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003632CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003633if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3635$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003636else
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641
Martin v. Löwis11437992002-04-12 09:54:03 +00003642fi
3643if test -z "$ac_cv_prog_CC"; then
3644 ac_ct_CC=$CC
3645 # Extract the first word of "gcc", so it can be a program name with args.
3646set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3648$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003649if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
3652 if test -n "$ac_ct_CC"; then
3653 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3654else
3655as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3656for as_dir in $PATH
3657do
3658 IFS=$as_save_IFS
3659 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $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 +00003664 break 2
3665 fi
3666done
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003669
3670fi
3671fi
3672ac_ct_CC=$ac_cv_prog_ac_ct_CC
3673if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3675$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3678$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 if test "x$ac_ct_CC" = x; then
3682 CC=""
3683 else
3684 case $cross_compiling:$ac_tool_warned in
3685yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003686{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3687$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688ac_tool_warned=yes ;;
3689esac
3690 CC=$ac_ct_CC
3691 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
3693 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003694fi
3695
Jack Jansendd19cf82001-12-06 22:36:17 +00003696if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 if test -n "$ac_tool_prefix"; then
3698 # 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 +00003699set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3701$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003702if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003704else
3705 if test -n "$CC"; then
3706 ac_cv_prog_CC="$CC" # Let the user override the test.
3707else
Martin v. Löwis11437992002-04-12 09:54:03 +00003708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3709for as_dir in $PATH
3710do
3711 IFS=$as_save_IFS
3712 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003714 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $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 +00003717 break 2
3718 fi
3719done
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003722
3723fi
3724fi
3725CC=$ac_cv_prog_CC
3726if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3728$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003729else
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3731$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737if test -z "$CC"; then
3738 # Extract the first word of "cc", so it can be a program name with args.
3739set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003742if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003744else
3745 if test -n "$CC"; then
3746 ac_cv_prog_CC="$CC" # Let the user override the test.
3747else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3750for as_dir in $PATH
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003755 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3757 ac_prog_rejected=yes
3758 continue
3759 fi
3760 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $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 +00003762 break 2
3763 fi
3764done
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003767
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003768if test $ac_prog_rejected = yes; then
3769 # We found a bogon in the path, so make sure we never use it.
3770 set dummy $ac_cv_prog_CC
3771 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773 # We chose a different compiler from the bogus one.
3774 # However, it has the same basename, so the bogon will be chosen
3775 # first if we set CC to just the basename; use the full file name.
3776 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003777 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003778 fi
3779fi
3780fi
3781fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003782CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3785$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789fi
3790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791
Martin v. Löwis11437992002-04-12 09:54:03 +00003792fi
3793if test -z "$CC"; then
3794 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 do
3797 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3798set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003801if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003803else
3804 if test -n "$CC"; then
3805 ac_cv_prog_CC="$CC" # Let the user override the test.
3806else
Martin v. Löwis11437992002-04-12 09:54:03 +00003807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3808for as_dir in $PATH
3809do
3810 IFS=$as_save_IFS
3811 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 $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 +00003816 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003817 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003818done
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003821
3822fi
3823fi
3824CC=$ac_cv_prog_CC
3825if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3827$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003828else
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003831fi
3832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833
Martin v. Löwis11437992002-04-12 09:54:03 +00003834 test -n "$CC" && break
3835 done
3836fi
3837if test -z "$CC"; then
3838 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003840do
3841 # Extract the first word of "$ac_prog", so it can be a program name with args.
3842set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003845if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003847else
3848 if test -n "$ac_ct_CC"; then
3849 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3850else
3851as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852for as_dir in $PATH
3853do
3854 IFS=$as_save_IFS
3855 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003856 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003858 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 $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 +00003860 break 2
3861 fi
3862done
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003864IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003865
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
3867fi
3868ac_ct_CC=$ac_cv_prog_ac_ct_CC
3869if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3871$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872else
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 test -n "$ac_ct_CC" && break
3879done
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881 if test "x$ac_ct_CC" = x; then
3882 CC=""
3883 else
3884 case $cross_compiling:$ac_tool_warned in
3885yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003886{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3887$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888ac_tool_warned=yes ;;
3889esac
3890 CC=$ac_ct_CC
3891 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003892fi
3893
3894fi
3895
3896
Matthias Kloseb9621712010-04-24 17:59:49 +00003897test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003899as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003900See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003901
3902# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003903$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3904set X $ac_compile
3905ac_compiler=$2
3906for ac_option in --version -v -V -qversion; do
3907 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908case "(($ac_try" in
3909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3910 *) ac_try_echo=$ac_try;;
3911esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3913$as_echo "$ac_try_echo"; } >&5
3914 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 if test -s conftest.err; then
3917 sed '10a\
3918... rest of stderr output deleted ...
3919 10q' conftest.err >conftest.er1
3920 cat conftest.er1 >&5
3921 fi
3922 rm -f conftest.er1 conftest.err
3923 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3924 test $ac_status = 0; }
3925done
Martin v. Löwis11437992002-04-12 09:54:03 +00003926
Matthias Kloseb9621712010-04-24 17:59:49 +00003927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003928/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003929
Martin v. Löwis11437992002-04-12 09:54:03 +00003930int
3931main ()
3932{
3933
3934 ;
3935 return 0;
3936}
3937_ACEOF
3938ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003939ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003940# Try to create an executable without -o first, disregard a.out.
3941# It will help us diagnose broken compilers, and finding out an intuition
3942# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3944$as_echo_n "checking whether the C compiler works... " >&6; }
3945ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3946
3947# The possible output files:
3948ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3949
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950ac_rmfiles=
3951for ac_file in $ac_files
3952do
3953 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3956 esac
3957done
3958rm -f $ac_rmfiles
3959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961case "(($ac_try" in
3962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3963 *) ac_try_echo=$ac_try;;
3964esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3966$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3972# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3973# in a Makefile. We should not override ac_cv_exeext if it was cached,
3974# so that the user can short-circuit this test for compilers unknown to
3975# Autoconf.
3976for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003977do
3978 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 ;;
3982 [ab].out )
3983 # We found the default executable, but exeext='' is most
3984 # certainly right.
3985 break;;
3986 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988 then :; else
3989 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3990 fi
3991 # We set ac_cv_exeext here because the later test for it is not
3992 # safe: cross compilers may not add the suffix if given an `-o'
3993 # argument, so we may need to know it at that point already.
3994 # Even if this section looks crufty: it has the advantage of
3995 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996 break;;
3997 * )
3998 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 esac
4000done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001test "$ac_cv_exeext" = no && ac_cv_exeext=
4002
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004003else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004 ac_file=''
4005fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004006if test -z "$ac_file"; then :
4007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4008$as_echo "no" >&6; }
4009$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004010sed 's/^/| /' conftest.$ac_ext >&5
4011
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4013$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004014as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004015See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004016else
4017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4018$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4021$as_echo_n "checking for C compiler default output file name... " >&6; }
4022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4023$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004024ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025
Matthias Kloseb9621712010-04-24 17:59:49 +00004026rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004027ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4029$as_echo_n "checking for suffix of executables... " >&6; }
4030if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004031case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004038 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4042# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4043# work properly (i.e., refer to `conftest.exe'), while it won't with
4044# `rm'.
4045for ac_file in conftest.exe conftest conftest.*; do
4046 test -f "$ac_file" || continue
4047 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004049 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4050 break;;
4051 * ) break;;
4052 esac
4053done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004054else
Matthias Kloseb9621712010-04-24 17:59:49 +00004055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004057as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004058See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004060rm -f conftest conftest$ac_cv_exeext
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4062$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063
4064rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004065EXEEXT=$ac_cv_exeext
4066ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4068/* end confdefs.h. */
4069#include <stdio.h>
4070int
4071main ()
4072{
4073FILE *f = fopen ("conftest.out", "w");
4074 return ferror (f) || fclose (f) != 0;
4075
4076 ;
4077 return 0;
4078}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004080ac_clean_files="$ac_clean_files conftest.out"
4081# Check that the compiler produces executables we can run. If not, either
4082# the compiler is broken, or we cross compile.
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4084$as_echo_n "checking whether we are cross compiling... " >&6; }
4085if test "$cross_compiling" != yes; then
4086 { { ac_try="$ac_link"
4087case "(($ac_try" in
4088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4089 *) ac_try_echo=$ac_try;;
4090esac
4091eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4092$as_echo "$ac_try_echo"; } >&5
4093 (eval "$ac_link") 2>&5
4094 ac_status=$?
4095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4096 test $ac_status = 0; }
4097 if { ac_try='./conftest$ac_cv_exeext'
4098 { { case "(($ac_try" in
4099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4100 *) ac_try_echo=$ac_try;;
4101esac
4102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4103$as_echo "$ac_try_echo"; } >&5
4104 (eval "$ac_try") 2>&5
4105 ac_status=$?
4106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4107 test $ac_status = 0; }; }; then
4108 cross_compiling=no
4109 else
4110 if test "$cross_compiling" = maybe; then
4111 cross_compiling=yes
4112 else
4113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004115as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004116If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004117See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004118 fi
4119 fi
4120fi
4121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4122$as_echo "$cross_compiling" >&6; }
4123
4124rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4125ac_clean_files=$ac_clean_files_save
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4127$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004128if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 $as_echo_n "(cached) " >&6
4130else
4131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004132/* end confdefs.h. */
4133
4134int
4135main ()
4136{
4137
4138 ;
4139 return 0;
4140}
4141_ACEOF
4142rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004143if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004144case "(($ac_try" in
4145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146 *) ac_try_echo=$ac_try;;
4147esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4149$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004151 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4153 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 for ac_file in conftest.o conftest.obj conftest.*; do
4155 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4159 break;;
4160 esac
4161done
4162else
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004164sed 's/^/| /' conftest.$ac_ext >&5
4165
Matthias Kloseb9621712010-04-24 17:59:49 +00004166{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4167$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004168as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004169See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004171rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4174$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175OBJEXT=$ac_cv_objext
4176ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4178$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004179if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004181else
Matthias Kloseb9621712010-04-24 17:59:49 +00004182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004184
Martin v. Löwis11437992002-04-12 09:54:03 +00004185int
4186main ()
4187{
4188#ifndef __GNUC__
4189 choke me
4190#endif
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004197 ac_compiler_gnu=yes
4198else
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004202ac_cv_c_compiler_gnu=$ac_compiler_gnu
4203
4204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4206$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4207if test $ac_compiler_gnu = yes; then
4208 GCC=yes
4209else
4210 GCC=
4211fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004212ac_test_CFLAGS=${CFLAGS+set}
4213ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4215$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004216if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004218else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 ac_save_c_werror_flag=$ac_c_werror_flag
4220 ac_c_werror_flag=yes
4221 ac_cv_prog_cc_g=no
4222 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004225
Martin v. Löwis11437992002-04-12 09:54:03 +00004226int
4227main ()
4228{
4229
4230 ;
4231 return 0;
4232}
4233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004234if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004235 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236else
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 CFLAGS=""
4238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250
Matthias Kloseb9621712010-04-24 17:59:49 +00004251else
4252 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255/* end confdefs.h. */
4256
4257int
4258main ()
4259{
4260
4261 ;
4262 return 0;
4263}
4264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004265if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4273 ac_c_werror_flag=$ac_save_c_werror_flag
4274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4276$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004277if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279elif test $ac_cv_prog_cc_g = yes; then
4280 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004281 CFLAGS="-g -O2"
4282 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004284 fi
4285else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004286 if test "$GCC" = yes; then
4287 CFLAGS="-O2"
4288 else
4289 CFLAGS=
4290 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4293$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004294if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004296else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004298ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* end confdefs.h. */
4301#include <stdarg.h>
4302#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004303struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4305struct buf { int x; };
4306FILE * (*rcsopen) (struct buf *, struct stat *, int);
4307static char *e (p, i)
4308 char **p;
4309 int i;
4310{
4311 return p[i];
4312}
4313static char *f (char * (*g) (char **, int), char **p, ...)
4314{
4315 char *s;
4316 va_list v;
4317 va_start (v,p);
4318 s = g (p, va_arg (v,int));
4319 va_end (v);
4320 return s;
4321}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004322
4323/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4324 function prototypes and stuff, but not '\xHH' hex character constants.
4325 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004326 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4328 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4333 inside strings and character constants. */
4334#define FOO(x) 'x'
4335int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4336
Skip Montanaro6dead952003-09-25 14:50:04 +00004337int test (int i, double x);
4338struct s1 {int (*f) (int a);};
4339struct s2 {int (*f) (double a);};
4340int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4341int argc;
4342char **argv;
4343int
4344main ()
4345{
4346return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4347 ;
4348 return 0;
4349}
4350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004351for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4352 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004353do
4354 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358rm -f core conftest.err conftest.$ac_objext
4359 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004360done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004362CC=$ac_save_CC
4363
4364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365# AC_CACHE_VAL
4366case "x$ac_cv_prog_cc_c89" in
4367 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4369$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4372$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4376$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004378if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004379
Matthias Kloseb9621712010-04-24 17:59:49 +00004380fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004381
Martin v. Löwis11437992002-04-12 09:54:03 +00004382ac_ext=c
4383ac_cpp='$CPP $CPPFLAGS'
4384ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4385ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4386ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004387
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004388
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004389
4390
Matthias Kloseb9621712010-04-24 17:59:49 +00004391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4392$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004394# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004395if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004396 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
4398 case $withval in
4399 no) with_cxx_main=no
4400 MAINCC='$(CC)';;
4401 yes) with_cxx_main=yes
4402 MAINCC='$(CXX)';;
4403 *) with_cxx_main=yes
4404 MAINCC=$withval
4405 if test -z "$CXX"
4406 then
4407 CXX=$withval
4408 fi;;
4409 esac
4410else
4411
4412 with_cxx_main=no
4413 MAINCC='$(CC)'
4414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004415fi
4416
Matthias Kloseb9621712010-04-24 17:59:49 +00004417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4418$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004419
4420preset_cxx="$CXX"
4421if test -z "$CXX"
4422then
4423 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004424 gcc) if test -n "$ac_tool_prefix"; then
4425 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4426set dummy ${ac_tool_prefix}g++; ac_word=$2
4427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4428$as_echo_n "checking for $ac_word... " >&6; }
4429if ${ac_cv_path_CXX+:} false; then :
4430 $as_echo_n "(cached) " >&6
4431else
4432 case $CXX in
4433 [\\/]* | ?:[\\/]*)
4434 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4435 ;;
4436 *)
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4438for as_dir in notfound
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
4442 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004444 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4445 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4446 break 2
4447 fi
4448done
4449 done
4450IFS=$as_save_IFS
4451
4452 ;;
4453esac
4454fi
4455CXX=$ac_cv_path_CXX
4456if test -n "$CXX"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4458$as_echo "$CXX" >&6; }
4459else
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
4462fi
4463
4464
4465fi
4466if test -z "$ac_cv_path_CXX"; then
4467 ac_pt_CXX=$CXX
4468 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004469set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4471$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004472if ${ac_cv_path_ac_pt_CXX+:} false; then :
4473 $as_echo_n "(cached) " >&6
4474else
4475 case $ac_pt_CXX in
4476 [\\/]* | ?:[\\/]*)
4477 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4478 ;;
4479 *)
4480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4481for as_dir in notfound
4482do
4483 IFS=$as_save_IFS
4484 test -z "$as_dir" && as_dir=.
4485 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004487 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4489 break 2
4490 fi
4491done
4492 done
4493IFS=$as_save_IFS
4494
4495 ;;
4496esac
4497fi
4498ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4499if test -n "$ac_pt_CXX"; then
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4501$as_echo "$ac_pt_CXX" >&6; }
4502else
4503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4504$as_echo "no" >&6; }
4505fi
4506
4507 if test "x$ac_pt_CXX" = x; then
4508 CXX="g++"
4509 else
4510 case $cross_compiling:$ac_tool_warned in
4511yes:)
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4513$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4514ac_tool_warned=yes ;;
4515esac
4516 CXX=$ac_pt_CXX
4517 fi
4518else
4519 CXX="$ac_cv_path_CXX"
4520fi
4521 ;;
4522 cc) if test -n "$ac_tool_prefix"; then
4523 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4524set dummy ${ac_tool_prefix}c++; ac_word=$2
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004527if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529else
4530 case $CXX in
4531 [\\/]* | ?:[\\/]*)
4532 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4533 ;;
4534 *)
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in notfound
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004540 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004542 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004544 break 2
4545 fi
4546done
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004548IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 ;;
4551esac
4552fi
4553CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004554if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4556$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004557else
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004560fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004561
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004562
4563fi
4564if test -z "$ac_cv_path_CXX"; then
4565 ac_pt_CXX=$CXX
4566 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004567set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4569$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004570if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004571 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004572else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004573 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004574 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004575 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 +00004576 ;;
4577 *)
4578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4579for as_dir in notfound
4580do
4581 IFS=$as_save_IFS
4582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004585 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004587 break 2
4588 fi
4589done
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004591IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593 ;;
4594esac
4595fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004596ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4597if test -n "$ac_pt_CXX"; then
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4599$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004600else
Matthias Kloseb9621712010-04-24 17:59:49 +00004601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004604
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004605 if test "x$ac_pt_CXX" = x; then
4606 CXX="c++"
4607 else
4608 case $cross_compiling:$ac_tool_warned in
4609yes:)
4610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4612ac_tool_warned=yes ;;
4613esac
4614 CXX=$ac_pt_CXX
4615 fi
4616else
4617 CXX="$ac_cv_path_CXX"
4618fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004619 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620 clang|*/clang) if test -n "$ac_tool_prefix"; then
4621 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4622set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004640 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
Ned Deilycbfb9a52012-06-23 16:02:19 -07004648 ;;
4649esac
4650fi
4651CXX=$ac_cv_path_CXX
4652if test -n "$CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654$as_echo "$CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004660
4661fi
4662if test -z "$ac_cv_path_CXX"; then
4663 ac_pt_CXX=$CXX
4664 # Extract the first word of "clang++", so it can be a program name with args.
4665set dummy clang++; ac_word=$2
4666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
4668if ${ac_cv_path_ac_pt_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $ac_pt_CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4695if test -n "$ac_pt_CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4697$as_echo "$ac_pt_CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703 if test "x$ac_pt_CXX" = x; then
4704 CXX="clang++"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_pt_CXX
4713 fi
4714else
4715 CXX="$ac_cv_path_CXX"
4716fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004717 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718 esac
4719 if test "$CXX" = "notfound"
4720 then
4721 CXX=""
4722 fi
4723fi
4724if test -z "$CXX"
4725then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726 if test -n "$ac_tool_prefix"; then
4727 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4728 do
4729 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004733if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735else
4736 if test -n "$CXX"; then
4737 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4738else
4739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4740for as_dir in $PATH
4741do
4742 IFS=$as_save_IFS
4743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 break 2
4749 fi
4750done
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753
4754fi
4755fi
4756CXX=$ac_cv_prog_CXX
4757if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4759$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763fi
4764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004765
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 test -n "$CXX" && break
4767 done
4768fi
4769if test -z "$CXX"; then
4770 ac_ct_CXX=$CXX
4771 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4772do
4773 # Extract the first word of "$ac_prog", so it can be a program name with args.
4774set dummy $ac_prog; ac_word=$2
4775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
4777if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780 if test -n "$ac_ct_CXX"; then
4781 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4782else
4783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786 IFS=$as_save_IFS
4787 test -z "$as_dir" && as_dir=.
4788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004790 ac_cv_prog_ac_ct_CXX="$ac_prog"
4791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792 break 2
4793 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 done
4796IFS=$as_save_IFS
4797
4798fi
4799fi
4800ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4801if test -n "$ac_ct_CXX"; then
4802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4803$as_echo "$ac_ct_CXX" >&6; }
4804else
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4806$as_echo "no" >&6; }
4807fi
4808
4809
4810 test -n "$ac_ct_CXX" && break
4811done
4812
4813 if test "x$ac_ct_CXX" = x; then
4814 CXX="notfound"
4815 else
4816 case $cross_compiling:$ac_tool_warned in
4817yes:)
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4820ac_tool_warned=yes ;;
4821esac
4822 CXX=$ac_ct_CXX
4823 fi
4824fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004825
4826 if test "$CXX" = "notfound"
4827 then
4828 CXX=""
4829 fi
4830fi
4831if test "$preset_cxx" != "$CXX"
4832then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004833 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834
4835 By default, distutils will build C++ extension modules with \"$CXX\".
4836 If this is not intended, then set CXX on the configure command line.
4837 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004838$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839
4840 By default, distutils will build C++ extension modules with \"$CXX\".
4841 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004842 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843fi
4844
4845
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4847$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4848save_LDFLAGS="$LDFLAGS"
4849LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004850
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4852/* end confdefs.h. */
4853
4854int
4855main ()
4856{
4857
4858 ;
4859 return 0;
4860}
4861_ACEOF
4862if ac_fn_c_try_link "$LINENO"; then :
4863 NO_AS_NEEDED="-Wl,--no-as-needed"
4864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4865$as_echo "yes" >&6; }
4866else
4867 NO_AS_NEEDED=""
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4869$as_echo "no" >&6; }
4870fi
4871rm -f core conftest.err conftest.$ac_objext \
4872 conftest$ac_exeext conftest.$ac_ext
4873LDFLAGS="$save_LDFLAGS"
4874
4875
4876
4877# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004878ac_ext=c
4879ac_cpp='$CPP $CPPFLAGS'
4880ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4881ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4882ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4884$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004885# On Suns, sometimes $CPP names a directory.
4886if test -n "$CPP" && test -d "$CPP"; then
4887 CPP=
4888fi
4889if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004890 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004892else
Martin v. Löwis11437992002-04-12 09:54:03 +00004893 # Double quotes because CPP needs to be expanded
4894 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4895 do
4896 ac_preproc_ok=false
4897for ac_c_preproc_warn_flag in '' yes
4898do
4899 # Use a header file that comes with gcc, so configuring glibc
4900 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004901 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4902 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004903 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004906/* end confdefs.h. */
4907#ifdef __STDC__
4908# include <limits.h>
4909#else
4910# include <assert.h>
4911#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004912 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004913_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004914if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004915
Matthias Kloseb9621712010-04-24 17:59:49 +00004916else
Martin v. Löwis11437992002-04-12 09:54:03 +00004917 # Broken: fails on valid input.
4918continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004919fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004920rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004921
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004922 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004923 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004926#include <ac_nonexistent.h>
4927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004928if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004929 # Broken: success on invalid input.
4930continue
4931else
Martin v. Löwis11437992002-04-12 09:54:03 +00004932 # Passes both tests.
4933ac_preproc_ok=:
4934break
4935fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004936rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004937
4938done
4939# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004940rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004941if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004942 break
4943fi
4944
4945 done
4946 ac_cv_prog_CPP=$CPP
4947
4948fi
4949 CPP=$ac_cv_prog_CPP
4950else
4951 ac_cv_prog_CPP=$CPP
4952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4954$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004955ac_preproc_ok=false
4956for ac_c_preproc_warn_flag in '' yes
4957do
4958 # Use a header file that comes with gcc, so configuring glibc
4959 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004960 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4961 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 # On the NeXT, cc -E runs the code through the compiler's parser,
4963 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004965/* end confdefs.h. */
4966#ifdef __STDC__
4967# include <limits.h>
4968#else
4969# include <assert.h>
4970#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004971 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004973if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004974
Matthias Kloseb9621712010-04-24 17:59:49 +00004975else
Martin v. Löwis11437992002-04-12 09:54:03 +00004976 # Broken: fails on valid input.
4977continue
4978fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004979rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004981 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004982 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004985#include <ac_nonexistent.h>
4986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004987if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004988 # Broken: success on invalid input.
4989continue
4990else
Martin v. Löwis11437992002-04-12 09:54:03 +00004991 # Passes both tests.
4992ac_preproc_ok=:
4993break
4994fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004995rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004996
4997done
4998# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005000if $ac_preproc_ok; then :
5001
Martin v. Löwis11437992002-04-12 09:54:03 +00005002else
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005005as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005006See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005007fi
5008
5009ac_ext=c
5010ac_cpp='$CPP $CPPFLAGS'
5011ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5012ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5013ac_compiler_gnu=$ac_cv_c_compiler_gnu
5014
5015
Matthias Kloseb9621712010-04-24 17:59:49 +00005016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5017$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005018if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005022 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 # Loop through the user's path and test for each of PROGNAME-LIST
5024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005025for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5026do
5027 IFS=$as_save_IFS
5028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 for ac_prog in grep ggrep; do
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005032 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005033# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034 # Check for GNU $ac_path_GREP
5035case `"$ac_path_GREP" --version 2>&1` in
5036*GNU*)
5037 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5038*)
5039 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041 while :
5042 do
5043 cat "conftest.in" "conftest.in" >"conftest.tmp"
5044 mv "conftest.tmp" "conftest.in"
5045 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5048 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005050 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5051 # Best one so far, save it but keep looking for a better one
5052 ac_cv_path_GREP="$ac_path_GREP"
5053 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005054 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055 # 10*(2^10) chars as input seems more than enough
5056 test $ac_count -gt 10 && break
5057 done
5058 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5059esac
5060
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 $ac_path_GREP_found && break 3
5062 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005067 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 +00005068 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069else
5070 ac_cv_path_GREP=$GREP
5071fi
5072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5075$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 GREP="$ac_cv_path_GREP"
5077
5078
Matthias Kloseb9621712010-04-24 17:59:49 +00005079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5080$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005081if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083else
5084 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5085 then ac_cv_path_EGREP="$GREP -E"
5086 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005088 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 # Loop through the user's path and test for each of PROGNAME-LIST
5090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5092do
5093 IFS=$as_save_IFS
5094 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 for ac_prog in egrep; do
5096 for ac_exec_ext in '' $ac_executable_extensions; do
5097 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005098 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005099# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100 # Check for GNU $ac_path_EGREP
5101case `"$ac_path_EGREP" --version 2>&1` in
5102*GNU*)
5103 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5104*)
5105 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005107 while :
5108 do
5109 cat "conftest.in" "conftest.in" >"conftest.tmp"
5110 mv "conftest.tmp" "conftest.in"
5111 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005113 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5114 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005115 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5117 # Best one so far, save it but keep looking for a better one
5118 ac_cv_path_EGREP="$ac_path_EGREP"
5119 ac_path_EGREP_max=$ac_count
5120 fi
5121 # 10*(2^10) chars as input seems more than enough
5122 test $ac_count -gt 10 && break
5123 done
5124 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5125esac
5126
Matthias Kloseb9621712010-04-24 17:59:49 +00005127 $ac_path_EGREP_found && break 3
5128 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005129 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005131IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005132 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005133 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 +00005134 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135else
5136 ac_cv_path_EGREP=$EGREP
5137fi
5138
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139 fi
5140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5142$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005144
5145
Matthias Kloseb9621712010-04-24 17:59:49 +00005146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5147$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005148if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005149 $as_echo_n "(cached) " >&6
5150else
5151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005152/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005153#include <stdlib.h>
5154#include <stdarg.h>
5155#include <string.h>
5156#include <float.h>
5157
5158int
5159main ()
5160{
5161
5162 ;
5163 return 0;
5164}
5165_ACEOF
5166if ac_fn_c_try_compile "$LINENO"; then :
5167 ac_cv_header_stdc=yes
5168else
5169 ac_cv_header_stdc=no
5170fi
5171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5172
5173if test $ac_cv_header_stdc = yes; then
5174 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5176/* end confdefs.h. */
5177#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005178
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005179_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005181 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005183else
Matthias Kloseb9621712010-04-24 17:59:49 +00005184 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005185fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005186rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005187
Matthias Kloseb9621712010-04-24 17:59:49 +00005188fi
5189
5190if test $ac_cv_header_stdc = yes; then
5191 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193/* end confdefs.h. */
5194#include <stdlib.h>
5195
5196_ACEOF
5197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5198 $EGREP "free" >/dev/null 2>&1; then :
5199
5200else
5201 ac_cv_header_stdc=no
5202fi
5203rm -f conftest*
5204
5205fi
5206
5207if test $ac_cv_header_stdc = yes; then
5208 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5209 if test "$cross_compiling" = yes; then :
5210 :
5211else
5212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5213/* end confdefs.h. */
5214#include <ctype.h>
5215#include <stdlib.h>
5216#if ((' ' & 0x0FF) == 0x020)
5217# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5218# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5219#else
5220# define ISLOWER(c) \
5221 (('a' <= (c) && (c) <= 'i') \
5222 || ('j' <= (c) && (c) <= 'r') \
5223 || ('s' <= (c) && (c) <= 'z'))
5224# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5225#endif
5226
5227#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5228int
5229main ()
5230{
5231 int i;
5232 for (i = 0; i < 256; i++)
5233 if (XOR (islower (i), ISLOWER (i))
5234 || toupper (i) != TOUPPER (i))
5235 return 2;
5236 return 0;
5237}
5238_ACEOF
5239if ac_fn_c_try_run "$LINENO"; then :
5240
5241else
5242 ac_cv_header_stdc=no
5243fi
5244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5245 conftest.$ac_objext conftest.beam conftest.$ac_ext
5246fi
5247
5248fi
5249fi
5250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5251$as_echo "$ac_cv_header_stdc" >&6; }
5252if test $ac_cv_header_stdc = yes; then
5253
5254$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5255
5256fi
5257
5258# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5259for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5260 inttypes.h stdint.h unistd.h
5261do :
5262 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5263ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5264"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005265if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005266 cat >>confdefs.h <<_ACEOF
5267#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5268_ACEOF
5269
5270fi
5271
5272done
5273
5274
5275
5276 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 +02005277if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005278 MINIX=yes
5279else
5280 MINIX=
5281fi
5282
5283
5284 if test "$MINIX" = yes; then
5285
5286$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5287
5288
5289$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5290
5291
5292$as_echo "#define _MINIX 1" >>confdefs.h
5293
5294 fi
5295
5296
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5298$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005299if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005300 $as_echo_n "(cached) " >&6
5301else
5302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5303/* end confdefs.h. */
5304
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005305# define __EXTENSIONS__ 1
5306 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005307int
5308main ()
5309{
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315if ac_fn_c_try_compile "$LINENO"; then :
5316 ac_cv_safe_to_define___extensions__=yes
5317else
5318 ac_cv_safe_to_define___extensions__=no
5319fi
5320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5321fi
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5323$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5324 test $ac_cv_safe_to_define___extensions__ = yes &&
5325 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5326
5327 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5328
5329 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5330
5331 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5332
5333 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5334
5335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337# Check for unsupported systems
5338case $ac_sys_system/$ac_sys_release in
5339atheos*|Linux*/1*)
5340 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5341 echo See README for details.
5342 exit 1;;
5343esac
5344
5345
Matthias Kloseb9621712010-04-24 17:59:49 +00005346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5347$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348
5349# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005350if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005351 withval=$with_suffix;
5352 case $withval in
5353 no) EXEEXT=;;
5354 yes) EXEEXT=.exe;;
5355 *) EXEEXT=$withval;;
5356 esac
5357fi
5358
Matthias Kloseb9621712010-04-24 17:59:49 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5360$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361
5362# Test whether we're running on a non-case-sensitive system, in which
5363# case we give a warning if no ext is given
5364
Matthias Kloseb9621712010-04-24 17:59:49 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5366$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367if test ! -d CaseSensitiveTestDir; then
5368mkdir CaseSensitiveTestDir
5369fi
5370
5371if test -d casesensitivetestdir
5372then
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5374$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375 BUILDEXEEXT=.exe
5376else
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5378$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 BUILDEXEEXT=$EXEEXT
5380fi
5381rmdir CaseSensitiveTestDir
5382
5383case $MACHDEP in
5384bsdos*)
5385 case $CC in
5386 gcc) CC="$CC -D_HAVE_BSDI";;
5387 esac;;
5388esac
5389
5390case $ac_sys_system in
5391hp*|HP*)
5392 case $CC in
5393 cc|*/cc) CC="$CC -Ae";;
5394 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395esac
5396
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005397MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5398
5399
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005400
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5403$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404if test -z "$LIBRARY"
5405then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005406 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5409$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005410
5411# LDLIBRARY is the name of the library to link against (as opposed to the
5412# name of the library into which to insert object files). BLDLIBRARY is also
5413# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5414# is blank as the main program is not linked directly against LDLIBRARY.
5415# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5416# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5417# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5418# DLLLIBRARY is the shared (i.e., DLL) library.
5419#
5420# RUNSHARED is used to run shared python without installed libraries
5421#
5422# INSTSONAME is the name of the shared library that will be use to install
5423# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005424#
5425# LDVERSION is the shared library version number, normally the Python version
5426# with the ABI build flags appended.
5427
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428
5429
5430
5431
5432
5433
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005435LDLIBRARY="$LIBRARY"
5436BLDLIBRARY='$(LDLIBRARY)'
5437INSTSONAME='$(LDLIBRARY)'
5438DLLLIBRARY=''
5439LDLIBRARYDIR=''
5440RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005441LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442
5443# LINKCC is the command that links the python executable -- default is $(CC).
5444# If CXX is set, and if it is needed to link a main function that was
5445# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5446# python might then depend on the C++ runtime
5447# This is altered for AIX in order to build the export list before
5448# linking.
5449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5451$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452if test -z "$LINKCC"
5453then
5454 LINKCC='$(PURIFY) $(MAINCC)'
5455 case $ac_sys_system in
5456 AIX*)
5457 exp_extra="\"\""
5458 if test $ac_sys_release -ge 5 -o \
5459 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5460 exp_extra="."
5461 fi
5462 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463 QNX*)
5464 # qcc must be used because the other compilers do not
5465 # support -N.
5466 LINKCC=qcc;;
5467 esac
5468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5470$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005471
5472# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5473# make sure we default having it set to "no": this is used by
5474# distutils.unixccompiler to know if it should add --enable-new-dtags
5475# to linker command lines, and failing to detect GNU ld simply results
5476# in the same bahaviour as before.
5477
Matthias Kloseb9621712010-04-24 17:59:49 +00005478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5479$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005480ac_prog=ld
5481if test "$GCC" = yes; then
5482 ac_prog=`$CC -print-prog-name=ld`
5483fi
5484case `"$ac_prog" -V 2>&1 < /dev/null` in
5485 *GNU*)
5486 GNULD=yes;;
5487 *)
5488 GNULD=no;;
5489esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5491$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005492
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5494$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005495if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005496 $as_echo_n "(cached) " >&6
5497else
5498 ac_cv_c_inline=no
5499for ac_kw in inline __inline__ __inline; do
5500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5501/* end confdefs.h. */
5502#ifndef __cplusplus
5503typedef int foo_t;
5504static $ac_kw foo_t static_foo () {return 0; }
5505$ac_kw foo_t foo () {return 0; }
5506#endif
5507
5508_ACEOF
5509if ac_fn_c_try_compile "$LINENO"; then :
5510 ac_cv_c_inline=$ac_kw
5511fi
5512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5513 test "$ac_cv_c_inline" != no && break
5514done
5515
5516fi
5517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5518$as_echo "$ac_cv_c_inline" >&6; }
5519
5520case $ac_cv_c_inline in
5521 inline | yes) ;;
5522 *)
5523 case $ac_cv_c_inline in
5524 no) ac_val=;;
5525 *) ac_val=$ac_cv_c_inline;;
5526 esac
5527 cat >>confdefs.h <<_ACEOF
5528#ifndef __cplusplus
5529#define inline $ac_val
5530#endif
5531_ACEOF
5532 ;;
5533esac
5534
5535if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005536
5537$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005538
5539
5540fi
5541
5542
Matthias Kloseb9621712010-04-24 17:59:49 +00005543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5544$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005546if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547 enableval=$enable_shared;
5548fi
5549
5550
5551if test -z "$enable_shared"
5552then
5553 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005554 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005555 enable_shared="yes";;
5556 *)
5557 enable_shared="no";;
5558 esac
5559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5561$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005562
Matthias Kloseb9621712010-04-24 17:59:49 +00005563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5564$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005566if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005567 enableval=$enable_profiling;
5568fi
5569
5570if test "x$enable_profiling" = xyes; then
5571 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005572 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005574/* end confdefs.h. */
5575int main() { return 0; }
5576_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005577if ac_fn_c_try_link "$LINENO"; then :
5578
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005579else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005580 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005582rm -f core conftest.err conftest.$ac_objext \
5583 conftest$ac_exeext conftest.$ac_ext
5584 CC="$ac_save_cc"
5585else
5586 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5589$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
doko@ubuntu.comba015832012-06-30 16:52:05 +02005591if test "x$enable_profiling" = xyes; then
5592 BASECFLAGS="-pg $BASECFLAGS"
5593 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594fi
5595
Matthias Kloseb9621712010-04-24 17:59:49 +00005596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5597$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
5599# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5600# library that we build, but we do not want to link against it (we
5601# will find it with a -framework option). For this reason there is an
5602# extra variable BLDLIBRARY against which Python and the extension
5603# modules are linked, BLDLIBRARY. This is normally the same as
5604# LDLIBRARY, but empty for MacOSX framework builds.
5605if test "$enable_framework"
5606then
5607 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005608 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609 BLDLIBRARY=''
5610else
5611 BLDLIBRARY='$(LDLIBRARY)'
5612fi
5613
5614# Other platforms follow
5615if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005616 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617
Matthias Kloseb9621712010-04-24 17:59:49 +00005618$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619
5620 case $ac_sys_system in
5621 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005622 LDLIBRARY='libpython$(LDVERSION).dll.a'
5623 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 ;;
5625 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).so'
5627 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005628 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005630 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005631 then
5632 PY3LIBRARY=libpython3.so
5633 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005634 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005635 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).so'
5637 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005638 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 case $ac_sys_system in
5640 FreeBSD*)
5641 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5642 ;;
5643 esac
5644 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005645 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005646 then
5647 PY3LIBRARY=libpython3.so
5648 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649 ;;
5650 hp*|HP*)
5651 case `uname -m` in
5652 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005653 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 ;;
5655 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005656 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 ;;
5658 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005659 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005660 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 LDLIBRARY='libpython$(LDVERSION).dylib'
5664 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005665 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005667 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005668 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005669 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005670 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672 esac
5673else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005674 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 case $ac_sys_system in
5676 CYGWIN*)
5677 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005678 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 ;;
5680 esac
5681fi
5682
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005683if test "$cross_compiling" = yes; then
5684 RUNSHARED=
5685fi
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5688$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690if test -n "$ac_tool_prefix"; then
5691 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5692set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005695if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697else
5698 if test -n "$RANLIB"; then
5699 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5700else
5701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702for as_dir in $PATH
5703do
5704 IFS=$as_save_IFS
5705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 break 2
5711 fi
5712done
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714IFS=$as_save_IFS
5715
5716fi
5717fi
5718RANLIB=$ac_cv_prog_RANLIB
5719if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5721$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722else
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
5726
5727
5728fi
5729if test -z "$ac_cv_prog_RANLIB"; then
5730 ac_ct_RANLIB=$RANLIB
5731 # Extract the first word of "ranlib", so it can be a program name with args.
5732set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005735if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737else
5738 if test -n "$ac_ct_RANLIB"; then
5739 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5740else
5741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5742for as_dir in $PATH
5743do
5744 IFS=$as_save_IFS
5745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750 break 2
5751 fi
5752done
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754IFS=$as_save_IFS
5755
5756fi
5757fi
5758ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5759if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5761$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762else
Matthias Kloseb9621712010-04-24 17:59:49 +00005763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765fi
5766
5767 if test "x$ac_ct_RANLIB" = x; then
5768 RANLIB=":"
5769 else
5770 case $cross_compiling:$ac_tool_warned in
5771yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774ac_tool_warned=yes ;;
5775esac
5776 RANLIB=$ac_ct_RANLIB
5777 fi
5778else
5779 RANLIB="$ac_cv_prog_RANLIB"
5780fi
5781
5782
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005783if test -n "$ac_tool_prefix"; then
5784 for ac_prog in ar aal
5785 do
5786 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5787set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5789$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005790if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792else
5793 if test -n "$AR"; then
5794 ac_cv_prog_AR="$AR" # Let the user override the test.
5795else
5796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799 IFS=$as_save_IFS
5800 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005801 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005802 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005803 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005804 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 break 2
5806 fi
5807done
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809IFS=$as_save_IFS
5810
5811fi
5812fi
5813AR=$ac_cv_prog_AR
5814if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5816$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817else
Matthias Kloseb9621712010-04-24 17:59:49 +00005818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820fi
5821
5822
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005823 test -n "$AR" && break
5824 done
5825fi
5826if test -z "$AR"; then
5827 ac_ct_AR=$AR
5828 for ac_prog in ar aal
5829do
5830 # Extract the first word of "$ac_prog", so it can be a program name with args.
5831set dummy $ac_prog; ac_word=$2
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5833$as_echo_n "checking for $ac_word... " >&6; }
5834if ${ac_cv_prog_ac_ct_AR+:} false; then :
5835 $as_echo_n "(cached) " >&6
5836else
5837 if test -n "$ac_ct_AR"; then
5838 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5839else
5840as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5841for as_dir in $PATH
5842do
5843 IFS=$as_save_IFS
5844 test -z "$as_dir" && as_dir=.
5845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005847 ac_cv_prog_ac_ct_AR="$ac_prog"
5848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5849 break 2
5850 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005852 done
5853IFS=$as_save_IFS
5854
5855fi
5856fi
5857ac_ct_AR=$ac_cv_prog_ac_ct_AR
5858if test -n "$ac_ct_AR"; then
5859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5860$as_echo "$ac_ct_AR" >&6; }
5861else
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
5864fi
5865
5866
5867 test -n "$ac_ct_AR" && break
5868done
5869
5870 if test "x$ac_ct_AR" = x; then
5871 AR="ar"
5872 else
5873 case $cross_compiling:$ac_tool_warned in
5874yes:)
5875{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5876$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5877ac_tool_warned=yes ;;
5878esac
5879 AR=$ac_ct_AR
5880 fi
5881fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882
5883
5884# tweak ARFLAGS only if the user didn't set it on the command line
5885
5886if test -z "$ARFLAGS"
5887then
5888 ARFLAGS="rc"
5889fi
5890
doko@ubuntu.com58844492012-06-30 18:25:32 +02005891if test -n "$ac_tool_prefix"; then
5892 for ac_prog in readelf
5893 do
5894 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5895set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_prog_READELF+:} false; then :
5899 $as_echo_n "(cached) " >&6
5900else
5901 if test -n "$READELF"; then
5902 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5903else
5904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905for as_dir in $PATH
5906do
5907 IFS=$as_save_IFS
5908 test -z "$as_dir" && as_dir=.
5909 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005910 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005911 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5912 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5913 break 2
5914 fi
5915done
5916 done
5917IFS=$as_save_IFS
5918
5919fi
5920fi
5921READELF=$ac_cv_prog_READELF
5922if test -n "$READELF"; then
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5924$as_echo "$READELF" >&6; }
5925else
5926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5927$as_echo "no" >&6; }
5928fi
5929
5930
5931 test -n "$READELF" && break
5932 done
5933fi
5934if test -z "$READELF"; then
5935 ac_ct_READELF=$READELF
5936 for ac_prog in readelf
5937do
5938 # Extract the first word of "$ac_prog", so it can be a program name with args.
5939set dummy $ac_prog; ac_word=$2
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5941$as_echo_n "checking for $ac_word... " >&6; }
5942if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5943 $as_echo_n "(cached) " >&6
5944else
5945 if test -n "$ac_ct_READELF"; then
5946 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5947else
5948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949for as_dir in $PATH
5950do
5951 IFS=$as_save_IFS
5952 test -z "$as_dir" && as_dir=.
5953 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005955 ac_cv_prog_ac_ct_READELF="$ac_prog"
5956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5957 break 2
5958 fi
5959done
5960 done
5961IFS=$as_save_IFS
5962
5963fi
5964fi
5965ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5966if test -n "$ac_ct_READELF"; then
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5968$as_echo "$ac_ct_READELF" >&6; }
5969else
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
5972fi
5973
5974
5975 test -n "$ac_ct_READELF" && break
5976done
5977
5978 if test "x$ac_ct_READELF" = x; then
5979 READELF=":"
5980 else
5981 case $cross_compiling:$ac_tool_warned in
5982yes:)
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5984$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5985ac_tool_warned=yes ;;
5986esac
5987 READELF=$ac_ct_READELF
5988 fi
5989fi
5990
5991if test "$cross_compiling" = yes; then
5992 case "$READELF" in
5993 readelf|:)
5994 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5995 ;;
5996 esac
5997fi
5998
5999
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000
Matthias Klosec4c48422012-10-21 23:05:35 +02006001for ac_prog in python$PACKAGE_VERSION python3 python
6002do
6003 # Extract the first word of "$ac_prog", so it can be a program name with args.
6004set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6006$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006007if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006008 $as_echo_n "(cached) " >&6
6009else
Matthias Klosec4c48422012-10-21 23:05:35 +02006010 if test -n "$PYTHON"; then
6011 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012else
6013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014for as_dir in $PATH
6015do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
6018 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006020 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6022 break 2
6023 fi
6024done
6025 done
6026IFS=$as_save_IFS
6027
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006028fi
6029fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006030PYTHON=$ac_cv_prog_PYTHON
6031if test -n "$PYTHON"; then
6032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6033$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006034else
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6036$as_echo "no" >&6; }
6037fi
6038
6039
Matthias Klosec4c48422012-10-21 23:05:35 +02006040 test -n "$PYTHON" && break
6041done
6042test -n "$PYTHON" || PYTHON="not-found"
6043
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006044if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006045 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6046else
6047 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006048fi
6049
6050
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051case $MACHDEP in
6052bsdos*|hp*|HP*)
6053 # install -d does not work on BSDI or HP-UX
6054 if test -z "$INSTALL"
6055 then
6056 INSTALL="${srcdir}/install-sh -c"
6057 fi
6058esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059# Find a good install program. We prefer a C program (faster),
6060# so one script is as good as another. But avoid the broken or
6061# incompatible versions:
6062# SysV /etc/install, /usr/sbin/install
6063# SunOS /usr/etc/install
6064# IRIX /sbin/install
6065# AIX /bin/install
6066# AmigaOS /C/install, which installs bootblocks on floppy discs
6067# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6068# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6069# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6070# OS/2's system install, which has a completely different semantic
6071# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006072# Reject install programs that cannot install multiple files.
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6074$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006076if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078else
6079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 # Account for people who put trailing slashes in PATH elements.
6085case $as_dir/ in #((
6086 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089 /usr/ucb/* ) ;;
6090 *)
6091 # OSF1 and SCO ODT 3.0 have their own names for install.
6092 # Don't use installbsd from OSF since it installs stuff as root
6093 # by default.
6094 for ac_prog in ginstall scoinst install; do
6095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006096 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006097 if test $ac_prog = install &&
6098 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6099 # AIX install. It has an incompatible calling convention.
6100 :
6101 elif test $ac_prog = install &&
6102 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6103 # program-specific install script used by HP pwplus--don't use.
6104 :
6105 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 rm -rf conftest.one conftest.two conftest.dir
6107 echo one > conftest.one
6108 echo two > conftest.two
6109 mkdir conftest.dir
6110 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6111 test -s conftest.one && test -s conftest.two &&
6112 test -s conftest.dir/conftest.one &&
6113 test -s conftest.dir/conftest.two
6114 then
6115 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6116 break 3
6117 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006118 fi
6119 fi
6120 done
6121 done
6122 ;;
6123esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006124
6125 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006126IFS=$as_save_IFS
6127
Matthias Kloseb9621712010-04-24 17:59:49 +00006128rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129
6130fi
6131 if test "${ac_cv_path_install+set}" = set; then
6132 INSTALL=$ac_cv_path_install
6133 else
6134 # As a last resort, use the slow shell script. Don't cache a
6135 # value for INSTALL within a source directory, because that will
6136 # break other packages using the cache if that directory is
6137 # removed, or if the value is a relative name.
6138 INSTALL=$ac_install_sh
6139 fi
6140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6142$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
6144# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6145# It thinks the first close brace ends the variable substitution.
6146test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6147
6148test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6149
6150test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6151
Matthias Klose93a0ef12012-03-15 18:08:34 +01006152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6153$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6154if test -z "$MKDIR_P"; then
6155 if ${ac_cv_path_mkdir+:} false; then :
6156 $as_echo_n "(cached) " >&6
6157else
6158 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6159for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6160do
6161 IFS=$as_save_IFS
6162 test -z "$as_dir" && as_dir=.
6163 for ac_prog in mkdir gmkdir; do
6164 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006165 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006166 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6167 'mkdir (GNU coreutils) '* | \
6168 'mkdir (coreutils) '* | \
6169 'mkdir (fileutils) '4.1*)
6170 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6171 break 3;;
6172 esac
6173 done
6174 done
6175 done
6176IFS=$as_save_IFS
6177
6178fi
6179
6180 test -d ./--version && rmdir ./--version
6181 if test "${ac_cv_path_mkdir+set}" = set; then
6182 MKDIR_P="$ac_cv_path_mkdir -p"
6183 else
6184 # As a last resort, use the slow shell script. Don't cache a
6185 # value for MKDIR_P within a source directory, because that will
6186 # break other packages using the cache if that directory is
6187 # removed, or if the value is a relative name.
6188 MKDIR_P="$ac_install_sh -d"
6189 fi
6190fi
6191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6192$as_echo "$MKDIR_P" >&6; }
6193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194
6195# Not every filesystem supports hard links
6196
6197if test -z "$LN" ; then
6198 case $ac_sys_system in
6199 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 *) LN=ln;;
6201 esac
6202fi
6203
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006204# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006205
6206ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006207
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6210$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211
6212# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006213if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 withval=$with_pydebug;
6215if test "$withval" != no
6216then
6217
Matthias Kloseb9621712010-04-24 17:59:49 +00006218$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6221$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006223 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006224else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6225$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226fi
6227else
Matthias Kloseb9621712010-04-24 17:59:49 +00006228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230fi
6231
6232
6233# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6234# merged with this chunk of code?
6235
6236# Optimizer/debugger flags
6237# ------------------------
6238# (The following bit of code is complicated enough - please keep things
6239# indented properly. Just pretend you're editing Python code. ;-)
6240
6241# There are two parallel sets of case statements below, one that checks to
6242# see if OPT was set and one that does BASECFLAGS setting based upon
6243# compiler and platform. BASECFLAGS tweaks need to be made even if the
6244# user set OPT.
6245
6246# tweak OPT based on compiler and platform, only if the user didn't set
6247# it on the command line
6248
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006249if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250then
6251 case $GCC in
6252 yes)
6253 if test "$CC" != 'g++' ; then
6254 STRICT_PROTO="-Wstrict-prototypes"
6255 fi
6256 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6257 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6258 WRAP="-fwrapv"
6259 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006260
6261 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006262 case $CC in
6263 *clang*) WRAP="-fwrapv"
6264 ;;
6265 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006266
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267 case $ac_cv_prog_cc_g in
6268 yes)
6269 if test "$Py_DEBUG" = 'true' ; then
6270 # Optimization messes up debuggers, so turn it off for
6271 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006272 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273 else
6274 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6275 fi
6276 ;;
6277 *)
6278 OPT="-O3 -Wall $STRICT_PROTO"
6279 ;;
6280 esac
6281 case $ac_sys_system in
6282 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6283 ;;
6284 esac
6285 ;;
6286
6287 *)
6288 OPT="-O"
6289 ;;
6290 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006291fi
6292
6293
6294
6295# The -arch flags for universal builds on OSX
6296UNIVERSAL_ARCH_FLAGS=
6297
6298
6299# tweak BASECFLAGS based on compiler and platform
6300case $GCC in
6301yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006302 # Python doesn't violate C99 aliasing rules, but older versions of
6303 # GCC produce warnings for legal Python code. Enable
6304 # -fno-strict-aliasing on versions of GCC that support but produce
6305 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6307$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 ac_save_cc="$CC"
6309 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006310 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006311 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006312 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006313else
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006316
Matthias Kloseb159a552010-04-25 21:00:44 +00006317
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006318int
6319main ()
6320{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006321
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006322 ;
6323 return 0;
6324}
Matthias Kloseb159a552010-04-25 21:00:44 +00006325
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006327if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006328
6329 CC="$ac_save_cc -fstrict-aliasing"
6330 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006332/* end confdefs.h. */
6333
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006334 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006335int
6336main ()
6337{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006338double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006339 ;
6340 return 0;
6341}
Matthias Kloseb159a552010-04-25 21:00:44 +00006342
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006344if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006345
6346 ac_cv_no_strict_aliasing=no
6347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348else
Matthias Kloseb159a552010-04-25 21:00:44 +00006349
6350 ac_cv_no_strict_aliasing=yes
6351
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006352fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006354
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006355else
Matthias Kloseb159a552010-04-25 21:00:44 +00006356
6357 ac_cv_no_strict_aliasing=no
6358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006361fi
6362
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006363 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6366$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006367 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006368 then
6369 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6370 fi
6371
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6373$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6374 ac_save_cc="$CC"
6375 CC="$CC -Wunused-result -Werror"
6376 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006377 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006378 $as_echo_n "(cached) " >&6
6379else
6380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381/* end confdefs.h. */
6382
6383
6384int
6385main ()
6386{
6387
6388 ;
6389 return 0;
6390}
6391
6392_ACEOF
6393if ac_fn_c_try_compile "$LINENO"; then :
6394
6395 ac_cv_disable_unused_result_warning=yes
6396
6397else
6398
6399 ac_cv_disable_unused_result_warning=no
6400
6401fi
6402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6403fi
6404
6405 CFLAGS="$save_CFLAGS"
6406 CC="$ac_save_cc"
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6408$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6409
6410 if test $ac_cv_disable_unused_result_warning = yes
6411 then
6412 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6413 fi
6414
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6416$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6417 ac_save_cc="$CC"
6418 CC="$CC -Werror=declaration-after-statement"
6419 save_CFLAGS="$CFLAGS"
6420 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6421 $as_echo_n "(cached) " >&6
6422else
6423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6424/* end confdefs.h. */
6425
6426
6427int
6428main ()
6429{
6430
6431 ;
6432 return 0;
6433}
6434
6435_ACEOF
6436if ac_fn_c_try_compile "$LINENO"; then :
6437
6438 ac_cv_declaration_after_statement_warning=yes
6439
6440else
6441
6442 ac_cv_declaration_after_statement_warning=no
6443
6444fi
6445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6446fi
6447
6448 CFLAGS="$save_CFLAGS"
6449 CC="$ac_save_cc"
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6451$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6452
6453 if test $ac_cv_declaration_after_statement_warning = yes
6454 then
6455 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6456 fi
6457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6459 # support. Without this, treatment of subnormals doesn't follow
6460 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006461 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006462 alpha*)
6463 BASECFLAGS="$BASECFLAGS -mieee"
6464 ;;
6465 esac
6466
6467 case $ac_sys_system in
6468 SCO_SV*)
6469 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6470 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006471
6472 # is there any other compiler on Darwin besides gcc?
6473 Darwin*)
6474 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6475 # used to be here, but non-Apple gcc doesn't accept them.
6476 if test "${CC}" = gcc
6477 then
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006479$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006480 case "${UNIVERSALSDK}" in
6481 */MacOSX10.4u.sdk)
6482 # Build using 10.4 SDK, force usage of gcc when the
6483 # compiler is gcc, otherwise the user will get very
6484 # confusing error messages when building on OSX 10.6
6485 CC=gcc-4.0
6486 CPP=cpp-4.0
6487 ;;
6488 esac
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006490$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006491 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492
Ned Deily87adb6e2013-10-18 21:09:56 -07006493 if test "${enable_universalsdk}"
6494 then
6495 case "$UNIVERSAL_ARCHS" in
6496 32-bit)
6497 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6498 LIPO_32BIT_FLAGS=""
6499 ARCH_RUN_32BIT=""
6500 ;;
6501 64-bit)
6502 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6503 LIPO_32BIT_FLAGS=""
6504 ARCH_RUN_32BIT="true"
6505 ;;
6506 all)
6507 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6508 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6509 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6510 ;;
6511 intel)
6512 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6513 LIPO_32BIT_FLAGS="-extract i386"
6514 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6515 ;;
6516 intel-32)
6517 UNIVERSAL_ARCH_FLAGS="-arch i386"
6518 LIPO_32BIT_FLAGS=""
6519 ARCH_RUN_32BIT=""
6520 ;;
6521 3-way)
6522 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6523 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6524 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6525 ;;
6526 *)
6527 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6528 ;;
6529 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530
Ned Deily87adb6e2013-10-18 21:09:56 -07006531 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6532 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6533 if test "${UNIVERSALSDK}" != "/"
6534 then
6535 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6536 fi
6537 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538
Ned Deily87adb6e2013-10-18 21:09:56 -07006539 # Calculate an appropriate deployment target for this build:
6540 # The deployment target value is used explicitly to enable certain
6541 # features are enabled (such as builtin libedit support for readline)
6542 # through the use of Apple's Availabiliy Macros and is used as a
6543 # component of the string returned by distutils.get_platform().
6544 #
6545 # Use the value from:
6546 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6547 # 2. the operating system version of the build machine if >= 10.6
6548 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6549 # below to pick either 10.3, 10.4, or 10.5 as the target.
6550 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
Ned Deily87adb6e2013-10-18 21:09:56 -07006552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6553$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006554 cur_target_major=`sw_vers -productVersion | \
6555 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6556 cur_target_minor=`sw_vers -productVersion | \
6557 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6558 cur_target="${cur_target_major}.${cur_target_minor}"
6559 if test ${cur_target_major} -eq 10 && \
6560 test ${cur_target_minor} -ge 3 && \
6561 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006562 then
Ned Deily36820b62014-06-25 13:44:22 -07006563 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006564 cur_target=10.3
6565 if test ${enable_universalsdk}
6566 then
6567 case "$UNIVERSAL_ARCHS" in
6568 all|3-way|intel|64-bit)
6569 # These configurations were first supported in 10.5
6570 cur_target='10.5'
6571 ;;
6572 esac
6573 else
6574 if test `/usr/bin/arch` = "i386"
6575 then
6576 # 10.4 was the first release to support Intel archs
6577 cur_target="10.4"
6578 fi
6579 fi
6580 fi
6581 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006582
Ned Deily87adb6e2013-10-18 21:09:56 -07006583 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6584 # environment with a value that is the same as what we'll use
6585 # in the Makefile to ensure that we'll get the same compiler
6586 # environment during configure and build time.
6587 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6588 export MACOSX_DEPLOYMENT_TARGET
6589 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6591$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006592
Ned Deily87adb6e2013-10-18 21:09:56 -07006593 # end of Darwin* tests
6594 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595 esac
6596 ;;
6597
6598*)
6599 case $ac_sys_system in
6600 OpenUNIX*|UnixWare*)
6601 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6602 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603 SCO_SV*)
6604 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6605 ;;
6606 esac
6607 ;;
6608esac
6609
6610if test "$Py_DEBUG" = 'true'; then
6611 :
6612else
6613 OPT="-DNDEBUG $OPT"
6614fi
6615
6616if test "$ac_arch_flags"
6617then
6618 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6619fi
6620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621# On some compilers, pthreads are available without further options
6622# (e.g. MacOS X). On some of these systems, the compiler will not
6623# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6624# So we have to see first whether pthreads are available without
6625# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6627$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006628if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630else
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632 ac_cv_pthread_is_default=no
6633else
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635/* end confdefs.h. */
6636
Stefan Krah7dba5942012-11-22 22:49:11 +01006637#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638#include <pthread.h>
6639
6640void* routine(void* p){return NULL;}
6641
6642int main(){
6643 pthread_t p;
6644 if(pthread_create(&p,NULL,routine,NULL)!=0)
6645 return 1;
6646 (void)pthread_detach(p);
6647 return 0;
6648}
6649
6650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006651if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006652
6653 ac_cv_pthread_is_default=yes
6654 ac_cv_kthread=no
6655 ac_cv_pthread=no
6656
6657else
Matthias Kloseb9621712010-04-24 17:59:49 +00006658 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006662fi
6663
6664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006665fi
6666
Matthias Kloseb9621712010-04-24 17:59:49 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6668$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006669
6670
6671if test $ac_cv_pthread_is_default = yes
6672then
6673 ac_cv_kpthread=no
6674else
6675# -Kpthread, if available, provides the right #defines
6676# and linker options to make pthread_create available
6677# Some compilers won't report that they do not support -Kpthread,
6678# so we need to run a program to see whether it really made the
6679# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6681$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006682if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006683 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006684else
6685 ac_save_cc="$CC"
6686CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006687if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688 ac_cv_kpthread=no
6689else
Matthias Kloseb9621712010-04-24 17:59:49 +00006690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691/* end confdefs.h. */
6692
Stefan Krah7dba5942012-11-22 22:49:11 +01006693#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694#include <pthread.h>
6695
6696void* routine(void* p){return NULL;}
6697
6698int main(){
6699 pthread_t p;
6700 if(pthread_create(&p,NULL,routine,NULL)!=0)
6701 return 1;
6702 (void)pthread_detach(p);
6703 return 0;
6704}
6705
6706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006707if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708 ac_cv_kpthread=yes
6709else
Matthias Kloseb9621712010-04-24 17:59:49 +00006710 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006712rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6713 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714fi
6715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716CC="$ac_save_cc"
6717fi
6718
Matthias Kloseb9621712010-04-24 17:59:49 +00006719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6720$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721fi
6722
6723if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6724then
6725# -Kthread, if available, provides the right #defines
6726# and linker options to make pthread_create available
6727# Some compilers won't report that they do not support -Kthread,
6728# so we need to run a program to see whether it really made the
6729# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6731$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006732if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734else
6735 ac_save_cc="$CC"
6736CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006737if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ac_cv_kthread=no
6739else
Matthias Kloseb9621712010-04-24 17:59:49 +00006740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741/* end confdefs.h. */
6742
Stefan Krah7dba5942012-11-22 22:49:11 +01006743#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744#include <pthread.h>
6745
6746void* routine(void* p){return NULL;}
6747
6748int main(){
6749 pthread_t p;
6750 if(pthread_create(&p,NULL,routine,NULL)!=0)
6751 return 1;
6752 (void)pthread_detach(p);
6753 return 0;
6754}
6755
6756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006757if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758 ac_cv_kthread=yes
6759else
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764fi
6765
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766CC="$ac_save_cc"
6767fi
6768
Matthias Kloseb9621712010-04-24 17:59:49 +00006769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6770$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771fi
6772
6773if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6774then
6775# -pthread, if available, provides the right #defines
6776# and linker options to make pthread_create available
6777# Some compilers won't report that they do not support -pthread,
6778# so we need to run a program to see whether it really made the
6779# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6781$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006782if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784else
6785 ac_save_cc="$CC"
6786CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006787if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788 ac_cv_pthread=no
6789else
Matthias Kloseb9621712010-04-24 17:59:49 +00006790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791/* end confdefs.h. */
6792
Stefan Krah7dba5942012-11-22 22:49:11 +01006793#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794#include <pthread.h>
6795
6796void* routine(void* p){return NULL;}
6797
6798int main(){
6799 pthread_t p;
6800 if(pthread_create(&p,NULL,routine,NULL)!=0)
6801 return 1;
6802 (void)pthread_detach(p);
6803 return 0;
6804}
6805
6806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006807if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808 ac_cv_pthread=yes
6809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814fi
6815
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816CC="$ac_save_cc"
6817fi
6818
Matthias Kloseb9621712010-04-24 17:59:49 +00006819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6820$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821fi
6822
6823# If we have set a CC compiler flag for thread support then
6824# check if it works for CXX, too.
6825ac_cv_cxx_thread=no
6826if test ! -z "$CXX"
6827then
Matthias Kloseb9621712010-04-24 17:59:49 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6829$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830ac_save_cxx="$CXX"
6831
6832if test "$ac_cv_kpthread" = "yes"
6833then
6834 CXX="$CXX -Kpthread"
6835 ac_cv_cxx_thread=yes
6836elif test "$ac_cv_kthread" = "yes"
6837then
6838 CXX="$CXX -Kthread"
6839 ac_cv_cxx_thread=yes
6840elif test "$ac_cv_pthread" = "yes"
6841then
6842 CXX="$CXX -pthread"
6843 ac_cv_cxx_thread=yes
6844fi
6845
6846if test $ac_cv_cxx_thread = yes
6847then
6848 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6849 $CXX -c conftest.$ac_ext 2>&5
6850 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6851 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6852 then
6853 ac_cv_cxx_thread=yes
6854 else
6855 ac_cv_cxx_thread=no
6856 fi
6857 rm -fr conftest*
6858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6860$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861fi
6862CXX="$ac_save_cxx"
6863
6864
6865# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6867$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006868if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872/* end confdefs.h. */
6873#include <stdlib.h>
6874#include <stdarg.h>
6875#include <string.h>
6876#include <float.h>
6877
6878int
6879main ()
6880{
6881
6882 ;
6883 return 0;
6884}
6885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006886if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 ac_cv_header_stdc=yes
6888else
Matthias Kloseb9621712010-04-24 17:59:49 +00006889 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006890fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6892
6893if test $ac_cv_header_stdc = yes; then
6894 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896/* end confdefs.h. */
6897#include <string.h>
6898
6899_ACEOF
6900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 $EGREP "memchr" >/dev/null 2>&1; then :
6902
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006903else
6904 ac_cv_header_stdc=no
6905fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006906rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907
6908fi
6909
6910if test $ac_cv_header_stdc = yes; then
6911 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913/* end confdefs.h. */
6914#include <stdlib.h>
6915
6916_ACEOF
6917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 $EGREP "free" >/dev/null 2>&1; then :
6919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006920else
6921 ac_cv_header_stdc=no
6922fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006923rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924
6925fi
6926
6927if test $ac_cv_header_stdc = yes; then
6928 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930 :
6931else
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933/* end confdefs.h. */
6934#include <ctype.h>
6935#include <stdlib.h>
6936#if ((' ' & 0x0FF) == 0x020)
6937# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6938# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6939#else
6940# define ISLOWER(c) \
6941 (('a' <= (c) && (c) <= 'i') \
6942 || ('j' <= (c) && (c) <= 'r') \
6943 || ('s' <= (c) && (c) <= 'z'))
6944# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6945#endif
6946
6947#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6948int
6949main ()
6950{
6951 int i;
6952 for (i = 0; i < 256; i++)
6953 if (XOR (islower (i), ISLOWER (i))
6954 || toupper (i) != TOUPPER (i))
6955 return 2;
6956 return 0;
6957}
6958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006959if ac_fn_c_try_run "$LINENO"; then :
6960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006961else
Matthias Kloseb9621712010-04-24 17:59:49 +00006962 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966fi
6967
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968fi
6969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6971$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006972if test $ac_cv_header_stdc = yes; then
6973
Matthias Kloseb9621712010-04-24 17:59:49 +00006974$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975
6976fi
6977
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006978for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006979fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006980ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006981sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006982unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006983poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006984sys/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 +01006985sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006986sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006987sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006988sys/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 -07006989libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006990bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6991sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006992do :
6993 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6994ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006995if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006997#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006998_ACEOF
6999
7000fi
7001
Guido van Rossum627b2d71993-12-24 10:39:16 +00007002done
7003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007005for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007006 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7008$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007009if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007011else
Matthias Kloseb9621712010-04-24 17:59:49 +00007012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007013/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007014#include <sys/types.h>
7015#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007016
Martin v. Löwis11437992002-04-12 09:54:03 +00007017int
7018main ()
7019{
7020if ((DIR *) 0)
7021return 0;
7022 ;
7023 return 0;
7024}
7025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007026if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007027 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007028else
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007033eval ac_res=\$$as_ac_Header
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7035$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007036if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007037 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007038#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007039_ACEOF
7040
7041ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007044done
7045# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7046if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7048$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007049if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007050 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007051else
Martin v. Löwis11437992002-04-12 09:54:03 +00007052 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007056/* Override any GCC internal prototype to avoid an error.
7057 Use char because int might match the return type of a GCC
7058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007059#ifdef __cplusplus
7060extern "C"
7061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007062char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007063int
7064main ()
7065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 ;
7068 return 0;
7069}
7070_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071for ac_lib in '' dir; do
7072 if test -z "$ac_lib"; then
7073 ac_res="none required"
7074 else
7075 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007076 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007081rm -f core conftest.err conftest.$ac_objext \
7082 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007083 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086done
Victor Stinnere0be4232011-10-25 13:06:09 +02007087if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007088
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089else
7090 ac_cv_search_opendir=no
7091fi
7092rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007093LIBS=$ac_func_search_save_LIBS
7094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7096$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007098if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007101fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007102
Michael W. Hudson54241132001-12-07 15:38:26 +00007103else
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7105$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007106if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007108else
7109 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007112
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007113/* Override any GCC internal prototype to avoid an error.
7114 Use char because int might match the return type of a GCC
7115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116#ifdef __cplusplus
7117extern "C"
7118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007119char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007120int
7121main ()
7122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007124 ;
7125 return 0;
7126}
7127_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128for ac_lib in '' x; do
7129 if test -z "$ac_lib"; then
7130 ac_res="none required"
7131 else
7132 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007133 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007134 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007135 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007136 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007138rm -f core conftest.err conftest.$ac_objext \
7139 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007140 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007143done
Victor Stinnere0be4232011-10-25 13:06:09 +02007144if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146else
7147 ac_cv_search_opendir=no
7148fi
7149rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007150LIBS=$ac_func_search_save_LIBS
7151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7153$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007155if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007156 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158fi
7159
7160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007161
Matthias Kloseb9621712010-04-24 17:59:49 +00007162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7163$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007164if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007165 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007168/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007169#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007170int
7171main ()
7172{
7173return makedev(0, 0);
7174 ;
7175 return 0;
7176}
7177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007178if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007179 ac_cv_header_sys_types_h_makedev=yes
7180else
Matthias Kloseb9621712010-04-24 17:59:49 +00007181 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007183rm -f core conftest.err conftest.$ac_objext \
7184 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007185
7186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7188$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007189
7190if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007191ac_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 +02007192if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007193
Matthias Kloseb9621712010-04-24 17:59:49 +00007194$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007195
7196fi
7197
7198
7199
7200 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007201 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 +02007202if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007203
Matthias Kloseb9621712010-04-24 17:59:49 +00007204$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007205
7206fi
7207
7208
7209 fi
7210fi
7211
Michael W. Hudson54241132001-12-07 15:38:26 +00007212
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007213# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7214for ac_header in net/if.h
7215do :
7216 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7217#ifdef STDC_HEADERS
7218# include <stdlib.h>
7219# include <stddef.h>
7220#else
7221# ifdef HAVE_STDLIB_H
7222# include <stdlib.h>
7223# endif
7224#endif
7225#ifdef HAVE_SYS_SOCKET_H
7226# include <sys/socket.h>
7227#endif
7228
7229"
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007231 cat >>confdefs.h <<_ACEOF
7232#define HAVE_NET_IF_H 1
7233_ACEOF
7234
7235fi
7236
7237done
7238
7239
Martin v. Löwis11017b12006-01-14 18:12:57 +00007240# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007241for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007242do :
7243 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 +00007244#ifdef HAVE_ASM_TYPES_H
7245#include <asm/types.h>
7246#endif
7247#ifdef HAVE_SYS_SOCKET_H
7248#include <sys/socket.h>
7249#endif
7250
Matthias Kloseb9621712010-04-24 17:59:49 +00007251"
Victor Stinnere0be4232011-10-25 13:06:09 +02007252if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007253 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007254#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007255_ACEOF
7256
7257fi
7258
7259done
7260
7261
Charles-François Natali47413c12011-10-06 19:47:44 +02007262# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007263for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007264do :
7265 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7266ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7267#ifdef HAVE_SYS_SOCKET_H
7268#include <sys/socket.h>
7269#endif
7270
7271"
7272if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7273 cat >>confdefs.h <<_ACEOF
7274#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7275_ACEOF
7276
7277fi
7278
7279done
7280
7281
Guido van Rossum627b2d71993-12-24 10:39:16 +00007282# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007283was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7285$as_echo_n "checking for clock_t in time.h... " >&6; }
7286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007287/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007288#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007289
7290_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007291if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007293 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007294else
Martin v. Löwis11437992002-04-12 09:54:03 +00007295
7296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007298
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007299
Guido van Rossum627b2d71993-12-24 10:39:16 +00007300fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007301rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007302
Matthias Kloseb9621712010-04-24 17:59:49 +00007303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7304$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007305
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7307$as_echo_n "checking for makedev... " >&6; }
7308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007309/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007310
Jesus Cea740f53a2010-04-28 11:35:30 +00007311#if defined(MAJOR_IN_MKDEV)
7312#include <sys/mkdev.h>
7313#elif defined(MAJOR_IN_SYSMACROS)
7314#include <sys/sysmacros.h>
7315#else
7316#include <sys/types.h>
7317#endif
7318
Neal Norwitz11690112002-07-30 01:08:28 +00007319int
7320main ()
7321{
Jesus Cea740f53a2010-04-28 11:35:30 +00007322
7323 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007324 ;
7325 return 0;
7326}
Matthias Kloseb159a552010-04-25 21:00:44 +00007327
Neal Norwitz11690112002-07-30 01:08:28 +00007328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007330 ac_cv_has_makedev=yes
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007334rm -f core conftest.err conftest.$ac_objext \
7335 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7337$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007338if test "$ac_cv_has_makedev" = "yes"; then
7339
Matthias Kloseb9621712010-04-24 17:59:49 +00007340$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007341
7342fi
7343
Christian Heimes985ecdc2013-11-20 11:46:18 +01007344# byte swapping
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7346$as_echo_n "checking for le64toh... " >&6; }
7347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7348/* end confdefs.h. */
7349
7350#ifdef HAVE_ENDIAN_H
7351#include <endian.h>
7352#elif defined(HAVE_SYS_ENDIAN_H)
7353#include <sys/endian.h>
7354#endif
7355
7356int
7357main ()
7358{
7359
7360 le64toh(1)
7361 ;
7362 return 0;
7363}
7364
7365_ACEOF
7366if ac_fn_c_try_link "$LINENO"; then :
7367 ac_cv_has_le64toh=yes
7368else
7369 ac_cv_has_le64toh=no
7370fi
7371rm -f core conftest.err conftest.$ac_objext \
7372 conftest$ac_exeext conftest.$ac_ext
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7374$as_echo "$ac_cv_has_le64toh" >&6; }
7375if test "$ac_cv_has_le64toh" = "yes"; then
7376
7377$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7378
7379fi
7380
Martin v. Löwis399a6892002-10-04 10:22:02 +00007381# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7382# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7383# defined, but the compiler does not support pragma redefine_extname,
7384# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7385# structures (such as rlimit64) without declaring them. As a
7386# work-around, disable LFS on such configurations
7387
7388use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7390$as_echo_n "checking Solaris LFS bug... " >&6; }
7391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007392/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007393
7394#define _LARGEFILE_SOURCE 1
7395#define _FILE_OFFSET_BITS 64
7396#include <sys/resource.h>
7397
Martin v. Löwis399a6892002-10-04 10:22:02 +00007398int
7399main ()
7400{
7401struct rlimit foo;
7402 ;
7403 return 0;
7404}
7405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007407 sol_lfs_bug=no
7408else
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7413$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007414if test "$sol_lfs_bug" = "yes"; then
7415 use_lfs=no
7416fi
7417
7418if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007419# Two defines needed to enable largefile support on various platforms
7420# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007421case $ac_sys_system/$ac_sys_release in
7422AIX*)
7423
7424$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7425
7426 ;;
7427esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007428
Matthias Kloseb9621712010-04-24 17:59:49 +00007429$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
7431
Matthias Kloseb9621712010-04-24 17:59:49 +00007432$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007433
Martin v. Löwis399a6892002-10-04 10:22:02 +00007434fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007435
Guido van Rossum84e7b241996-08-19 21:59:00 +00007436# Add some code to confdefs.h so that the test for off_t works on SCO
7437cat >> confdefs.h <<\EOF
7438#if defined(SCO_DS)
7439#undef _OFF_T
7440#endif
7441EOF
7442
Guido van Rossumef2255b2000-03-10 22:30:29 +00007443# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007444ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007445if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007447else
Martin v. Löwis11437992002-04-12 09:54:03 +00007448
7449cat >>confdefs.h <<_ACEOF
7450#define mode_t int
7451_ACEOF
7452
7453fi
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007456if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007458else
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
7460cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007461#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007462_ACEOF
7463
7464fi
7465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007467if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007469else
Martin v. Löwis11437992002-04-12 09:54:03 +00007470
7471cat >>confdefs.h <<_ACEOF
7472#define pid_t int
7473_ACEOF
7474
7475fi
7476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007477
Martin v. Löwis11437992002-04-12 09:54:03 +00007478cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007479#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007481
Matthias Kloseb9621712010-04-24 17:59:49 +00007482ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007483if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007485else
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
7487cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007488#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007489_ACEOF
7490
7491fi
7492
Matthias Kloseb9621712010-04-24 17:59:49 +00007493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7494$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007495if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
7502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505 ac_cv_type_uid_t=yes
7506else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507 ac_cv_type_uid_t=no
7508fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007509rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7513$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007514if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515
Matthias Kloseb9621712010-04-24 17:59:49 +00007516$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
7518
Matthias Kloseb9621712010-04-24 17:59:49 +00007519$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520
7521fi
7522
Mark Dickinson983bc162012-12-02 12:11:38 +00007523
7524# There are two separate checks for each of the exact-width integer types we
7525# need. First we check whether the type is available using the usual
7526# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7527# and <stdint.h> where available). We then also use the special type checks of
7528# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7529# directly, #define's uint32_t to be a suitable type.
7530
7531ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7532if test "x$ac_cv_type_uint32_t" = xyes; then :
7533
7534$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7535
7536fi
7537
Matthias Kloseb9621712010-04-24 17:59:49 +00007538ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7539case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007540 no|yes) ;; #(
7541 *)
7542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007544
7545
7546cat >>confdefs.h <<_ACEOF
7547#define uint32_t $ac_cv_c_uint32_t
7548_ACEOF
7549;;
7550 esac
7551
Mark Dickinson983bc162012-12-02 12:11:38 +00007552
7553ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7554if test "x$ac_cv_type_uint64_t" = xyes; then :
7555
7556$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7557
7558fi
7559
Matthias Kloseb9621712010-04-24 17:59:49 +00007560ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7561case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007562 no|yes) ;; #(
7563 *)
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007566
7567
7568cat >>confdefs.h <<_ACEOF
7569#define uint64_t $ac_cv_c_uint64_t
7570_ACEOF
7571;;
7572 esac
7573
Mark Dickinson983bc162012-12-02 12:11:38 +00007574
7575ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7576if test "x$ac_cv_type_int32_t" = xyes; then :
7577
7578$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7579
7580fi
7581
Matthias Kloseb9621712010-04-24 17:59:49 +00007582ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7583case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007584 no|yes) ;; #(
7585 *)
7586
7587cat >>confdefs.h <<_ACEOF
7588#define int32_t $ac_cv_c_int32_t
7589_ACEOF
7590;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007591esac
7592
Mark Dickinson983bc162012-12-02 12:11:38 +00007593
7594ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7595if test "x$ac_cv_type_int64_t" = xyes; then :
7596
7597$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7598
7599fi
7600
Matthias Kloseb9621712010-04-24 17:59:49 +00007601ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7602case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007603 no|yes) ;; #(
7604 *)
7605
7606cat >>confdefs.h <<_ACEOF
7607#define int64_t $ac_cv_c_int64_t
7608_ACEOF
7609;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007610esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007611
Mark Dickinson983bc162012-12-02 12:11:38 +00007612
Matthias Kloseb9621712010-04-24 17:59:49 +00007613ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007614if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615
Matthias Kloseb9621712010-04-24 17:59:49 +00007616$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007617
7618fi
7619
Stefan Krah1919b7e2012-03-21 18:25:23 +01007620ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7621if test "x$ac_cv_type___uint128_t" = xyes; then :
7622
7623$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7624
7625fi
7626
Jack Jansendd19cf82001-12-06 22:36:17 +00007627
Michael W. Hudson54241132001-12-07 15:38:26 +00007628# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007629# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630# The cast to long int works around a bug in the HP C Compiler
7631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7633# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7635$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007636if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007638else
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 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 +00007640
Martin v. Löwis11437992002-04-12 09:54:03 +00007641else
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 if test "$ac_cv_type_int" = yes; then
7643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007645as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007646See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007647 else
7648 ac_cv_sizeof_int=0
7649 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7654$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655
7656
7657
Martin v. Löwis11437992002-04-12 09:54:03 +00007658cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007659#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007660_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007661
7662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663# The cast to long int works around a bug in the HP C Compiler
7664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7666# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7668$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007669if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007671else
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 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 +00007673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674else
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 if test "$ac_cv_type_long" = yes; then
7676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007678as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007679See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 else
7681 ac_cv_sizeof_long=0
7682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7687$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688
7689
7690
Martin v. Löwis11437992002-04-12 09:54:03 +00007691cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007692#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007693_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007694
7695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007696# The cast to long int works around a bug in the HP C Compiler
7697# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7698# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7699# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7701$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007702if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007704else
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 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 +00007706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 if test "$ac_cv_type_void_p" = yes; then
7709 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7710$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007711as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007712See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713 else
7714 ac_cv_sizeof_void_p=0
7715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7720$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721
7722
7723
Martin v. Löwis11437992002-04-12 09:54:03 +00007724cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007725#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007726_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007727
7728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729# The cast to long int works around a bug in the HP C Compiler
7730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7734$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007735if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 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 +00007739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740else
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 if test "$ac_cv_type_short" = yes; then
7742 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7743$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007744as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007745See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007746 else
7747 ac_cv_sizeof_short=0
7748 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7753$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007754
7755
7756
Martin v. Löwis11437992002-04-12 09:54:03 +00007757cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007758#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007759_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007760
7761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007762# The cast to long int works around a bug in the HP C Compiler
7763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7765# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7767$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007768if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007770else
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 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 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 if test "$ac_cv_type_float" = yes; then
7775 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7776$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007777as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007778See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007779 else
7780 ac_cv_sizeof_float=0
7781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7786$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007787
7788
7789
Martin v. Löwis11437992002-04-12 09:54:03 +00007790cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007791#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007792_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007793
7794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007795# The cast to long int works around a bug in the HP C Compiler
7796# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7797# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7798# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7800$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007801if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007803else
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 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 +00007805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 if test "$ac_cv_type_double" = yes; then
7808 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007810as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007811See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812 else
7813 ac_cv_sizeof_double=0
7814 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7819$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007820
7821
7822
Martin v. Löwis11437992002-04-12 09:54:03 +00007823cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007824#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007825_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007826
7827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007828# The cast to long int works around a bug in the HP C Compiler
7829# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7830# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7831# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7833$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007834if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007836else
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 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 +00007838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839else
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 if test "$ac_cv_type_fpos_t" = yes; then
7841 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7842$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007843as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007844See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 else
7846 ac_cv_sizeof_fpos_t=0
7847 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7852$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007853
7854
7855
Martin v. Löwis11437992002-04-12 09:54:03 +00007856cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007857#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007858_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007859
Michael W. Hudson54241132001-12-07 15:38:26 +00007860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007861# The cast to long int works around a bug in the HP C Compiler
7862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7864# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7866$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007867if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007868 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007869else
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 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 +00007871
Martin v. Löwis18e16552006-02-15 17:27:45 +00007872else
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 if test "$ac_cv_type_size_t" = yes; then
7874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007876as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007877See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878 else
7879 ac_cv_sizeof_size_t=0
7880 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007882
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7885$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886
7887
7888
Martin v. Löwis18e16552006-02-15 17:27:45 +00007889cat >>confdefs.h <<_ACEOF
7890#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7891_ACEOF
7892
7893
Christian Heimes400adb02008-02-01 08:12:03 +00007894# The cast to long int works around a bug in the HP C Compiler
7895# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7896# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7897# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7899$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007900if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 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 +00007904
Christian Heimes400adb02008-02-01 08:12:03 +00007905else
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 if test "$ac_cv_type_pid_t" = yes; then
7907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007909as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007910See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007911 else
7912 ac_cv_sizeof_pid_t=0
7913 fi
7914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007915
Christian Heimes400adb02008-02-01 08:12:03 +00007916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7918$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007919
7920
7921
7922cat >>confdefs.h <<_ACEOF
7923#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7924_ACEOF
7925
7926
Michael W. Hudson54241132001-12-07 15:38:26 +00007927
Matthias Kloseb9621712010-04-24 17:59:49 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7929$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007930have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007933
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007937long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ;
7939 return 0;
7940}
7941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007943
7944
Matthias Kloseb9621712010-04-24 17:59:49 +00007945$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007946
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007947 have_long_long=yes
7948
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7952$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007953if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954# The cast to long int works around a bug in the HP C Compiler
7955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7957# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7959$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007960if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007961 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007962else
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 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 +00007964
Martin v. Löwis11437992002-04-12 09:54:03 +00007965else
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 if test "$ac_cv_type_long_long" = yes; then
7967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007969as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007970See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 else
7972 ac_cv_sizeof_long_long=0
7973 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7978$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979
7980
7981
Martin v. Löwis11437992002-04-12 09:54:03 +00007982cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007983#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007984_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007985
Michael W. Hudson54241132001-12-07 15:38:26 +00007986
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987fi
7988
Matthias Kloseb9621712010-04-24 17:59:49 +00007989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7990$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007991have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007993/* end confdefs.h. */
7994
7995int
7996main ()
7997{
7998long double x; x = (long double)0;
7999 ;
8000 return 0;
8001}
8002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008003if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008004
8005
Matthias Kloseb9621712010-04-24 17:59:49 +00008006$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008007
8008 have_long_double=yes
8009
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008010fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8013$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008014if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008015# The cast to long int works around a bug in the HP C Compiler
8016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8020$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008021if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 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 +00008025
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008026else
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 if test "$ac_cv_type_long_double" = yes; then
8028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008030as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008031See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008032 else
8033 ac_cv_sizeof_long_double=0
8034 fi
8035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008036
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8039$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008040
8041
8042
8043cat >>confdefs.h <<_ACEOF
8044#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8045_ACEOF
8046
8047
8048fi
8049
8050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8052$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008053have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008055/* end confdefs.h. */
8056
8057int
8058main ()
8059{
8060_Bool x; x = (_Bool)0;
8061 ;
8062 return 0;
8063}
8064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008065if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008066
8067
Matthias Kloseb9621712010-04-24 17:59:49 +00008068$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008069
8070 have_c99_bool=yes
8071
Thomas Woutersb2137042007-02-01 18:02:27 +00008072fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8075$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008076if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077# The cast to long int works around a bug in the HP C Compiler
8078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8082$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 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 +00008087
Thomas Woutersb2137042007-02-01 18:02:27 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 if test "$ac_cv_type__Bool" = yes; then
8090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008092as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008093See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 else
8095 ac_cv_sizeof__Bool=0
8096 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098
Thomas Woutersb2137042007-02-01 18:02:27 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8101$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102
8103
8104
Thomas Woutersb2137042007-02-01 18:02:27 +00008105cat >>confdefs.h <<_ACEOF
8106#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8107_ACEOF
8108
8109
8110fi
8111
Matthias Kloseb9621712010-04-24 17:59:49 +00008112ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008113 #include <stdint.h>
8114 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008115 #ifdef HAVE_INTTYPES_H
8116 #include <inttypes.h>
8117 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008118"
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008120
8121cat >>confdefs.h <<_ACEOF
8122#define HAVE_UINTPTR_T 1
8123_ACEOF
8124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125# The cast to long int works around a bug in the HP C Compiler
8126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8128# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8130$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008131if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008133else
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 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 +00008135
Martin v. Löwis11437992002-04-12 09:54:03 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 if test "$ac_cv_type_uintptr_t" = yes; then
8138 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8139$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008140as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008141See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008142 else
8143 ac_cv_sizeof_uintptr_t=0
8144 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008146
Martin v. Löwis11437992002-04-12 09:54:03 +00008147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8149$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150
8151
8152
Martin v. Löwis11437992002-04-12 09:54:03 +00008153cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008154#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008155_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008156
Michael W. Hudson54241132001-12-07 15:38:26 +00008157
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008158fi
8159
Thomas Wouters89f507f2006-12-13 04:49:30 +00008160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008161# The cast to long int works around a bug in the HP C Compiler
8162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8166$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008171#ifdef HAVE_SYS_TYPES_H
8172#include <sys/types.h>
8173#endif
8174
Matthias Kloseb9621712010-04-24 17:59:49 +00008175"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008177else
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 if test "$ac_cv_type_off_t" = yes; then
8179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008181as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008182See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008183 else
8184 ac_cv_sizeof_off_t=0
8185 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008186fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008187
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8190$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192
8193
Martin v. Löwis11437992002-04-12 09:54:03 +00008194cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008195#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008196_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008197
Michael W. Hudson54241132001-12-07 15:38:26 +00008198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008199
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8201$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008202if test "$have_long_long" = yes
8203then
8204if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008205 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008206
Matthias Kloseb9621712010-04-24 17:59:49 +00008207$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8210$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211else
Matthias Kloseb9621712010-04-24 17:59:49 +00008212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8213$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008214fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008218fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008219
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220# The cast to long int works around a bug in the HP C Compiler
8221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8223# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8225$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008226if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008228else
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230#ifdef HAVE_SYS_TYPES_H
8231#include <sys/types.h>
8232#endif
8233#ifdef HAVE_TIME_H
8234#include <time.h>
8235#endif
8236
Matthias Kloseb9621712010-04-24 17:59:49 +00008237"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008239else
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if test "$ac_cv_type_time_t" = yes; then
8241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008243as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008244See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008245 else
8246 ac_cv_sizeof_time_t=0
8247 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8252$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008253
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008257#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008259
Michael W. Hudson54241132001-12-07 15:38:26 +00008260
8261
Trent Mick635f6fb2000-08-23 21:33:05 +00008262# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008263ac_save_cc="$CC"
8264if test "$ac_cv_kpthread" = "yes"
8265then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008266elif test "$ac_cv_kthread" = "yes"
8267then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008268elif test "$ac_cv_pthread" = "yes"
8269then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008270fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8273$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008274have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008276/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008277
8278 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008279int
8280main ()
8281{
Guido van Rossum12580492000-09-24 16:47:19 +00008282pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008283 ;
8284 return 0;
8285}
Matthias Kloseb159a552010-04-25 21:00:44 +00008286
Martin v. Löwis11437992002-04-12 09:54:03 +00008287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008288if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008289 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8293$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008294if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008295 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8298# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8300$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008301if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008305#ifdef HAVE_PTHREAD_H
8306#include <pthread.h>
8307#endif
8308
Matthias Kloseb9621712010-04-24 17:59:49 +00008309"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008310
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 if test "$ac_cv_type_pthread_t" = yes; then
8313 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008315as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008316See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008317 else
8318 ac_cv_sizeof_pthread_t=0
8319 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321
Trent Mick635f6fb2000-08-23 21:33:05 +00008322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8324$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008325
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326
8327
Martin v. Löwis11437992002-04-12 09:54:03 +00008328cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008329#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008330_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008331
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008332
Trent Mick635f6fb2000-08-23 21:33:05 +00008333fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008334CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008335
Michael W. Hudson54241132001-12-07 15:38:26 +00008336
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008337case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008338 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008339 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8340 ;;
8341 Darwin/*)
8342 OTHER_LIBTOOL_OPT=""
8343 ;;
8344esac
8345
8346
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008347
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008348case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008349 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008350 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8351 if test "${enable_universalsdk}"; then
8352 :
8353 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008354 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008355 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008358 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008359 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008360 if test ${gcc_version} '<' 4.0
8361 then
8362 LIBTOOL_CRUFT="-lcc_dynamic"
8363 else
8364 LIBTOOL_CRUFT=""
8365 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008367 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008371
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008372 #include <unistd.h>
8373 int main(int argc, char*argv[])
8374 {
8375 if (sizeof(long) == 4) {
8376 return 0;
8377 } else {
8378 return 1;
8379 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008380 }
8381
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008383if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008384 ac_osx_32bit=yes
8385else
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008390fi
8391
8392
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008393 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008394 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008395 i386)
8396 MACOSX_DEFAULT_ARCH="i386"
8397 ;;
8398 ppc)
8399 MACOSX_DEFAULT_ARCH="ppc"
8400 ;;
8401 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008402 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008403 ;;
8404 esac
8405 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008406 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008407 i386)
8408 MACOSX_DEFAULT_ARCH="x86_64"
8409 ;;
8410 ppc)
8411 MACOSX_DEFAULT_ARCH="ppc64"
8412 ;;
8413 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008414 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008415 ;;
8416 esac
8417
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 fi
8419
8420 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008421 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008423esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8425$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008426if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008427then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008428 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008430 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008431
Matthias Kloseb9621712010-04-24 17:59:49 +00008432$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8435$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008436 if test $enable_shared = "yes"
8437 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008438 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 +00008439 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008440else
Matthias Kloseb9621712010-04-24 17:59:49 +00008441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8442$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008443fi
8444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8446$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008447case $ac_sys_system/$ac_sys_release in
8448 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8453$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008454 ;;
8455 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008458 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008459esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008460
Guido van Rossum0a516c91994-09-12 10:58:40 +00008461# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008462
Michael W. Hudson54241132001-12-07 15:38:26 +00008463
8464
8465
8466
Benjamin Peterson99f03762010-04-11 22:15:28 +00008467
Thomas Wouters477c8d52006-05-27 19:21:47 +00008468
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008469# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8470# -- usually .so, .sl on HP-UX, .dll on Cygwin
8471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8472$as_echo_n "checking the extension of shared libraries... " >&6; }
8473if test -z "$SHLIB_SUFFIX"; then
8474 case $ac_sys_system in
8475 hp*|HP*)
8476 case `uname -m` in
8477 ia64) SHLIB_SUFFIX=.so;;
8478 *) SHLIB_SUFFIX=.sl;;
8479 esac
8480 ;;
8481 CYGWIN*) SHLIB_SUFFIX=.dll;;
8482 *) SHLIB_SUFFIX=.so;;
8483 esac
8484fi
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8486$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008487
Guido van Rossum0a516c91994-09-12 10:58:40 +00008488# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008489# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008490# (Shared libraries in this instance are shared modules to be loaded into
8491# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8493$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008494if test -z "$LDSHARED"
8495then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008496 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008497 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008498 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008499 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008500 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008501 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008502 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008504 if test "$GCC" = "yes" ; then
8505 LDSHARED='$(CC) -shared'
8506 LDCXXSHARED='$(CXX) -shared'
8507 else
8508 LDSHARED='$(CC) -G'
8509 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008510 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008511 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008512 if test "$GCC" = "yes" ; then
8513 LDSHARED='$(CC) -shared'
8514 LDCXXSHARED='$(CXX) -shared'
8515 else
8516 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008517 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008518 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008519 LDSHARED='$(CC) -bundle'
8520 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008521 if test "$enable_framework" ; then
8522 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008523 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8524 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008525 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008526 else
8527 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008528 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008529 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008530 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008531 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008532 LDSHARED='$(CC) -bundle'
8533 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008534 if test "$enable_framework" ; then
8535 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008536 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8537 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008538 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008539 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008540 # No framework, use the Python app as bundle-loader
8541 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008542 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008543 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008544 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008545 Darwin/*)
8546 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8547 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008548
Ned Deily36820b62014-06-25 13:44:22 -07008549 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8550 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8551 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8552 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8553 if test ${dep_target_major} -eq 10 && \
8554 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008555 then
Ned Deily36820b62014-06-25 13:44:22 -07008556 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008557 LDSHARED='$(CC) -bundle'
8558 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008559 if test "$enable_framework" ; then
8560 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008561 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8562 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008563 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008564 else
8565 # No framework, use the Python app as bundle-loader
8566 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8567 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008568 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008569 fi
Ned Deily36820b62014-06-25 13:44:22 -07008570 else
8571 # building for OS X 10.3 and later
8572 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8573 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8574 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008575 fi
8576 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008577 Linux*|GNU*|QNX*)
8578 LDSHARED='$(CC) -shared'
8579 LDCXXSHARED='$(CXX) -shared';;
8580 BSD/OS*/4*)
8581 LDSHARED="gcc -shared"
8582 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008583 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008584 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008585 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008586 LDSHARED='$(CC) -shared'
8587 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008588 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008589 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008590 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008591 OpenBSD*)
8592 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8593 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008594 LDSHARED='$(CC) -shared $(CCSHARED)'
8595 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008596 else
8597 case `uname -r` in
8598 [01].* | 2.[0-7] | 2.[0-7].*)
8599 LDSHARED="ld -Bshareable ${LDFLAGS}"
8600 ;;
8601 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008602 LDSHARED='$(CC) -shared $(CCSHARED)'
8603 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008604 ;;
8605 esac
8606 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008607 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008608 LDSHARED='$(CC) -shared'
8609 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008610 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008611 if test "$GCC" = "yes" ; then
8612 LDSHARED='$(CC) -shared'
8613 LDCXXSHARED='$(CXX) -shared'
8614 else
8615 LDSHARED='$(CC) -G'
8616 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008617 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008618 SCO_SV*)
8619 LDSHARED='$(CC) -Wl,-G,-Bexport'
8620 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8621 CYGWIN*)
8622 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8623 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008624 *) LDSHARED="ld";;
8625 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8628$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008629LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008630BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008631# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008632# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8634$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008635if test -z "$CCSHARED"
8636then
Guido van Rossum07397971997-04-29 21:49:50 +00008637 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008638 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008639 then CCSHARED="-fPIC";
8640 elif test `uname -p` = sparc;
8641 then CCSHARED="-xcode=pic32";
8642 else CCSHARED="-Kpic";
8643 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008644 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008645 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008646 else CCSHARED="+z";
8647 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008648 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008649 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008650 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008651 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008652 if test "$GCC" = "yes"
8653 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008654 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008655 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008656 SCO_SV*)
8657 if test "$GCC" = "yes"
8658 then CCSHARED="-fPIC"
8659 else CCSHARED="-Kpic -belf"
8660 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008661 IRIX*/6*) case $CC in
8662 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008663 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008664 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008665 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8668$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008669# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008670# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8672$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008673if test -z "$LINKFORSHARED"
8674then
Guido van Rossum07397971997-04-29 21:49:50 +00008675 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008676 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008677 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008678 LINKFORSHARED="-Wl,-E -Wl,+s";;
8679# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008680 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008681 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008682 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008684 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008685
8686 # Issue #18075: the default maximum stack size (8MBytes) is too
8687 # small for the default recursion limit. Increase the stack size
8688 # to ensure that tests don't crash
8689 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8690
Jack Jansene578a632001-08-15 01:27:14 +00008691 if test "$enable_framework"
8692 then
Jack Jansenda49e192005-01-07 13:08:22 +00008693 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008694 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008695 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008696 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008697 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008698 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008699 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008700 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8701 then
8702 LINKFORSHARED="-Wl,--export-dynamic"
8703 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008704 SunOS/5*) case $CC in
8705 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008706 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008707 then
8708 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008709 fi;;
8710 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008711 CYGWIN*)
8712 if test $enable_shared = "no"
8713 then
8714 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8715 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008716 QNX*)
8717 # -Wl,-E causes the symbols to be added to the dynamic
8718 # symbol table so that they can be found when a module
8719 # is loaded. -N 2048K causes the stack size to be set
8720 # to 2048 kilobytes so that the stack doesn't overflow
8721 # when running test_compile.py.
8722 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008723 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8726$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727
Michael W. Hudson54241132001-12-07 15:38:26 +00008728
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008729
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8731$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008732if test ! "$LIBRARY" = "$LDLIBRARY"
8733then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008734 case $ac_sys_system in
8735 CYGWIN*)
8736 # Cygwin needs CCSHARED when building extension DLLs
8737 # but not when building the interpreter DLL.
8738 CFLAGSFORSHARED='';;
8739 *)
8740 CFLAGSFORSHARED='$(CCSHARED)'
8741 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8744$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008745
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008746# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8747# library (with --enable-shared).
8748# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008749# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8750# if it is not required, since it creates a dependency of the shared library
8751# to LIBS. This, in turn, means that applications linking the shared libpython
8752# don't need to link LIBS explicitly. The default should be only changed
8753# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8756$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008757case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008758 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008759 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008760esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8762$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008763
8764
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8767$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008768if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008769 $as_echo_n "(cached) " >&6
8770else
8771 ac_check_lib_save_LIBS=$LIBS
8772LIBS="-lsendfile $LIBS"
8773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8774/* end confdefs.h. */
8775
8776/* Override any GCC internal prototype to avoid an error.
8777 Use char because int might match the return type of a GCC
8778 builtin and then its argument prototype would still apply. */
8779#ifdef __cplusplus
8780extern "C"
8781#endif
8782char sendfile ();
8783int
8784main ()
8785{
8786return sendfile ();
8787 ;
8788 return 0;
8789}
8790_ACEOF
8791if ac_fn_c_try_link "$LINENO"; then :
8792 ac_cv_lib_sendfile_sendfile=yes
8793else
8794 ac_cv_lib_sendfile_sendfile=no
8795fi
8796rm -f core conftest.err conftest.$ac_objext \
8797 conftest$ac_exeext conftest.$ac_ext
8798LIBS=$ac_check_lib_save_LIBS
8799fi
8800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8801$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008802if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008803 cat >>confdefs.h <<_ACEOF
8804#define HAVE_LIBSENDFILE 1
8805_ACEOF
8806
8807 LIBS="-lsendfile $LIBS"
8808
8809fi
8810
Matthias Kloseb9621712010-04-24 17:59:49 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8812$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008813if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008815else
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008817LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821/* Override any GCC internal prototype to avoid an error.
8822 Use char because int might match the return type of a GCC
8823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008824#ifdef __cplusplus
8825extern "C"
8826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008827char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008828int
8829main ()
8830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ;
8833 return 0;
8834}
8835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008838else
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008841rm -f core conftest.err conftest.$ac_objext \
8842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8846$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008847if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 cat >>confdefs.h <<_ACEOF
8849#define HAVE_LIBDL 1
8850_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008851
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008852 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008853
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008854fi
8855 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8857$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008858if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008859 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008860else
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008862LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866/* Override any GCC internal prototype to avoid an error.
8867 Use char because int might match the return type of a GCC
8868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008869#ifdef __cplusplus
8870extern "C"
8871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008872char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
8875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 ;
8878 return 0;
8879}
8880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886rm -f core conftest.err conftest.$ac_objext \
8887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8891$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 cat >>confdefs.h <<_ACEOF
8894#define HAVE_LIBDLD 1
8895_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008897 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008899fi
8900 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008901
Georg Brandlb1441c72009-01-03 22:33:39 +00008902# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008903if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8905$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008906if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008908else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008909 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008913/* Override any GCC internal prototype to avoid an error.
8914 Use char because int might match the return type of a GCC
8915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008916#ifdef __cplusplus
8917extern "C"
8918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008919char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008920int
8921main ()
8922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ;
8925 return 0;
8926}
8927_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928for ac_lib in '' pthread rt posix4; do
8929 if test -z "$ac_lib"; then
8930 ac_res="none required"
8931 else
8932 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008933 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938rm -f core conftest.err conftest.$ac_objext \
8939 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008940 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943done
Victor Stinnere0be4232011-10-25 13:06:09 +02008944if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946else
8947 ac_cv_search_sem_init=no
8948fi
8949rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008950LIBS=$ac_func_search_save_LIBS
8951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8953$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008955if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008957
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008958fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008959 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008960 # posix4 on Solaris 2.6
8961 # pthread (first!) on Linux
8962fi
8963
Martin v. Löwis19d17342003-06-14 21:03:05 +00008964# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8966$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008967if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008968 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008969else
8970 ac_check_lib_save_LIBS=$LIBS
8971LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008973/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008974
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008975/* Override any GCC internal prototype to avoid an error.
8976 Use char because int might match the return type of a GCC
8977 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008978#ifdef __cplusplus
8979extern "C"
8980#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008981char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008982int
8983main ()
8984{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008985return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008986 ;
8987 return 0;
8988}
8989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008991 ac_cv_lib_intl_textdomain=yes
8992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008994fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008995rm -f core conftest.err conftest.$ac_objext \
8996 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008997LIBS=$ac_check_lib_save_LIBS
8998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9000$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009001if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004
Brett Cannonc6d936e2009-06-07 20:09:53 +00009005 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006fi
9007
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009008
9009# checks for system dependent C++ extensions support
9010case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9012$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009015
Georg Brandl59e87bd2011-02-15 19:48:59 +00009016 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009017int
9018main ()
9019{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009020loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 ;
9022 return 0;
9023}
Matthias Kloseb159a552010-04-25 21:00:44 +00009024
Martin v. Löwis11437992002-04-12 09:54:03 +00009025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009027
Matthias Kloseb159a552010-04-25 21:00:44 +00009028
Matthias Kloseb9621712010-04-24 17:59:49 +00009029$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
Matthias Kloseb159a552010-04-25 21:00:44 +00009031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009032$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009033
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009034else
Matthias Kloseb159a552010-04-25 21:00:44 +00009035
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009037$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009038
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009040rm -f core conftest.err conftest.$ac_objext \
9041 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009042 *) ;;
9043esac
9044
Christian Heimes985ecdc2013-11-20 11:46:18 +01009045# check for systems that require aligned memory access
9046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9047$as_echo_n "checking aligned memory access is required... " >&6; }
9048if test "$cross_compiling" = yes; then :
9049 aligned_required=yes
9050else
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052/* end confdefs.h. */
9053
9054int main()
9055{
9056 char s[16];
9057 int i, *p1, *p2;
9058 for (i=0; i < 16; i++)
9059 s[i] = i;
9060 p1 = (int*)(s+1);
9061 p2 = (int*)(s+2);
9062 if (*p1 == *p2)
9063 return 1;
9064 return 0;
9065}
9066
9067_ACEOF
9068if ac_fn_c_try_run "$LINENO"; then :
9069 aligned_required=no
9070else
9071 aligned_required=yes
9072fi
9073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9074 conftest.$ac_objext conftest.beam conftest.$ac_ext
9075fi
9076
9077
9078if test "$aligned_required" = yes ; then
9079
9080$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9081
9082fi
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9084$as_echo "$aligned_required" >&6; }
9085
9086
9087# str, bytes and memoryview hash algorithm
9088
9089
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9091$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9092
9093# Check whether --with-hash_algorithm was given.
9094if test "${with_hash_algorithm+set}" = set; then :
9095 withval=$with_hash_algorithm;
9096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9097$as_echo "$withval" >&6; }
9098case "$withval" in
9099 siphash24)
9100 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9101
9102 ;;
9103 fnv)
9104 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9105
9106 ;;
9107 *)
9108 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9109 ;;
9110esac
9111
9112else
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9114$as_echo "default" >&6; }
9115fi
9116
9117
Guido van Rossum70c7f481998-03-26 18:44:10 +00009118# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9120$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009121if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009123else
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009125LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129/* Override any GCC internal prototype to avoid an error.
9130 Use char because int might match the return type of a GCC
9131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009132#ifdef __cplusplus
9133extern "C"
9134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009135char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009136int
9137main ()
9138{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009139return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009140 ;
9141 return 0;
9142}
9143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009144if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009148fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009149rm -f core conftest.err conftest.$ac_objext \
9150 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009151LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9154$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009155if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009156 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009157fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009158 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9160$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009161if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009163else
Martin v. Löwis11437992002-04-12 09:54:03 +00009164 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009165LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009169/* Override any GCC internal prototype to avoid an error.
9170 Use char because int might match the return type of a GCC
9171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009172#ifdef __cplusplus
9173extern "C"
9174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009175char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009176int
9177main ()
9178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ;
9181 return 0;
9182}
9183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009186else
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009189rm -f core conftest.err conftest.$ac_objext \
9190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009191LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9194$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009195if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009196 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009197fi
9198 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009199
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9201$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009203# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009204if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9207$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009208LIBS="$withval $LIBS"
9209
9210else
Matthias Kloseb9621712010-04-24 17:59:49 +00009211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9212$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009213fi
9214
Guido van Rossum7f43da71994-08-01 12:15:30 +00009215
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009216if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009217 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9218set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9220$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009221if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009222 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009223else
9224 case $PKG_CONFIG in
9225 [\\/]* | ?:[\\/]*)
9226 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9227 ;;
9228 *)
9229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230for as_dir in $PATH
9231do
9232 IFS=$as_save_IFS
9233 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009236 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009238 break 2
9239 fi
9240done
Matthias Kloseb9621712010-04-24 17:59:49 +00009241 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009242IFS=$as_save_IFS
9243
9244 ;;
9245esac
9246fi
9247PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9248if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9250$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009254fi
9255
9256
9257fi
9258if test -z "$ac_cv_path_PKG_CONFIG"; then
9259 ac_pt_PKG_CONFIG=$PKG_CONFIG
9260 # Extract the first word of "pkg-config", so it can be a program name with args.
9261set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9263$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009264if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009266else
9267 case $ac_pt_PKG_CONFIG in
9268 [\\/]* | ?:[\\/]*)
9269 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9270 ;;
9271 *)
9272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9273for as_dir in $PATH
9274do
9275 IFS=$as_save_IFS
9276 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009277 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009279 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009281 break 2
9282 fi
9283done
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009285IFS=$as_save_IFS
9286
9287 ;;
9288esac
9289fi
9290ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9291if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9293$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009294else
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9296$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009297fi
9298
9299 if test "x$ac_pt_PKG_CONFIG" = x; then
9300 PKG_CONFIG=""
9301 else
9302 case $cross_compiling:$ac_tool_warned in
9303yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009306ac_tool_warned=yes ;;
9307esac
9308 PKG_CONFIG=$ac_pt_PKG_CONFIG
9309 fi
9310else
9311 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9312fi
9313
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009314
9315# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9317$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009318
9319# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009320if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009321 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009322else
9323 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009324fi
9325
9326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9328$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009329
9330# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9332$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009333
9334# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009335if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009336 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009337else
9338 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009339fi
9340
9341
9342if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009343 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9344else
9345 LIBFFI_INCLUDEDIR=""
9346fi
9347
9348
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9350$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009351
Stefan Krah60187b52012-03-23 19:06:27 +01009352# Check for use of the system libmpdec library
9353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9354$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9355
9356# Check whether --with-system_libmpdec was given.
9357if test "${with_system_libmpdec+set}" = set; then :
9358 withval=$with_system_libmpdec;
9359else
9360 with_system_libmpdec="no"
9361fi
9362
9363
9364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9365$as_echo "$with_system_libmpdec" >&6; }
9366
Benjamin Peterson076ed002010-10-31 17:11:02 +00009367# Check for support for loadable sqlite extensions
9368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9369$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9370# Check whether --enable-loadable-sqlite-extensions was given.
9371if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9372 enableval=$enable_loadable_sqlite_extensions;
9373else
9374 enable_loadable_sqlite_extensions="no"
9375fi
9376
9377
9378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9379$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9380
Ned Deilyd819b932013-09-06 01:07:05 -07009381# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9382
9383
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9385$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9386
9387# Check whether --with-tcltk-includes was given.
9388if test "${with_tcltk_includes+set}" = set; then :
9389 withval=$with_tcltk_includes;
9390else
9391 with_tcltk_includes="default"
9392fi
9393
9394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9395$as_echo "$with_tcltk_includes" >&6; }
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9397$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9398
9399# Check whether --with-tcltk-libs was given.
9400if test "${with_tcltk_libs+set}" = set; then :
9401 withval=$with_tcltk_libs;
9402else
9403 with_tcltk_libs="default"
9404fi
9405
9406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9407$as_echo "$with_tcltk_libs" >&6; }
9408if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9409then
9410 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9411 then
9412 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9413 fi
9414 TCLTK_INCLUDES=""
9415 TCLTK_LIBS=""
9416else
9417 TCLTK_INCLUDES="$with_tcltk_includes"
9418 TCLTK_LIBS="$with_tcltk_libs"
9419fi
9420
Matthias Klose55708cc2009-04-30 08:06:49 +00009421# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9423$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009424
9425# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009426if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009427 withval=$with_dbmliborder;
9428if test x$with_dbmliborder = xyes
9429then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009430as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009431else
9432 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9433 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9434 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009435 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009436 fi
9437 done
9438fi
9439fi
9440
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9442$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009443
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009444# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009445
9446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9448$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009450# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009451if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452 withval=$with_signal_module;
9453fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009454
9455
9456if test -z "$with_signal_module"
9457then with_signal_module="yes"
9458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9460$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009461
9462if test "${with_signal_module}" = "yes"; then
9463 USE_SIGNAL_MODULE=""
9464 SIGNAL_OBJS=""
9465else
9466 USE_SIGNAL_MODULE="#"
9467 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9468fi
9469
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009470# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009471
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009472USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474
Martin v. Löwis11437992002-04-12 09:54:03 +00009475
9476# Templates for things AC_DEFINEd more than once.
9477# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009478
9479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9482$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009484# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009485if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486 withval=$with_threads;
9487fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009488
9489
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009490# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009493if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494 withval=$with_thread; with_threads=$with_thread
9495fi
9496
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009497
9498if test -z "$with_threads"
9499then with_threads="yes"
9500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9502$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009503
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009504
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009505if test "$with_threads" = "no"
9506then
9507 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009508elif test "$ac_cv_pthread_is_default" = yes
9509then
Matthias Kloseb9621712010-04-24 17:59:49 +00009510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009511
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009512 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009514
9515 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009516 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009517elif test "$ac_cv_kpthread" = "yes"
9518then
9519 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009520 if test "$ac_cv_cxx_thread" = "yes"; then
9521 CXX="$CXX -Kpthread"
9522 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009524
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009525 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009526 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009527elif test "$ac_cv_kthread" = "yes"
9528then
9529 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009530 if test "$ac_cv_cxx_thread" = "yes"; then
9531 CXX="$CXX -Kthread"
9532 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009534
9535 posix_threads=yes
9536 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009537elif test "$ac_cv_pthread" = "yes"
9538then
9539 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009540 if test "$ac_cv_cxx_thread" = "yes"; then
9541 CXX="$CXX -pthread"
9542 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009544
9545 posix_threads=yes
9546 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009547else
9548 if test ! -z "$with_threads" -a -d "$with_threads"
9549 then LDFLAGS="$LDFLAGS -L$with_threads"
9550 fi
9551 if test ! -z "$withval" -a -d "$withval"
9552 then LDFLAGS="$LDFLAGS -L$withval"
9553 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009554
9555 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009556 # define _POSIX_THREADS in unistd.h. Some apparently don't
9557 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9559$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009562
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009563#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009564#ifdef _POSIX_THREADS
9565yes
9566#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
9568_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009570 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009571 unistd_defines_pthreads=yes
9572else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009573 unistd_defines_pthreads=no
9574fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009575rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009576
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9578$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009579
Matthias Kloseb9621712010-04-24 17:59:49 +00009580 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009581
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009582 # Just looking for pthread_create in libpthread is not enough:
9583 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9584 # So we really have to include pthread.h, and then link.
9585 _libs=$LIBS
9586 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9588$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009591
9592#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009593#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009594
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009595void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009596int
9597main ()
9598{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009599
9600pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 ;
9602 return 0;
9603}
9604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009606
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9608$as_echo "yes" >&6; }
9609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009610
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009611 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009612 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009615 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009617if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009619
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009620 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009621 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009622else
Guido van Rossumad678af1998-10-02 14:42:15 +00009623
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9625$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009626if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009627 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009628else
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009630LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634/* Override any GCC internal prototype to avoid an error.
9635 Use char because int might match the return type of a GCC
9636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637#ifdef __cplusplus
9638extern "C"
9639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009640char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009641int
9642main ()
9643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ;
9646 return 0;
9647}
9648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009651else
Matthias Kloseb9621712010-04-24 17:59:49 +00009652 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654rm -f core conftest.err conftest.$ac_objext \
9655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009656LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9659$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009660if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009661 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009662
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009663 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009664 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009665 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009666else
Greg Steinadf63d62000-07-05 10:38:09 +00009667
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9669$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009670if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009672else
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009674LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678/* Override any GCC internal prototype to avoid an error.
9679 Use char because int might match the return type of a GCC
9680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681#ifdef __cplusplus
9682extern "C"
9683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009684char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009685int
9686main ()
9687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009695else
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698rm -f core conftest.err conftest.$ac_objext \
9699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9703$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009704if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009706
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009707 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009708 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009709 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009710else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009711
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9713$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009714if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009716else
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009718LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722/* Override any GCC internal prototype to avoid an error.
9723 Use char because int might match the return type of a GCC
9724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725#ifdef __cplusplus
9726extern "C"
9727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009728char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729int
9730main ()
9731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ;
9734 return 0;
9735}
9736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009737if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009739else
Matthias Kloseb9621712010-04-24 17:59:49 +00009740 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742rm -f core conftest.err conftest.$ac_objext \
9743 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009744LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9747$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009748if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009749 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009751 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009752 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009753 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009754else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009755
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9757$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009758if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009759 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009760else
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009762LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766/* Override any GCC internal prototype to avoid an error.
9767 Use char because int might match the return type of a GCC
9768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009769#ifdef __cplusplus
9770extern "C"
9771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009772char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009773int
9774main ()
9775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009776return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 ;
9778 return 0;
9779}
9780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009783else
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009786rm -f core conftest.err conftest.$ac_objext \
9787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009788LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9791$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009792if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009793 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009794
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009795 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009796 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009797 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009798else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009799
Martin v. Löwis130fb172001-07-19 11:00:41 +00009800 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009801fi
9802
Guido van Rossum627b2d71993-12-24 10:39:16 +00009803
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009804fi
9805
Guido van Rossum0be3e491997-05-22 20:33:33 +00009806fi
9807
Guido van Rossum49545951997-12-02 19:28:29 +00009808fi
9809
Guido van Rossumb93a8621998-05-07 13:27:32 +00009810fi
9811
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009813rm -f core conftest.err conftest.$ac_objext \
9814 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9817$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009818if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009820else
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009822LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#ifdef __cplusplus
9830extern "C"
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009843else
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009846rm -f core conftest.err conftest.$ac_objext \
9847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9851$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009854
Martin v. Löwis130fb172001-07-19 11:00:41 +00009855 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009856 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009857 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009858fi
9859
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009860
Neal Norwitza978ab02002-11-02 16:58:05 +00009861 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9863$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009865 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009866else
Martin v. Löwis11437992002-04-12 09:54:03 +00009867 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009868LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009870/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009872/* Override any GCC internal prototype to avoid an error.
9873 Use char because int might match the return type of a GCC
9874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009875#ifdef __cplusplus
9876extern "C"
9877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009878char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009879int
9880main ()
9881{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 ;
9884 return 0;
9885}
9886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009889else
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009892rm -f core conftest.err conftest.$ac_objext \
9893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009894LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9897$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009898if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009899 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009900
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009901 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009902 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009903 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009904fi
9905
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009906 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009907fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009908
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009909if test "$posix_threads" = "yes"; then
9910 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009911
Matthias Kloseb9621712010-04-24 17:59:49 +00009912$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009913
9914 fi
9915
9916 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9917 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009918 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009919$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009920
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009921 ;;
9922 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009923$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009924
9925 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009926 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009927$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009928
9929 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930 esac
9931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9933$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009934 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009936else
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009938 ac_cv_pthread_system_supported=no
9939else
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009941/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009942
9943 #include <stdio.h>
9944 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009945 void *foo(void *parm) {
9946 return NULL;
9947 }
9948 main() {
9949 pthread_attr_t attr;
9950 pthread_t id;
9951 if (pthread_attr_init(&attr)) exit(-1);
9952 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9953 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9954 exit(0);
9955 }
9956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009957if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009958 ac_cv_pthread_system_supported=yes
9959else
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9963 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009964fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009965
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009966
Guido van Rossum627b2d71993-12-24 10:39:16 +00009967fi
9968
Matthias Kloseb9621712010-04-24 17:59:49 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9970$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009971 if test "$ac_cv_pthread_system_supported" = "yes"; then
9972
Matthias Kloseb9621712010-04-24 17:59:49 +00009973$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009974
9975 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 for ac_func in pthread_sigmask
9977do :
9978 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009979if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009980 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009981#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009982_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009983 case $ac_sys_system in
9984 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009985
Matthias Kloseb9621712010-04-24 17:59:49 +00009986$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009987
9988 ;;
9989 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990fi
9991done
9992
Christian Heimesf77b4b22013-08-21 13:26:05 +02009993 for ac_func in pthread_atfork
9994do :
9995 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9996if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9997 cat >>confdefs.h <<_ACEOF
9998#define HAVE_PTHREAD_ATFORK 1
9999_ACEOF
10000
10001fi
10002done
10003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010004fi
10005
10006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010007# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10010$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010014 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017 ipv6=no
10018 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10020$as_echo "yes" >&6; }
10021 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010022
10023 ipv6=yes
10024 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026else
Martin v. Löwis11437992002-04-12 09:54:03 +000010027
Matthias Kloseb9621712010-04-24 17:59:49 +000010028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010029/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010030 /* AF_INET6 available check */
10031#include <sys/types.h>
10032#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010033int
10034main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010035{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010036int domain = AF_INET6;
10037 ;
10038 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039}
Martin v. Löwis11437992002-04-12 09:54:03 +000010040_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010041if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10044$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010045 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010047else
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10050$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010051 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010052
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010056if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10058$as_echo_n "checking if RFC2553 API is available... " >&6; }
10059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010060/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010061
10062 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010063#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010064int
10065main ()
10066{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010067struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010068 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ;
10070 return 0;
10071}
Matthias Kloseb159a552010-04-25 21:00:44 +000010072
Martin v. Löwis11437992002-04-12 09:54:03 +000010073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010075
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010077$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010078 ipv6=yes
10079
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010080else
Matthias Kloseb159a552010-04-25 21:00:44 +000010081
10082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010083$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010084 ipv6=no
10085
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010088fi
10089
10090if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010092
10093fi
10094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095fi
10096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010097
10098ipv6type=unknown
10099ipv6lib=none
10100ipv6trylibc=no
10101
10102if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10104$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010105 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10106 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107 case $i in
10108 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112#include <netinet/in.h>
10113#ifdef IPV6_INRIA_VERSION
10114yes
10115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010119 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010121rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122
10123 ;;
10124 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010126/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010128#include <netinet/in.h>
10129#ifdef __KAME__
10130yes
10131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010132_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135 ipv6type=$i;
10136 ipv6lib=inet6
10137 ipv6libdir=/usr/local/v6/lib
10138 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010140rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010141
10142 ;;
10143 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010145/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010146
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010147#include <features.h>
10148#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10149yes
10150#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010151_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010154 ipv6type=$i;
10155 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010157rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158
10159 ;;
10160 linux-inet6)
10161 if test -d /usr/inet6; then
10162 ipv6type=$i
10163 ipv6lib=inet6
10164 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010165 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010166 fi
10167 ;;
10168 solaris)
10169 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010170 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171 ipv6type=$i
10172 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010173 fi
10174 fi
10175 ;;
10176 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010178/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010179
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010180#include <sys/param.h>
10181#ifdef _TOSHIBA_INET6
10182yes
10183#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010184_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010187 ipv6type=$i;
10188 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010189 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010191rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192
10193 ;;
10194 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010196/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010197
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010198#include </usr/local/v6/include/sys/v6config.h>
10199#ifdef __V6D__
10200yes
10201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010202_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205 ipv6type=$i;
10206 ipv6lib=v6;
10207 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010208 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010210rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211
10212 ;;
10213 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010216
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217#include <sys/param.h>
10218#ifdef _ZETA_MINAMI_INET6
10219yes
10220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010221_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224 ipv6type=$i;
10225 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010226 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010227fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010228rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229
10230 ;;
10231 esac
10232 if test "$ipv6type" != "unknown"; then
10233 break
10234 fi
10235 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10237$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238fi
10239
10240if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10241 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10242 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10243 echo "using lib$ipv6lib"
10244 else
10245 if test $ipv6trylibc = "yes"; then
10246 echo "using libc"
10247 else
10248 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10249 echo "You need to fetch lib$ipv6lib.a from appropriate"
10250 echo 'ipv6 kit and compile beforehand.'
10251 exit 1
10252 fi
10253 fi
10254fi
10255
Matthias Kloseb9621712010-04-24 17:59:49 +000010256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10257$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010259/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010260
10261 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010262int
10263main ()
10264{
10265FSIORefNum fRef = 0
10266 ;
10267 return 0;
10268}
Matthias Kloseb159a552010-04-25 21:00:44 +000010269
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010272
Matthias Kloseb159a552010-04-25 21:00:44 +000010273
Matthias Kloseb9621712010-04-24 17:59:49 +000010274$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010275
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10277$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010278
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010279else
Matthias Kloseb159a552010-04-25 21:00:44 +000010280
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10282$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010283
10284fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10286
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010287# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10289$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010292if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293 withval=$with_doc_strings;
10294fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010295
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010296
10297if test -z "$with_doc_strings"
10298then with_doc_strings="yes"
10299fi
10300if test "$with_doc_strings" != "no"
10301then
10302
Matthias Kloseb9621712010-04-24 17:59:49 +000010303$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010304
10305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10307$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010308
Antoine Pitrou042b1282010-08-13 21:15:58 +000010309# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10311$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010313# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010314if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010316if test "$withval" != no
10317then
10318
Matthias Kloseb9621712010-04-24 17:59:49 +000010319$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10322$as_echo "yes" >&6; }
10323else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010325fi
10326else
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329fi
10330
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010331
10332# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10334$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338 withval=$with_pymalloc;
10339fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010340
Neil Schemenauera35c6882001-02-27 04:45:05 +000010341
Neil Schemenauer16c22972002-03-22 15:34:49 +000010342if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010343then
10344 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010345fi
10346if test "$with_pymalloc" != "no"
10347then
Martin v. Löwis11437992002-04-12 09:54:03 +000010348
Matthias Kloseb9621712010-04-24 17:59:49 +000010349$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010350
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010351 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10354$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010355
Benjamin Peterson05159c42009-12-03 03:01:27 +000010356# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10358$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010359
10360# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010361if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010362 withval=$with_valgrind;
10363else
10364 with_valgrind=no
10365fi
10366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10368$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010369if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 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 +020010371if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010374
10375else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010376 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010377
10378fi
10379
10380
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010381 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010382fi
10383
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010384# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010385
Guido van Rossum98935bf2001-09-05 19:13:16 +000010386DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010387
Guido van Rossume97ee181999-12-20 21:27:22 +000010388# the dlopen() function means we might want to use dynload_shlib.o. some
10389# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010390for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010391do :
10392 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010393if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010395#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010396_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010397
Guido van Rossume97ee181999-12-20 21:27:22 +000010398fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010399done
Guido van Rossume97ee181999-12-20 21:27:22 +000010400
Michael W. Hudson54241132001-12-07 15:38:26 +000010401
Guido van Rossume97ee181999-12-20 21:27:22 +000010402# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10403# loading of modules.
10404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10406$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010407if test -z "$DYNLOADFILE"
10408then
10409 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010410 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10411 if test "$ac_cv_func_dlopen" = yes
10412 then DYNLOADFILE="dynload_shlib.o"
10413 else DYNLOADFILE="dynload_aix.o"
10414 fi
10415 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010416 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010417 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10418 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010419 *)
10420 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10421 # out any dynamic loading
10422 if test "$ac_cv_func_dlopen" = yes
10423 then DYNLOADFILE="dynload_shlib.o"
10424 else DYNLOADFILE="dynload_stub.o"
10425 fi
10426 ;;
10427 esac
10428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10430$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010431if test "$DYNLOADFILE" != "dynload_stub.o"
10432then
Martin v. Löwis11437992002-04-12 09:54:03 +000010433
Matthias Kloseb9621712010-04-24 17:59:49 +000010434$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010435
10436fi
10437
Neil Schemenauer4e425612001-06-19 15:44:15 +000010438# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10439
Michael W. Hudson54241132001-12-07 15:38:26 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10442$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010443if test -z "$MACHDEP_OBJS"
10444then
Jack Jansene578a632001-08-15 01:27:14 +000010445 MACHDEP_OBJS=$extra_machdep_objs
10446else
10447 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010448fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010449if test -z "$MACHDEP_OBJS"; then
10450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10451$as_echo "none" >&6; }
10452else
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10454$as_echo "$MACHDEP_OBJS" >&6; }
10455fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010456
Guido van Rossum627b2d71993-12-24 10:39:16 +000010457# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010458for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010459 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010460 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010461 futimens futimes gai_strerror \
10462 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010463 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010464 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010465 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10466 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010467 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010468 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010469 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010470 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010471 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010472 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010473 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10474 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010475 sigaction sigaltstack siginterrupt sigpending sigrelse \
10476 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010477 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010478 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010479 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010480do :
10481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010484 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010486_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010488fi
10489done
10490
Michael W. Hudson54241132001-12-07 15:38:26 +000010491
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010492ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10493 #include <dirent.h>
10494"
10495if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10496
10497$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10498
10499fi
10500
10501
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010502# For some functions, having a definition is not sufficient, since
10503# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10505$as_echo_n "checking for chroot... " >&6; }
10506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010507/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010508#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010509int
10510main ()
10511{
10512void *x=chroot
10513 ;
10514 return 0;
10515}
10516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010520
Matthias Kloseb159a552010-04-25 21:00:44 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010522$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010523else
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010526
10527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10530$as_echo_n "checking for link... " >&6; }
10531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010533#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010534int
10535main ()
10536{
10537void *x=link
10538 ;
10539 return 0;
10540}
10541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010545
Matthias Kloseb159a552010-04-25 21:00:44 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010547$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010548else
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010551
10552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10555$as_echo_n "checking for symlink... " >&6; }
10556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010558#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010559int
10560main ()
10561{
10562void *x=symlink
10563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010568
Matthias Kloseb9621712010-04-24 17:59:49 +000010569$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010570
Matthias Kloseb159a552010-04-25 21:00:44 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010572$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010573else
Matthias Kloseb9621712010-04-24 17:59:49 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010576
10577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10580$as_echo_n "checking for fchdir... " >&6; }
10581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010583#include <unistd.h>
10584int
10585main ()
10586{
10587void *x=fchdir
10588 ;
10589 return 0;
10590}
10591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010595
Matthias Kloseb159a552010-04-25 21:00:44 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010601
10602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10605$as_echo_n "checking for fsync... " >&6; }
10606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010608#include <unistd.h>
10609int
10610main ()
10611{
10612void *x=fsync
10613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010618
Matthias Kloseb9621712010-04-24 17:59:49 +000010619$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010620
Matthias Kloseb159a552010-04-25 21:00:44 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010622$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010623else
Matthias Kloseb9621712010-04-24 17:59:49 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010626
10627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10630$as_echo_n "checking for fdatasync... " >&6; }
10631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010633#include <unistd.h>
10634int
10635main ()
10636{
10637void *x=fdatasync
10638 ;
10639 return 0;
10640}
10641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010643
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010645
Matthias Kloseb159a552010-04-25 21:00:44 +000010646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010648else
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10650$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010651
10652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10655$as_echo_n "checking for epoll... " >&6; }
10656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010657/* end confdefs.h. */
10658#include <sys/epoll.h>
10659int
10660main ()
10661{
10662void *x=epoll_create
10663 ;
10664 return 0;
10665}
10666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010668
Matthias Kloseb9621712010-04-24 17:59:49 +000010669$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010670
Matthias Kloseb159a552010-04-25 21:00:44 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010672$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010673else
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10675$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010676
10677fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10680$as_echo_n "checking for epoll_create1... " >&6; }
10681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10682/* end confdefs.h. */
10683#include <sys/epoll.h>
10684int
10685main ()
10686{
10687void *x=epoll_create1
10688 ;
10689 return 0;
10690}
10691_ACEOF
10692if ac_fn_c_try_compile "$LINENO"; then :
10693
10694$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10695
10696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10697$as_echo "yes" >&6; }
10698else
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701
10702fi
10703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10705$as_echo_n "checking for kqueue... " >&6; }
10706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010707/* end confdefs.h. */
10708
10709#include <sys/types.h>
10710#include <sys/event.h>
10711
10712int
10713main ()
10714{
10715int x=kqueue()
10716 ;
10717 return 0;
10718}
10719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010723
Matthias Kloseb159a552010-04-25 21:00:44 +000010724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010725$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10728$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010729
10730fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10733$as_echo_n "checking for prlimit... " >&6; }
10734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10735/* end confdefs.h. */
10736
10737#include <sys/time.h>
10738#include <sys/resource.h>
10739
10740int
10741main ()
10742{
10743void *x=prlimit
10744 ;
10745 return 0;
10746}
10747_ACEOF
10748if ac_fn_c_try_compile "$LINENO"; then :
10749
10750$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10751
10752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10753$as_echo "yes" >&6; }
10754else
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10756$as_echo "no" >&6; }
10757
10758fi
10759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10760
Martin v. Löwisd5843682002-11-21 20:41:28 +000010761# On some systems (eg. FreeBSD 5), we would find a definition of the
10762# functions ctermid_r, setgroups in the library, but no prototype
10763# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10764# address to avoid compiler warnings and potential miscompilations
10765# because of the missing prototypes.
10766
Matthias Kloseb9621712010-04-24 17:59:49 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10768$as_echo_n "checking for ctermid_r... " >&6; }
10769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010770/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010771
Martin v. Löwisd5843682002-11-21 20:41:28 +000010772#include <stdio.h>
10773
Martin v. Löwisd5843682002-11-21 20:41:28 +000010774int
10775main ()
10776{
10777void* p = ctermid_r
10778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010783
Matthias Kloseb9621712010-04-24 17:59:49 +000010784$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010785
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010787$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010788else
Matthias Kloseb9621712010-04-24 17:59:49 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010791
10792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10794
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10796$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010797if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010798 $as_echo_n "(cached) " >&6
10799else
10800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010801/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010802#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010803int
10804main ()
10805{
10806void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010807
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010813 ac_cv_flock_decl=yes
10814else
10815 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010816
10817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010819
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010820fi
10821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10822$as_echo "$ac_cv_flock_decl" >&6; }
10823if test "x${ac_cv_flock_decl}" = xyes; then
10824 for ac_func in flock
10825do :
10826 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010827if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010828 cat >>confdefs.h <<_ACEOF
10829#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010830_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010831
Antoine Pitroua3000072010-09-07 14:52:42 +000010832else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010834$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010835if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010836 $as_echo_n "(cached) " >&6
10837else
10838 ac_check_lib_save_LIBS=$LIBS
10839LIBS="-lbsd $LIBS"
10840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10841/* end confdefs.h. */
10842
10843/* Override any GCC internal prototype to avoid an error.
10844 Use char because int might match the return type of a GCC
10845 builtin and then its argument prototype would still apply. */
10846#ifdef __cplusplus
10847extern "C"
10848#endif
10849char flock ();
10850int
10851main ()
10852{
10853return flock ();
10854 ;
10855 return 0;
10856}
10857_ACEOF
10858if ac_fn_c_try_link "$LINENO"; then :
10859 ac_cv_lib_bsd_flock=yes
10860else
10861 ac_cv_lib_bsd_flock=no
10862fi
10863rm -f core conftest.err conftest.$ac_objext \
10864 conftest$ac_exeext conftest.$ac_ext
10865LIBS=$ac_check_lib_save_LIBS
10866fi
10867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10868$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010869if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010870 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010871
10872
10873$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10874
10875
10876fi
10877
10878
10879fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010880done
10881
Antoine Pitroua3000072010-09-07 14:52:42 +000010882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010883
Matthias Kloseb9621712010-04-24 17:59:49 +000010884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10885$as_echo_n "checking for getpagesize... " >&6; }
10886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010888
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010889#include <unistd.h>
10890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010891int
10892main ()
10893{
10894void* p = getpagesize
10895 ;
10896 return 0;
10897}
10898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010899if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010902
Matthias Kloseb159a552010-04-25 21:00:44 +000010903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010904$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010905else
Matthias Kloseb9621712010-04-24 17:59:49 +000010906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10907$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010908
10909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010911
Victor Stinner984890f2011-11-24 13:53:38 +010010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10913$as_echo_n "checking for broken unsetenv... " >&6; }
10914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915/* end confdefs.h. */
10916
10917#include <stdlib.h>
10918
10919int
10920main ()
10921{
10922int res = unsetenv("DUMMY")
10923 ;
10924 return 0;
10925}
10926_ACEOF
10927if ac_fn_c_try_compile "$LINENO"; then :
10928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
10930else
10931
10932$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10933
10934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10935$as_echo "yes" >&6; }
10936
10937fi
10938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10939
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010940for ac_prog in true
10941do
10942 # Extract the first word of "$ac_prog", so it can be a program name with args.
10943set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010946if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010948else
10949 if test -n "$TRUE"; then
10950 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10951else
10952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10953for as_dir in $PATH
10954do
10955 IFS=$as_save_IFS
10956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010959 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 $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 +000010961 break 2
10962 fi
10963done
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010966
10967fi
10968fi
10969TRUE=$ac_cv_prog_TRUE
10970if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10972$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010973else
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10975$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010976fi
10977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010978
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010979 test -n "$TRUE" && break
10980done
10981test -n "$TRUE" || TRUE="/bin/true"
10982
10983
Matthias Kloseb9621712010-04-24 17:59:49 +000010984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10985$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010986if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010988else
10989 ac_check_lib_save_LIBS=$LIBS
10990LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010992/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994/* Override any GCC internal prototype to avoid an error.
10995 Use char because int might match the return type of a GCC
10996 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010997#ifdef __cplusplus
10998extern "C"
10999#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011000char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011001int
11002main ()
11003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011005 ;
11006 return 0;
11007}
11008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011009if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011010 ac_cv_lib_c_inet_aton=yes
11011else
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011013fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011014rm -f core conftest.err conftest.$ac_objext \
11015 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011016LIBS=$ac_check_lib_save_LIBS
11017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11019$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011020if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011021 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011022else
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11024$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011025if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011026 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011027else
11028 ac_check_lib_save_LIBS=$LIBS
11029LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033/* Override any GCC internal prototype to avoid an error.
11034 Use char because int might match the return type of a GCC
11035 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011036#ifdef __cplusplus
11037extern "C"
11038#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011039char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011040int
11041main ()
11042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011043return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044 ;
11045 return 0;
11046}
11047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011049 ac_cv_lib_resolv_inet_aton=yes
11050else
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053rm -f core conftest.err conftest.$ac_objext \
11054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011055LIBS=$ac_check_lib_save_LIBS
11056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11058$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011059if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060 cat >>confdefs.h <<_ACEOF
11061#define HAVE_LIBRESOLV 1
11062_ACEOF
11063
11064 LIBS="-lresolv $LIBS"
11065
11066fi
11067
11068
11069fi
11070
11071
Christian Heimesd0764e22007-12-04 15:00:33 +000011072# On Tru64, chflags seems to be present, but calling it will
11073# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11075$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011076if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011077 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011078else
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011080 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011083/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011084
Christian Heimesd0764e22007-12-04 15:00:33 +000011085#include <sys/stat.h>
11086#include <unistd.h>
11087int main(int argc, char*argv[])
11088{
11089 if(chflags(argv[0], 0) != 0)
11090 return 1;
11091 return 0;
11092}
Ned Deily3eb67d52011-06-28 00:00:28 -070011093
Christian Heimesd0764e22007-12-04 15:00:33 +000011094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011095if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011096 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011097else
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11101 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011102fi
11103
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11107$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011108if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011110if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011111 ac_cv_have_chflags="yes"
11112else
11113 ac_cv_have_chflags="no"
11114fi
11115
11116fi
11117if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011118
Matthias Kloseb9621712010-04-24 17:59:49 +000011119$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011120
11121fi
11122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11124$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011125if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011127else
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011129 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011130else
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011132/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011133
Christian Heimesd0764e22007-12-04 15:00:33 +000011134#include <sys/stat.h>
11135#include <unistd.h>
11136int main(int argc, char*argv[])
11137{
11138 if(lchflags(argv[0], 0) != 0)
11139 return 1;
11140 return 0;
11141}
Ned Deily3eb67d52011-06-28 00:00:28 -070011142
Christian Heimesd0764e22007-12-04 15:00:33 +000011143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011145 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011146else
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011151fi
11152
11153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11156$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011157if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011159if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011160 ac_cv_have_lchflags="yes"
11161else
11162 ac_cv_have_lchflags="no"
11163fi
11164
11165fi
11166if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011169
11170fi
11171
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011172case $ac_sys_system/$ac_sys_release in
11173Darwin/*)
11174 _CUR_CFLAGS="${CFLAGS}"
11175 _CUR_LDFLAGS="${LDFLAGS}"
11176 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11177 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11178 ;;
11179esac
11180
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11182$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011184 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011185else
11186 ac_check_lib_save_LIBS=$LIBS
11187LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011189/* end confdefs.h. */
11190
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191/* Override any GCC internal prototype to avoid an error.
11192 Use char because int might match the return type of a GCC
11193 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011194#ifdef __cplusplus
11195extern "C"
11196#endif
11197char inflateCopy ();
11198int
11199main ()
11200{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011202 ;
11203 return 0;
11204}
11205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011207 ac_cv_lib_z_inflateCopy=yes
11208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011211rm -f core conftest.err conftest.$ac_objext \
11212 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011213LIBS=$ac_check_lib_save_LIBS
11214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11216$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011217if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011218
Matthias Kloseb9621712010-04-24 17:59:49 +000011219$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011220
11221fi
11222
11223
11224case $ac_sys_system/$ac_sys_release in
11225Darwin/*)
11226 CFLAGS="${_CUR_CFLAGS}"
11227 LDFLAGS="${_CUR_LDFLAGS}"
11228 ;;
11229esac
11230
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11232$as_echo_n "checking for hstrerror... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011235
Martin v. Löwise9416172003-05-03 10:12:45 +000011236#include <netdb.h>
11237
Martin v. Löwise9416172003-05-03 10:12:45 +000011238int
11239main ()
11240{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011241void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011242 ;
11243 return 0;
11244}
11245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011246if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011249
Matthias Kloseb159a552010-04-25 21:00:44 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011252else
Matthias Kloseb9621712010-04-24 17:59:49 +000011253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11254$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011255
11256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011257rm -f core conftest.err conftest.$ac_objext \
11258 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11261$as_echo_n "checking for inet_aton... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011264
Martin v. Löwis86d66262006-02-17 08:40:11 +000011265#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011266#include <sys/socket.h>
11267#include <netinet/in.h>
11268#include <arpa/inet.h>
11269
Martin v. Löwise9416172003-05-03 10:12:45 +000011270int
11271main ()
11272{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011273void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011274 ;
11275 return 0;
11276}
11277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011278if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011279
Matthias Kloseb9621712010-04-24 17:59:49 +000011280$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011281
Matthias Kloseb159a552010-04-25 21:00:44 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011283$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011284else
Matthias Kloseb9621712010-04-24 17:59:49 +000011285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11286$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011287
11288fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011289rm -f core conftest.err conftest.$ac_objext \
11290 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291
Matthias Kloseb9621712010-04-24 17:59:49 +000011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11293$as_echo_n "checking for inet_pton... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011295/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011296
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011297#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011298#include <sys/socket.h>
11299#include <netinet/in.h>
11300#include <arpa/inet.h>
11301
Martin v. Löwise9416172003-05-03 10:12:45 +000011302int
11303main ()
11304{
11305void* p = inet_pton
11306 ;
11307 return 0;
11308}
11309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011311
Matthias Kloseb9621712010-04-24 17:59:49 +000011312$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011313
Matthias Kloseb159a552010-04-25 21:00:44 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011315$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011316else
Matthias Kloseb9621712010-04-24 17:59:49 +000011317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11318$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011319
11320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011322
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011323# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11325$as_echo_n "checking for setgroups... " >&6; }
11326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011327/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011328
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011329#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011330#ifdef HAVE_GRP_H
11331#include <grp.h>
11332#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011333
Martin v. Löwisd5843682002-11-21 20:41:28 +000011334int
11335main ()
11336{
11337void* p = setgroups
11338 ;
11339 return 0;
11340}
11341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011343
Matthias Kloseb9621712010-04-24 17:59:49 +000011344$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011345
Matthias Kloseb159a552010-04-25 21:00:44 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011347$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011348else
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011351
11352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011355# check for openpty and forkpty
11356
11357for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011358do :
11359 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011360if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011361 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011362#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011363_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011365else
Matthias Kloseb9621712010-04-24 17:59:49 +000011366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11367$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011368if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011370else
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011372LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011376/* Override any GCC internal prototype to avoid an error.
11377 Use char because int might match the return type of a GCC
11378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011379#ifdef __cplusplus
11380extern "C"
11381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011382char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011383int
11384main ()
11385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 ;
11388 return 0;
11389}
11390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011391if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011393else
Matthias Kloseb9621712010-04-24 17:59:49 +000011394 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011396rm -f core conftest.err conftest.$ac_objext \
11397 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011398LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11401$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011402if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011404 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11407$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011408if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011410else
11411 ac_check_lib_save_LIBS=$LIBS
11412LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011414/* end confdefs.h. */
11415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416/* Override any GCC internal prototype to avoid an error.
11417 Use char because int might match the return type of a GCC
11418 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011419#ifdef __cplusplus
11420extern "C"
11421#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011422char openpty ();
11423int
11424main ()
11425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011427 ;
11428 return 0;
11429}
11430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011432 ac_cv_lib_bsd_openpty=yes
11433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011435fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011436rm -f core conftest.err conftest.$ac_objext \
11437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011438LIBS=$ac_check_lib_save_LIBS
11439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11441$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011442if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011443 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011444 LIBS="$LIBS -lbsd"
11445fi
11446
11447
11448fi
11449
Fred Drake8cef4cf2000-06-28 16:40:38 +000011450
11451fi
11452done
11453
11454for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011455do :
11456 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011457if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011459#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011460_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011461
Fred Drake8cef4cf2000-06-28 16:40:38 +000011462else
Matthias Kloseb9621712010-04-24 17:59:49 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11464$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011465if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011466 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467else
Martin v. Löwis11437992002-04-12 09:54:03 +000011468 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011469LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476#ifdef __cplusplus
11477extern "C"
11478#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011479char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011480int
11481main ()
11482{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011483return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490else
Matthias Kloseb9621712010-04-24 17:59:49 +000011491 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011493rm -f core conftest.err conftest.$ac_objext \
11494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011495LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11498$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011499if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011501 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11504$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011505if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011507else
11508 ac_check_lib_save_LIBS=$LIBS
11509LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011511/* end confdefs.h. */
11512
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513/* Override any GCC internal prototype to avoid an error.
11514 Use char because int might match the return type of a GCC
11515 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011516#ifdef __cplusplus
11517extern "C"
11518#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011519char forkpty ();
11520int
11521main ()
11522{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011524 ;
11525 return 0;
11526}
11527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011529 ac_cv_lib_bsd_forkpty=yes
11530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011533rm -f core conftest.err conftest.$ac_objext \
11534 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011535LIBS=$ac_check_lib_save_LIBS
11536fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11538$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011539if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011540 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011541 LIBS="$LIBS -lbsd"
11542fi
11543
11544
11545fi
11546
Fred Drake8cef4cf2000-06-28 16:40:38 +000011547
11548fi
11549done
11550
Jack Jansendd19cf82001-12-06 22:36:17 +000011551
Christian Heimesb186d002008-03-18 15:15:01 +000011552# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011553for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011554do :
11555 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011556if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011557 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011558#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011559_ACEOF
11560
11561fi
11562done
11563
11564
Michael W. Hudson54241132001-12-07 15:38:26 +000011565# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011566for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011567do :
11568 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11569ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011570if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011572#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011573_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011574
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011575fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011576done
11577
Michael W. Hudson54241132001-12-07 15:38:26 +000011578
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011579ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011580if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011581 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011582
Martin v. Löwis1142de32002-03-29 16:28:31 +000011583else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011584 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011585 *" dup2.$ac_objext "* ) ;;
11586 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011587 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011588esac
11589
Martin v. Löwis1142de32002-03-29 16:28:31 +000011590fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011591
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011592ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011593if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011594 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11595
11596else
11597 case " $LIBOBJS " in
11598 *" strdup.$ac_objext "* ) ;;
11599 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11600 ;;
11601esac
11602
11603fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011604
11605
11606for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011607do :
11608 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011609if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011614/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011615#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011616int
11617main ()
11618{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011619getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011620 ;
11621 return 0;
11622}
11623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011625
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011627
Guido van Rossum627b2d71993-12-24 10:39:16 +000011628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011630
Guido van Rossum627b2d71993-12-24 10:39:16 +000011631fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011632done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011633
Jack Jansen150753c2003-03-29 22:07:47 +000011634for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011635do :
11636 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011637if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011638 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011639#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011642/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011643#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011644int
11645main ()
11646{
11647setpgrp(0,0);
11648 ;
11649 return 0;
11650}
11651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011653
Matthias Kloseb9621712010-04-24 17:59:49 +000011654$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011655
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011658
11659fi
11660done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011661
Thomas Wouters3a584202000-08-05 23:28:51 +000011662for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011663do :
11664 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011665if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011666 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011670/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011671#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011672int
11673main ()
11674{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011675gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 ;
11677 return 0;
11678}
11679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011680if ac_fn_c_try_compile "$LINENO"; then :
11681
Guido van Rossum627b2d71993-12-24 10:39:16 +000011682else
Skip Montanaro6dead952003-09-25 14:50:04 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011685
Martin v. Löwis11437992002-04-12 09:54:03 +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 Rossum76be6ed1995-01-02 18:33:54 +000011690fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011691done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011692
Michael W. Hudson54241132001-12-07 15:38:26 +000011693
Victor Stinnere0be4232011-10-25 13:06:09 +020011694for ac_func in clock_gettime
11695do :
11696 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11697if test "x$ac_cv_func_clock_gettime" = xyes; then :
11698 cat >>confdefs.h <<_ACEOF
11699#define HAVE_CLOCK_GETTIME 1
11700_ACEOF
11701
11702else
11703
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11705$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11706if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11707 $as_echo_n "(cached) " >&6
11708else
11709 ac_check_lib_save_LIBS=$LIBS
11710LIBS="-lrt $LIBS"
11711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712/* end confdefs.h. */
11713
11714/* Override any GCC internal prototype to avoid an error.
11715 Use char because int might match the return type of a GCC
11716 builtin and then its argument prototype would still apply. */
11717#ifdef __cplusplus
11718extern "C"
11719#endif
11720char clock_gettime ();
11721int
11722main ()
11723{
11724return clock_gettime ();
11725 ;
11726 return 0;
11727}
11728_ACEOF
11729if ac_fn_c_try_link "$LINENO"; then :
11730 ac_cv_lib_rt_clock_gettime=yes
11731else
11732 ac_cv_lib_rt_clock_gettime=no
11733fi
11734rm -f core conftest.err conftest.$ac_objext \
11735 conftest$ac_exeext conftest.$ac_ext
11736LIBS=$ac_check_lib_save_LIBS
11737fi
11738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11739$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11740if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11741
11742 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11743
11744
11745$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11746
11747
11748fi
11749
11750
11751fi
11752done
11753
11754
11755for ac_func in clock_getres
11756do :
11757 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11758if test "x$ac_cv_func_clock_getres" = xyes; then :
11759 cat >>confdefs.h <<_ACEOF
11760#define HAVE_CLOCK_GETRES 1
11761_ACEOF
11762
11763else
11764
11765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11766$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11767if ${ac_cv_lib_rt_clock_getres+:} false; then :
11768 $as_echo_n "(cached) " >&6
11769else
11770 ac_check_lib_save_LIBS=$LIBS
11771LIBS="-lrt $LIBS"
11772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773/* end confdefs.h. */
11774
11775/* Override any GCC internal prototype to avoid an error.
11776 Use char because int might match the return type of a GCC
11777 builtin and then its argument prototype would still apply. */
11778#ifdef __cplusplus
11779extern "C"
11780#endif
11781char clock_getres ();
11782int
11783main ()
11784{
11785return clock_getres ();
11786 ;
11787 return 0;
11788}
11789_ACEOF
11790if ac_fn_c_try_link "$LINENO"; then :
11791 ac_cv_lib_rt_clock_getres=yes
11792else
11793 ac_cv_lib_rt_clock_getres=no
11794fi
11795rm -f core conftest.err conftest.$ac_objext \
11796 conftest$ac_exeext conftest.$ac_ext
11797LIBS=$ac_check_lib_save_LIBS
11798fi
11799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11800$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11801if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11802
11803 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11804
11805
11806fi
11807
11808
11809fi
11810done
11811
11812
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11814$as_echo_n "checking for major... " >&6; }
11815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011816/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011817
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011818#if defined(MAJOR_IN_MKDEV)
11819#include <sys/mkdev.h>
11820#elif defined(MAJOR_IN_SYSMACROS)
11821#include <sys/sysmacros.h>
11822#else
11823#include <sys/types.h>
11824#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011825
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011826int
11827main ()
11828{
11829
11830 makedev(major(0),minor(0));
11831
11832 ;
11833 return 0;
11834}
11835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011837
11838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11842$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011843
11844else
Skip Montanaro6dead952003-09-25 14:50:04 +000011845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11847$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011848
11849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011850rm -f core conftest.err conftest.$ac_objext \
11851 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011852
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011853# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011854# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11856$as_echo_n "checking for getaddrinfo... " >&6; }
11857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011858/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011859
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011860#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011861#include <sys/socket.h>
11862#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011863#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864
Martin v. Löwis11437992002-04-12 09:54:03 +000011865int
11866main ()
11867{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011868getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 ;
11870 return 0;
11871}
11872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011873if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011874 have_getaddrinfo=yes
11875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011878rm -f core conftest.err conftest.$ac_objext \
11879 conftest$ac_exeext conftest.$ac_ext
11880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11881$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011882if test $have_getaddrinfo = yes
11883then
Matthias Kloseb9621712010-04-24 17:59:49 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11885$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011888else
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011890
11891if test "${enable_ipv6+set}" = set; then
11892 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11893else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011894 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011895fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011898/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011899
Stefan Krah19c21392012-11-22 23:47:32 +010011900#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011901#include <sys/types.h>
11902#include <netdb.h>
11903#include <string.h>
11904#include <sys/socket.h>
11905#include <netinet/in.h>
11906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011907int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011908{
11909 int passive, gaierr, inet4 = 0, inet6 = 0;
11910 struct addrinfo hints, *ai, *aitop;
11911 char straddr[INET6_ADDRSTRLEN], strport[16];
11912
11913 for (passive = 0; passive <= 1; passive++) {
11914 memset(&hints, 0, sizeof(hints));
11915 hints.ai_family = AF_UNSPEC;
11916 hints.ai_flags = passive ? AI_PASSIVE : 0;
11917 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011918 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011919 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11920 (void)gai_strerror(gaierr);
11921 goto bad;
11922 }
11923 for (ai = aitop; ai; ai = ai->ai_next) {
11924 if (ai->ai_addr == NULL ||
11925 ai->ai_addrlen == 0 ||
11926 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11927 straddr, sizeof(straddr), strport, sizeof(strport),
11928 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11929 goto bad;
11930 }
11931 switch (ai->ai_family) {
11932 case AF_INET:
11933 if (strcmp(strport, "54321") != 0) {
11934 goto bad;
11935 }
11936 if (passive) {
11937 if (strcmp(straddr, "0.0.0.0") != 0) {
11938 goto bad;
11939 }
11940 } else {
11941 if (strcmp(straddr, "127.0.0.1") != 0) {
11942 goto bad;
11943 }
11944 }
11945 inet4++;
11946 break;
11947 case AF_INET6:
11948 if (strcmp(strport, "54321") != 0) {
11949 goto bad;
11950 }
11951 if (passive) {
11952 if (strcmp(straddr, "::") != 0) {
11953 goto bad;
11954 }
11955 } else {
11956 if (strcmp(straddr, "::1") != 0) {
11957 goto bad;
11958 }
11959 }
11960 inet6++;
11961 break;
11962 case AF_UNSPEC:
11963 goto bad;
11964 break;
11965 default:
11966 /* another family support? */
11967 break;
11968 }
11969 }
11970 }
11971
11972 if (!(inet4 == 0 || inet4 == 2))
11973 goto bad;
11974 if (!(inet6 == 0 || inet6 == 2))
11975 goto bad;
11976
11977 if (aitop)
11978 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011979 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011980
11981 bad:
11982 if (aitop)
11983 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011984 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011985}
11986
Martin v. Löwis11437992002-04-12 09:54:03 +000011987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011988if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011989 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011997fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011998
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012000
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12002$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12003
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012004if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012005then
12006 if test $ipv6 = yes
12007 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012008 echo 'Fatal: You must get working getaddrinfo() function.'
12009 echo ' or you can specify "--disable-ipv6"'.
12010 exit 1
12011 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012012else
Martin v. Löwis11437992002-04-12 09:54:03 +000012013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012015
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012016fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012017
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012018for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012019do :
12020 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012021if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012023#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012024_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012025
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012026fi
12027done
12028
Michael W. Hudson54241132001-12-07 15:38:26 +000012029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12032$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012033if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012034 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012037/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038#include <sys/types.h>
12039#include <sys/time.h>
12040#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Martin v. Löwis11437992002-04-12 09:54:03 +000012042int
12043main ()
12044{
12045if ((struct tm *) 0)
12046return 0;
12047 ;
12048 return 0;
12049}
12050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012051if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012052 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012053else
Matthias Kloseb9621712010-04-24 17:59:49 +000012054 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12059$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012060if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012063
12064fi
12065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12067$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012068if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012069 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012070else
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012073#include <sys/types.h>
12074#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076int
12077main ()
12078{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079struct tm tm;
12080 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 ;
12083 return 0;
12084}
12085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087 ac_cv_struct_tm=time.h
12088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12094$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012095if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012096
Matthias Kloseb9621712010-04-24 17:59:49 +000012097$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012098
12099fi
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101ac_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 +000012102#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104"
Victor Stinnere0be4232011-10-25 13:06:09 +020012105if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012106
12107cat >>confdefs.h <<_ACEOF
12108#define HAVE_STRUCT_TM_TM_ZONE 1
12109_ACEOF
12110
12111
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012112fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012113
Martin v. Löwis11437992002-04-12 09:54:03 +000012114if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117
12118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12120"
Victor Stinnere0be4232011-10-25 13:06:09 +020012121if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012122 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125fi
12126
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012128#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129_ACEOF
12130
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12132$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012133if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012137/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012138#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012139#if !HAVE_DECL_TZNAME
12140extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Martin v. Löwis11437992002-04-12 09:54:03 +000012143int
12144main ()
12145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012146return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ;
12148 return 0;
12149}
12150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012151if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152 ac_cv_var_tzname=yes
12153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156rm -f core conftest.err conftest.$ac_objext \
12157 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12160$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012161 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012164
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012165 fi
12166fi
12167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168ac_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 +020012169if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012170
12171cat >>confdefs.h <<_ACEOF
12172#define HAVE_STRUCT_STAT_ST_RDEV 1
12173_ACEOF
12174
12175
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012176fi
12177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178ac_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 +020012179if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012180
Martin v. Löwis11437992002-04-12 09:54:03 +000012181cat >>confdefs.h <<_ACEOF
12182#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12183_ACEOF
12184
12185
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012186fi
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188ac_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 +020012189if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012190
12191cat >>confdefs.h <<_ACEOF
12192#define HAVE_STRUCT_STAT_ST_FLAGS 1
12193_ACEOF
12194
12195
12196fi
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198ac_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 +020012199if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012200
12201cat >>confdefs.h <<_ACEOF
12202#define HAVE_STRUCT_STAT_ST_GEN 1
12203_ACEOF
12204
12205
12206fi
12207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208ac_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 +020012209if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012210
12211cat >>confdefs.h <<_ACEOF
12212#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12213_ACEOF
12214
12215
12216fi
12217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218ac_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 +020012219if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221cat >>confdefs.h <<_ACEOF
12222#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12223_ACEOF
12224
12225
Matthias Kloseb9621712010-04-24 17:59:49 +000012226$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012227
12228else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012229 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012230 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012233esac
12234
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012235fi
12236
Michael W. Hudson54241132001-12-07 15:38:26 +000012237
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12240$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012241if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012243else
Matthias Kloseb159a552010-04-25 21:00:44 +000012244
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012246/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012247#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012248int
12249main ()
12250{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 ;
12253 return 0;
12254}
12255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012257 ac_cv_header_time_altzone=yes
12258else
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263fi
12264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12266$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270
12271fi
12272
Guido van Rossumda88dad1995-01-26 00:46:29 +000012273was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12275$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012277/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012278
12279#include <sys/types.h>
12280#include <sys/select.h>
12281#include <sys/time.h>
12282
Martin v. Löwis11437992002-04-12 09:54:03 +000012283int
12284main ()
12285{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012286;
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
12293
Matthias Kloseb9621712010-04-24 17:59:49 +000012294$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012295
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012296 was_it_defined=yes
12297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12301$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302
Matthias Kloseb9621712010-04-24 17:59:49 +000012303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12304$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012305if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012307else
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012309/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012310#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012311int
12312main ()
12313{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 ;
12316 return 0;
12317}
12318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320 ac_cv_struct_addrinfo=yes
12321else
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12325fi
12326
Matthias Kloseb9621712010-04-24 17:59:49 +000012327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12328$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012329if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012332
12333fi
12334
Matthias Kloseb9621712010-04-24 17:59:49 +000012335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12336$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012339else
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012341/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012342
12343# include <sys/types.h>
12344# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012345int
12346main ()
12347{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012348struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 ;
12350 return 0;
12351}
12352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012354 ac_cv_struct_sockaddr_storage=yes
12355else
Matthias Kloseb9621712010-04-24 17:59:49 +000012356 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12359fi
12360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12362$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012366
12367fi
12368
Guido van Rossum627b2d71993-12-24 10:39:16 +000012369# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012370
Matthias Kloseb9621712010-04-24 17:59:49 +000012371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12372$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012373if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012375else
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012377/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012378$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012379int
12380main ()
12381{
12382static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012383test_array [0] = 0;
12384return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012385
12386 ;
12387 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012388}
Martin v. Löwis11437992002-04-12 09:54:03 +000012389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012391 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012392else
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12398$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012400 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401
12402fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012403
Matthias Kloseb9621712010-04-24 17:59:49 +000012404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12405$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012406if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012410/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411
Martin v. Löwis11437992002-04-12 09:54:03 +000012412int
12413main ()
12414{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012415
Martin v. Löwis11437992002-04-12 09:54:03 +000012416#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012417 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012419 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 char const *const *pcpcc;
12422 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 /* NEC SVR4.0.2 mips cc rejects this. */
12424 struct point {int x, y;};
12425 static struct point const zero = {0,0};
12426 /* AIX XL C 1.02.0.0 rejects this.
12427 It does not let you subtract one const X* pointer from another in
12428 an arm of an if-expression whose if-part is not a constant
12429 expression */
12430 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 ++pcpcc;
12434 ppc = (char**) pcpcc;
12435 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012436 { /* SCO 3.2v4 cc rejects this sort of thing. */
12437 char tx;
12438 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 }
12444 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12445 int x[] = {25, 17};
12446 const int *foo = &x[0];
12447 ++foo;
12448 }
12449 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12450 typedef const int *iptr;
12451 iptr p = 0;
12452 ++p;
12453 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012454 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012456 struct s { int j; const int *ap[3]; } bx;
12457 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 }
12459 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12460 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012461 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012464#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012465
Martin v. Löwis11437992002-04-12 09:54:03 +000012466 ;
12467 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012468}
Martin v. Löwis11437992002-04-12 09:54:03 +000012469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471 ac_cv_c_const=yes
12472else
Matthias Kloseb9621712010-04-24 17:59:49 +000012473 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12478$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482
12483fi
12484
Michael W. Hudson54241132001-12-07 15:38:26 +000012485
Guido van Rossumda88dad1995-01-26 00:46:29 +000012486works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12488$as_echo_n "checking for working volatile... " >&6; }
12489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012490/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492int
12493main ()
12494{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012495volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012500if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012501 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012502else
Skip Montanaro6dead952003-09-25 14:50:04 +000012503
Matthias Kloseb9621712010-04-24 17:59:49 +000012504$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012506
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12510$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012511
Guido van Rossumda88dad1995-01-26 00:46:29 +000012512works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12514$as_echo_n "checking for working signed char... " >&6; }
12515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012516/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518int
12519main ()
12520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012521signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 ;
12523 return 0;
12524}
12525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012526if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012527 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012528else
Skip Montanaro6dead952003-09-25 14:50:04 +000012529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012531
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012532
Guido van Rossum7f43da71994-08-01 12:15:30 +000012533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12536$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012537
Guido van Rossumda88dad1995-01-26 00:46:29 +000012538have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12540$as_echo_n "checking for prototypes... " >&6; }
12541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012543int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012547return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012548 ;
12549 return 0;
12550}
12551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012553
Matthias Kloseb9621712010-04-24 17:59:49 +000012554$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Matthias Kloseb159a552010-04-25 21:00:44 +000012556 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12560$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561
Guido van Rossumda88dad1995-01-26 00:46:29 +000012562works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12564$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012566/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012567
12568#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012569int foo(int x, ...) {
12570 va_list va;
12571 va_start(va, x);
12572 va_arg(va, int);
12573 va_arg(va, char *);
12574 va_arg(va, double);
12575 return 0;
12576}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012577
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Guido van Rossum90eea071996-08-30 20:58:57 +000012581return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 ;
12583 return 0;
12584}
12585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
12588
Matthias Kloseb9621712010-04-24 17:59:49 +000012589$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012591 works=yes
12592
Guido van Rossum627b2d71993-12-24 10:39:16 +000012593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12596$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012597
Martin v. Löwisd6320502004-08-12 13:45:08 +000012598# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12600$as_echo_n "checking for socketpair... " >&6; }
12601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012602/* end confdefs.h. */
12603
12604#include <sys/types.h>
12605#include <sys/socket.h>
12606
12607int
12608main ()
12609{
12610void *x=socketpair
12611 ;
12612 return 0;
12613}
12614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012618
Matthias Kloseb159a552010-04-25 21:00:44 +000012619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012620$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012621else
Matthias Kloseb9621712010-04-24 17:59:49 +000012622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12623$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012624
12625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012627
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12630$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012632/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633#include <sys/types.h>
12634#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012635int
12636main ()
12637{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638struct sockaddr x;
12639x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 ;
12641 return 0;
12642}
12643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012644if ac_fn_c_try_compile "$LINENO"; then :
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12646$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
Matthias Kloseb9621712010-04-24 17:59:49 +000012648$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012649
12650else
Matthias Kloseb9621712010-04-24 17:59:49 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012653
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656
Guido van Rossumda88dad1995-01-26 00:46:29 +000012657va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12659$as_echo_n "checking whether va_list is an array... " >&6; }
12660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012661/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662
12663#ifdef HAVE_STDARG_PROTOTYPES
12664#include <stdarg.h>
12665#else
12666#include <varargs.h>
12667#endif
12668
Martin v. Löwis11437992002-04-12 09:54:03 +000012669int
12670main ()
12671{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012673 ;
12674 return 0;
12675}
12676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677if ac_fn_c_try_compile "$LINENO"; then :
12678
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679else
Skip Montanaro6dead952003-09-25 14:50:04 +000012680
Martin v. Löwis11437992002-04-12 09:54:03 +000012681
Matthias Kloseb9621712010-04-24 17:59:49 +000012682$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
Guido van Rossumda88dad1995-01-26 00:46:29 +000012684 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012685
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12689$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012692
12693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012695if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12700$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012701 OLD_CFLAGS=$CFLAGS
12702 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012704/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012705
12706# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012711
12712 char *name;
12713 struct hostent *he, *res;
12714 char buffer[2048];
12715 int buflen = 2048;
12716 int h_errnop;
12717
12718 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012719
12720 ;
12721 return 0;
12722}
12723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012727
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Matthias Kloseb9621712010-04-24 17:59:49 +000012729$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12732$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734else
Skip Montanaro6dead952003-09-25 14:50:04 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
12738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12739$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012741/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012743# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012744
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012748
12749 char *name;
12750 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012751 char buffer[2048];
12752 int buflen = 2048;
12753 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012754
Matthias Kloseb159a552010-04-25 21:00:44 +000012755 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
12757 ;
12758 return 0;
12759}
12760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012764
Martin v. Löwis11437992002-04-12 09:54:03 +000012765
Matthias Kloseb159a552010-04-25 21:00:44 +000012766$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12769$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012771else
Skip Montanaro6dead952003-09-25 14:50:04 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12774$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12776$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12778/* end confdefs.h. */
12779
12780# include <netdb.h>
12781
12782int
12783main ()
12784{
12785
12786 char *name;
12787 struct hostent *he;
12788 struct hostent_data data;
12789
12790 (void) gethostbyname_r(name, he, &data);
12791
12792 ;
12793 return 0;
12794}
12795_ACEOF
12796if ac_fn_c_try_compile "$LINENO"; then :
12797
12798 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12799
12800
12801$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12802
12803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12804$as_echo "yes" >&6; }
12805
12806else
12807
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12809$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012810
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012813
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012819 CFLAGS=$OLD_CFLAGS
12820
12821else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 for ac_func in gethostbyname
12824do :
12825 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012826if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012828#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012829_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012830
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012831fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012832done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012833
Michael W. Hudson54241132001-12-07 15:38:26 +000012834
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012835fi
12836
Michael W. Hudson54241132001-12-07 15:38:26 +000012837
12838
12839
12840
12841
12842
Guido van Rossum627b2d71993-12-24 10:39:16 +000012843# checks for system services
12844# (none yet)
12845
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012847ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012848if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012849
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012850else
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12852$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012853if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855else
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012857LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012861/* Override any GCC internal prototype to avoid an error.
12862 Use char because int might match the return type of a GCC
12863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012864#ifdef __cplusplus
12865extern "C"
12866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012867char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012871return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012872 ;
12873 return 0;
12874}
12875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012878else
Matthias Kloseb9621712010-04-24 17:59:49 +000012879 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012881rm -f core conftest.err conftest.$ac_objext \
12882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012883LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12886$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012887if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 cat >>confdefs.h <<_ACEOF
12889#define HAVE_LIBIEEE 1
12890_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012891
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012892 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893
Guido van Rossum627b2d71993-12-24 10:39:16 +000012894fi
12895
Michael W. Hudson54241132001-12-07 15:38:26 +000012896
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012897fi
12898
Michael W. Hudson54241132001-12-07 15:38:26 +000012899
Guido van Rossum7f253911997-05-09 02:42:48 +000012900# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12902$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012904# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012905if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012907if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012908then
12909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12913$as_echo "yes" >&6; }
12914else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12915$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012916fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920fi
12921
Guido van Rossum7f253911997-05-09 02:42:48 +000012922
Guido van Rossum7f43da71994-08-01 12:15:30 +000012923# check for --with-libm=...
12924
Guido van Rossum563e7081996-09-10 18:20:48 +000012925case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012926Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012927*) LIBM=-lm
12928esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12930$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012932# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012933if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012935if test "$withval" = no
12936then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12938$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012939elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012940then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12942$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012943else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012944fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012945else
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12947$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948fi
12949
Guido van Rossum7f43da71994-08-01 12:15:30 +000012950
12951# check for --with-libc=...
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12954$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012959if test "$withval" = no
12960then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12962$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012963elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012964then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12966$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012967else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012968fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012969else
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12971$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972fi
12973
Guido van Rossum7f43da71994-08-01 12:15:30 +000012974
Stefan Krah1919b7e2012-03-21 18:25:23 +010012975# **************************************
12976# * Check for gcc x64 inline assembler *
12977# **************************************
12978
12979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12980$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12982/* end confdefs.h. */
12983
12984int
12985main ()
12986{
12987
12988 __asm__ __volatile__ ("movq %rcx, %rax");
12989
12990 ;
12991 return 0;
12992}
12993_ACEOF
12994if ac_fn_c_try_compile "$LINENO"; then :
12995 have_gcc_asm_for_x64=yes
12996else
12997 have_gcc_asm_for_x64=no
12998fi
12999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13001$as_echo "$have_gcc_asm_for_x64" >&6; }
13002if test "$have_gcc_asm_for_x64" = yes
13003then
13004
13005$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13006
13007fi
13008
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013009# **************************************************
13010# * Check for various properties of floating point *
13011# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13014$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013015if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013017else
13018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013020 ac_cv_little_endian_double=no
13021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013023/* end confdefs.h. */
13024
13025#include <string.h>
13026int main() {
13027 double x = 9006104071832581.0;
13028 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13029 return 0;
13030 else
13031 return 1;
13032}
13033
13034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013036 ac_cv_little_endian_double=yes
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013040rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13041 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013042fi
13043
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013044fi
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13047$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013048if test "$ac_cv_little_endian_double" = yes
13049then
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013052
13053fi
13054
Matthias Kloseb9621712010-04-24 17:59:49 +000013055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13056$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013057if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013059else
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013062 ac_cv_big_endian_double=no
13063else
Matthias Kloseb9621712010-04-24 17:59:49 +000013064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013065/* end confdefs.h. */
13066
13067#include <string.h>
13068int main() {
13069 double x = 9006104071832581.0;
13070 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13071 return 0;
13072 else
13073 return 1;
13074}
13075
13076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013077if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013078 ac_cv_big_endian_double=yes
13079else
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13083 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013084fi
13085
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013086fi
13087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13089$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013090if test "$ac_cv_big_endian_double" = yes
13091then
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013094
13095fi
13096
13097# Some ARM platforms use a mixed-endian representation for doubles.
13098# While Python doesn't currently have full support for these platforms
13099# (see e.g., issue 1762561), we can at least make sure that float <-> string
13100# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13102$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013103if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013105else
13106
Matthias Kloseb9621712010-04-24 17:59:49 +000013107if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013108 ac_cv_mixed_endian_double=no
13109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013111/* end confdefs.h. */
13112
13113#include <string.h>
13114int main() {
13115 double x = 9006104071832581.0;
13116 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13117 return 0;
13118 else
13119 return 1;
13120}
13121
13122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013123if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013124 ac_cv_mixed_endian_double=yes
13125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013130fi
13131
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013132fi
13133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13135$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013136if test "$ac_cv_mixed_endian_double" = yes
13137then
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013140
13141fi
13142
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013143# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013144# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013145# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013146# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013147# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013148# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013149
13150# This inline assembler syntax may also work for suncc and icc,
13151# so we try it on all platforms.
13152
Matthias Kloseb9621712010-04-24 17:59:49 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13154$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013156/* end confdefs.h. */
13157
13158int
13159main ()
13160{
13161
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013162 unsigned short cw;
13163 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13164 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013165
13166 ;
13167 return 0;
13168}
13169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013170if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013171 have_gcc_asm_for_x87=yes
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013174fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13177$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013178if test "$have_gcc_asm_for_x87" = yes
13179then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013182
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013185# Detect whether system arithmetic is subject to x87-style double
13186# rounding issues. The result of this test has little meaning on non
13187# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13188# mode is round-to-nearest and double rounding issues are present, and
13189# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13191$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013192# $BASECFLAGS may affect the result
13193ac_save_cc="$CC"
13194CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013195if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013196 ac_cv_x87_double_rounding=no
13197else
Matthias Kloseb9621712010-04-24 17:59:49 +000013198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013199/* end confdefs.h. */
13200
13201#include <stdlib.h>
13202#include <math.h>
13203int main() {
13204 volatile double x, y, z;
13205 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13206 x = 0.99999999999999989; /* 1-2**-53 */
13207 y = 1./x;
13208 if (y != 1.)
13209 exit(0);
13210 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13211 x = 1e16;
13212 y = 2.99999;
13213 z = x + y;
13214 if (z != 1e16+4.)
13215 exit(0);
13216 /* both tests show evidence of double rounding */
13217 exit(1);
13218}
13219
13220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013221if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013222 ac_cv_x87_double_rounding=no
13223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013228fi
13229
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013230CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13232$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013233if test "$ac_cv_x87_double_rounding" = yes
13234then
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013237
13238fi
13239
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013240# ************************************
13241# * Check for mathematical functions *
13242# ************************************
13243
13244LIBS_SAVE=$LIBS
13245LIBS="$LIBS $LIBM"
13246
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013247for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13248do :
13249 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13250ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013251if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013252 cat >>confdefs.h <<_ACEOF
13253#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13254_ACEOF
13255
13256fi
13257done
13258
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013259for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013260do :
13261 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13262ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013263if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013264 cat >>confdefs.h <<_ACEOF
13265#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13266_ACEOF
13267
13268fi
13269done
13270
13271ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13272"
Victor Stinnere0be4232011-10-25 13:06:09 +020013273if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013274 ac_have_decl=1
13275else
13276 ac_have_decl=0
13277fi
13278
13279cat >>confdefs.h <<_ACEOF
13280#define HAVE_DECL_ISINF $ac_have_decl
13281_ACEOF
13282ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13283"
Victor Stinnere0be4232011-10-25 13:06:09 +020013284if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013285 ac_have_decl=1
13286else
13287 ac_have_decl=0
13288fi
13289
13290cat >>confdefs.h <<_ACEOF
13291#define HAVE_DECL_ISNAN $ac_have_decl
13292_ACEOF
13293ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13294"
Victor Stinnere0be4232011-10-25 13:06:09 +020013295if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013296 ac_have_decl=1
13297else
13298 ac_have_decl=0
13299fi
13300
13301cat >>confdefs.h <<_ACEOF
13302#define HAVE_DECL_ISFINITE $ac_have_decl
13303_ACEOF
13304
13305
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013306# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13307# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13309$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013312else
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013315 ac_cv_tanh_preserves_zero_sign=no
13316else
Matthias Kloseb9621712010-04-24 17:59:49 +000013317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013318/* end confdefs.h. */
13319
13320#include <math.h>
13321#include <stdlib.h>
13322int main() {
13323 /* return 0 if either negative zeros don't exist
13324 on this platform or if negative zeros exist
13325 and tanh(-0.) == -0. */
13326 if (atan2(0., -1.) == atan2(-0., -1.) ||
13327 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13328 else exit(1);
13329}
13330
13331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013332if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013333 ac_cv_tanh_preserves_zero_sign=yes
13334else
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013336fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13338 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013339fi
13340
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013341fi
13342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13344$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013345if test "$ac_cv_tanh_preserves_zero_sign" = yes
13346then
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013349
13350fi
13351
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013352if test "$ac_cv_func_log1p" = yes
13353then
13354 # On some versions of AIX, log1p(-0.) returns 0. instead of
13355 # -0. See issue #9920.
13356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13357$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013358 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013359 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013360else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013361
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013362 if test "$cross_compiling" = yes; then :
13363 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013364else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13366/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013367
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013368 #include <math.h>
13369 #include <stdlib.h>
13370 int main() {
13371 /* Fail if the signs of log1p(-0.) and -0. can be
13372 distinguished. */
13373 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13374 return 0;
13375 else
13376 return 1;
13377 }
13378
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013379_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013380if ac_fn_c_try_run "$LINENO"; then :
13381 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013382else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013383 ac_cv_log1p_drops_zero_sign=yes
13384fi
13385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13386 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013387fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013388
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013389fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013390
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13392$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13393fi
13394if test "$ac_cv_log1p_drops_zero_sign" = yes
13395then
13396
13397$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13398
13399fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013400
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013401LIBS=$LIBS_SAVE
13402
Mark Dickinsona614f042009-11-28 12:48:43 +000013403# For multiprocessing module, check that sem_open
13404# actually works. For FreeBSD versions <= 7.2,
13405# the kernel module that provides POSIX semaphores
13406# isn't loaded by default, so an attempt to call
13407# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13409$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013410if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013414 ac_cv_posix_semaphores_enabled=yes
13415else
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013417/* end confdefs.h. */
13418
13419#include <unistd.h>
13420#include <fcntl.h>
13421#include <stdio.h>
13422#include <semaphore.h>
13423#include <sys/stat.h>
13424
13425int main(void) {
13426 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13427 if (a == SEM_FAILED) {
13428 perror("sem_open");
13429 return 1;
13430 }
13431 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013432 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013433 return 0;
13434}
13435
13436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013437if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013438 ac_cv_posix_semaphores_enabled=yes
13439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013444fi
13445
13446
Mark Dickinsona614f042009-11-28 12:48:43 +000013447fi
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13450$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013451if test $ac_cv_posix_semaphores_enabled = no
13452then
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013455
13456fi
13457
Mark Dickinson10683072009-04-18 21:18:19 +000013458# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13460$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013461if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013463else
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013466else
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013468/* end confdefs.h. */
13469
13470#include <unistd.h>
13471#include <fcntl.h>
13472#include <stdio.h>
13473#include <semaphore.h>
13474#include <sys/stat.h>
13475
13476int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013477 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013478 int count;
13479 int res;
13480 if(a==SEM_FAILED){
13481 perror("sem_open");
13482 return 1;
13483
13484 }
13485 res = sem_getvalue(a, &count);
13486 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013487 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013488 return res==-1 ? 1 : 0;
13489}
13490
Mark Dickinson10683072009-04-18 21:18:19 +000013491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013492if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013493 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013494else
Matthias Kloseb9621712010-04-24 17:59:49 +000013495 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013496fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013499fi
13500
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013501
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013502fi
13503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13505$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013506if test $ac_cv_broken_sem_getvalue = yes
13507then
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013510
13511fi
13512
Mark Dickinsonbd792642009-03-18 20:06:12 +000013513# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13515$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013516# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013518 enableval=$enable_big_digits; case $enable_big_digits in
13519yes)
13520 enable_big_digits=30 ;;
13521no)
13522 enable_big_digits=15 ;;
1352315|30)
13524 ;;
13525*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013526 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 +000013527esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13529$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013530
13531cat >>confdefs.h <<_ACEOF
13532#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13533_ACEOF
13534
13535
13536else
Matthias Kloseb9621712010-04-24 17:59:49 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13538$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013539fi
13540
13541
Guido van Rossumef2255b2000-03-10 22:30:29 +000013542# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013543ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013544if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013549 wchar_h="yes"
13550
Guido van Rossumef2255b2000-03-10 22:30:29 +000013551else
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013553
13554fi
13555
Michael W. Hudson54241132001-12-07 15:38:26 +000013556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013558# determine wchar_t size
13559if test "$wchar_h" = yes
13560then
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13564# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13566$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013567if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013569else
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13571"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Martin v. Löwis11437992002-04-12 09:54:03 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 if test "$ac_cv_type_wchar_t" = yes; then
13575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013577as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013578See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579 else
13580 ac_cv_sizeof_wchar_t=0
13581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13586$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587
13588
13589
Martin v. Löwis11437992002-04-12 09:54:03 +000013590cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013591#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013592_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013593
Michael W. Hudson54241132001-12-07 15:38:26 +000013594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13598$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013599have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013601/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013602
13603#include <tcl.h>
13604#if TCL_UTF_MAX != 6
13605# error "NOT UCS4_TCL"
13606#endif
13607int
13608main ()
13609{
13610
13611 ;
13612 return 0;
13613}
13614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013616
13617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013619
13620 have_ucs4_tcl=yes
13621
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13625$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013626
Skip Montanaro6dead952003-09-25 14:50:04 +000013627# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013628if test "$wchar_h" = yes
13629then
13630 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13632$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013633 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013635else
13636
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013638 ac_cv_wchar_t_signed=yes
13639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013641/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013642
13643 #include <wchar.h>
13644 int main()
13645 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013646 /* Success: exit code 0 */
13647 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013648 }
13649
13650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013652 ac_cv_wchar_t_signed=yes
13653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013658fi
13659
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013660fi
13661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13663$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013664fi
13665
Georg Brandl52d168a2008-01-07 18:10:24 +000013666# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013667if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013668 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013669then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013670 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013671
Matthias Kloseb9621712010-04-24 17:59:49 +000013672$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013673
Georg Brandl52d168a2008-01-07 18:10:24 +000013674else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013675 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013676fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13678$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013679
13680# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13682$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013683if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013685else
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 ac_cv_c_bigendian=unknown
13687 # See if we're dealing with a universal compiler.
13688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13689/* end confdefs.h. */
13690#ifndef __APPLE_CC__
13691 not a universal capable compiler
13692 #endif
13693 typedef int dummy;
13694
Skip Montanaro6dead952003-09-25 14:50:04 +000013695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if ac_fn_c_try_compile "$LINENO"; then :
13697
13698 # Check for potential -arch flags. It is not universal unless
13699 # there are at least two -arch flags with different values.
13700 ac_arch=
13701 ac_prev=
13702 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13703 if test -n "$ac_prev"; then
13704 case $ac_word in
13705 i?86 | x86_64 | ppc | ppc64)
13706 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13707 ac_arch=$ac_word
13708 else
13709 ac_cv_c_bigendian=universal
13710 break
13711 fi
13712 ;;
13713 esac
13714 ac_prev=
13715 elif test "x$ac_word" = "x-arch"; then
13716 ac_prev=arch
13717 fi
13718 done
13719fi
13720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13721 if test $ac_cv_c_bigendian = unknown; then
13722 # See if sys/param.h defines the BYTE_ORDER macro.
13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013725#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013726 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013727
Martin v. Löwis11437992002-04-12 09:54:03 +000013728int
13729main ()
13730{
Matthias Kloseb9621712010-04-24 17:59:49 +000013731#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13732 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13733 && LITTLE_ENDIAN)
13734 bogus endian macros
13735 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
13737 ;
13738 return 0;
13739}
13740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013742 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013744/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013745#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013747
Martin v. Löwis11437992002-04-12 09:54:03 +000013748int
13749main ()
13750{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013751#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013752 not big endian
13753 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
13755 ;
13756 return 0;
13757}
13758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013759if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013760 ac_cv_c_bigendian=yes
13761else
Matthias Kloseb9621712010-04-24 17:59:49 +000013762 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013765fi
13766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13767 fi
13768 if test $ac_cv_c_bigendian = unknown; then
13769 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013771/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013772#include <limits.h>
13773
Martin v. Löwis11437992002-04-12 09:54:03 +000013774int
13775main ()
13776{
Matthias Kloseb9621712010-04-24 17:59:49 +000013777#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13778 bogus endian macros
13779 #endif
13780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ;
13782 return 0;
13783}
13784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013785if ac_fn_c_try_compile "$LINENO"; then :
13786 # It does; now see whether it defined to _BIG_ENDIAN or not.
13787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13788/* end confdefs.h. */
13789#include <limits.h>
13790
13791int
13792main ()
13793{
13794#ifndef _BIG_ENDIAN
13795 not big endian
13796 #endif
13797
13798 ;
13799 return 0;
13800}
13801_ACEOF
13802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013804else
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13808fi
13809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13810 fi
13811 if test $ac_cv_c_bigendian = unknown; then
13812 # Compile a test program.
13813 if test "$cross_compiling" = yes; then :
13814 # Try to guess by grepping values from an object file.
13815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13816/* end confdefs.h. */
13817short int ascii_mm[] =
13818 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13819 short int ascii_ii[] =
13820 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13821 int use_ascii (int i) {
13822 return ascii_mm[i] + ascii_ii[i];
13823 }
13824 short int ebcdic_ii[] =
13825 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13826 short int ebcdic_mm[] =
13827 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13828 int use_ebcdic (int i) {
13829 return ebcdic_mm[i] + ebcdic_ii[i];
13830 }
13831 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833int
13834main ()
13835{
13836return use_ascii (foo) == use_ebcdic (foo);
13837 ;
13838 return 0;
13839}
13840_ACEOF
13841if ac_fn_c_try_compile "$LINENO"; then :
13842 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13843 ac_cv_c_bigendian=yes
13844 fi
13845 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13846 if test "$ac_cv_c_bigendian" = unknown; then
13847 ac_cv_c_bigendian=no
13848 else
13849 # finding both strings is unlikely to happen, but who knows?
13850 ac_cv_c_bigendian=unknown
13851 fi
13852 fi
13853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013857/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013859int
13860main ()
13861{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 /* Are we little or big endian? From Harbison&Steele. */
13864 union
13865 {
13866 long int l;
13867 char c[sizeof (long int)];
13868 } u;
13869 u.l = 1;
13870 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871
13872 ;
13873 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013874}
Martin v. Löwis11437992002-04-12 09:54:03 +000013875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013876if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013877 ac_cv_c_bigendian=no
13878else
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13888$as_echo "$ac_cv_c_bigendian" >&6; }
13889 case $ac_cv_c_bigendian in #(
13890 yes)
13891 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13892;; #(
13893 no)
13894 ;; #(
13895 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899 ;; #(
13900 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013901 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013902 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013904
Michael W. Hudson54241132001-12-07 15:38:26 +000013905
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013906# ABI version string for Python extension modules. This appears between the
13907# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13908# from the following attributes which affect the ABI of this Python build (in
13909# this order):
13910#
13911# * The Python implementation (always 'cpython-' for us)
13912# * The major and minor version numbers
13913# * --with-pydebug (adds a 'd')
13914# * --with-pymalloc (adds a 'm')
13915# * --with-wide-unicode (adds a 'u')
13916#
13917# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013918# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13919# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013920
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13922$as_echo_n "checking ABIFLAGS... " >&6; }
13923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13924$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13926$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013927SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13929$as_echo "$SOABI" >&6; }
13930
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013931
13932case $ac_sys_system in
13933 Linux*|GNU*)
13934 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13935 *)
13936 EXT_SUFFIX=${SHLIB_SUFFIX};;
13937esac
13938
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13940$as_echo_n "checking LDVERSION... " >&6; }
13941LDVERSION='$(VERSION)$(ABIFLAGS)'
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13943$as_echo "$LDVERSION" >&6; }
13944
doko@python.org87421192013-01-26 11:39:31 +010013945
13946LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13947
13948
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013949# Check whether right shifting a negative integer extends the sign bit
13950# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13952$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013953if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013955else
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013958 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013959else
Matthias Kloseb9621712010-04-24 17:59:49 +000013960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013961/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013962
13963int main()
13964{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013965 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013966}
13967
Martin v. Löwis11437992002-04-12 09:54:03 +000013968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013969if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013970 ac_cv_rshift_extends_sign=yes
13971else
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013974rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13975 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013976fi
13977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978fi
13979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13981$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013982if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013983then
Martin v. Löwis11437992002-04-12 09:54:03 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013986
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013987fi
13988
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013989# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13991$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013992if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013993 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013994else
Martin v. Löwis11437992002-04-12 09:54:03 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013997/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013998#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013999int
14000main ()
14001{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014002
14003 FILE *f = fopen("/dev/null", "r");
14004 flockfile(f);
14005 getc_unlocked(f);
14006 funlockfile(f);
14007
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 ;
14009 return 0;
14010}
14011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014012if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014013 ac_cv_have_getc_unlocked=yes
14014else
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 ac_cv_have_getc_unlocked=no
14016fi
14017rm -f core conftest.err conftest.$ac_objext \
14018 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020
Matthias Kloseb9621712010-04-24 17:59:49 +000014021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14022$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014023if test "$ac_cv_have_getc_unlocked" = yes
14024then
Martin v. Löwis11437992002-04-12 09:54:03 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014027
14028fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014029
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014030# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014031# save the value of LIBS so we don't actually link Python with readline
14032LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014033
Gregory P. Smith18820942008-09-07 06:24:49 +000014034# On some systems we need to link readline to a termcap compatible
14035# library. NOTE: Keep the precedence of listed libraries synchronised
14036# with setup.py.
14037py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14039$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014040for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014041 if test -z "$py_libtermcap"; then
14042 READLINE_LIBS="-lreadline"
14043 else
14044 READLINE_LIBS="-lreadline -l$py_libtermcap"
14045 fi
14046 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014048/* end confdefs.h. */
14049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050/* Override any GCC internal prototype to avoid an error.
14051 Use char because int might match the return type of a GCC
14052 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014053#ifdef __cplusplus
14054extern "C"
14055#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014056char readline ();
14057int
14058main ()
14059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014065if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014066 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014068rm -f core conftest.err conftest.$ac_objext \
14069 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014070 if test $py_cv_lib_readline = yes; then
14071 break
14072 fi
14073done
14074# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14075#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014076if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14078$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14081$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014084
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014085fi
14086
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14089$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014090if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092else
14093 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014094LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014096/* end confdefs.h. */
14097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014098/* Override any GCC internal prototype to avoid an error.
14099 Use char because int might match the return type of a GCC
14100 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101#ifdef __cplusplus
14102extern "C"
14103#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104char rl_callback_handler_install ();
14105int
14106main ()
14107{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014108return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014109 ;
14110 return 0;
14111}
14112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014113if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014114 ac_cv_lib_readline_rl_callback_handler_install=yes
14115else
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014118rm -f core conftest.err conftest.$ac_objext \
14119 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014120LIBS=$ac_check_lib_save_LIBS
14121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14123$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014124if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014125
Matthias Kloseb9621712010-04-24 17:59:49 +000014126$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014127
14128fi
14129
14130
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014131# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014133/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014134#include <readline/readline.h>
14135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014136if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014137 have_readline=yes
14138else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014139 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014140
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014141fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014142rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014143if test $have_readline = yes
14144then
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014146/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014147#include <readline/readline.h>
14148
14149_ACEOF
14150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014154
14155fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014156rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014159/* end confdefs.h. */
14160#include <readline/readline.h>
14161
14162_ACEOF
14163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014167
14168fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014169rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014170
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014171fi
14172
Martin v. Löwis0daad592001-09-30 21:09:59 +000014173# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14175$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014176if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014178else
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014180LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184/* Override any GCC internal prototype to avoid an error.
14185 Use char because int might match the return type of a GCC
14186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014187#ifdef __cplusplus
14188extern "C"
14189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014190char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014191int
14192main ()
14193{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 ;
14196 return 0;
14197}
14198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014199if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014201else
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014204rm -f core conftest.err conftest.$ac_objext \
14205 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014206LIBS=$ac_check_lib_save_LIBS
14207fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14209$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014210if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014211
Matthias Kloseb9621712010-04-24 17:59:49 +000014212$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014213
Martin v. Löwis0daad592001-09-30 21:09:59 +000014214fi
14215
Michael W. Hudson54241132001-12-07 15:38:26 +000014216
Thomas Wouters89d996e2007-09-08 17:39:28 +000014217# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14219$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014220if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014222else
14223 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014224LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014226/* end confdefs.h. */
14227
14228/* Override any GCC internal prototype to avoid an error.
14229 Use char because int might match the return type of a GCC
14230 builtin and then its argument prototype would still apply. */
14231#ifdef __cplusplus
14232extern "C"
14233#endif
14234char rl_completion_display_matches_hook ();
14235int
14236main ()
14237{
14238return rl_completion_display_matches_hook ();
14239 ;
14240 return 0;
14241}
14242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014244 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14245else
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014247fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014248rm -f core conftest.err conftest.$ac_objext \
14249 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014250LIBS=$ac_check_lib_save_LIBS
14251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14253$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014254if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014257
14258fi
14259
14260
Martin v. Löwis0daad592001-09-30 21:09:59 +000014261# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14263$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014264if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014266else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014268LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272/* Override any GCC internal prototype to avoid an error.
14273 Use char because int might match the return type of a GCC
14274 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014275#ifdef __cplusplus
14276extern "C"
14277#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014278char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014279int
14280main ()
14281{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014283 ;
14284 return 0;
14285}
14286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014287if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014289else
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014292rm -f core conftest.err conftest.$ac_objext \
14293 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014294LIBS=$ac_check_lib_save_LIBS
14295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14297$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014298if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014301
Guido van Rossum353ae582001-07-10 16:45:32 +000014302fi
14303
Jack Jansendd19cf82001-12-06 22:36:17 +000014304
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014305# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014307/* end confdefs.h. */
14308#include <readline/readline.h>
14309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014310if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014311 have_readline=yes
14312else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014313 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014314
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014315fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014316rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317if test $have_readline = yes
14318then
Matthias Kloseb9621712010-04-24 17:59:49 +000014319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014320/* end confdefs.h. */
14321#include <readline/readline.h>
14322
14323_ACEOF
14324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014328
14329fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014330rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014331
14332fi
14333
Martin v. Löwis82bca632006-02-10 20:49:30 +000014334# End of readline checks: restore LIBS
14335LIBS=$LIBS_no_readline
14336
Matthias Kloseb9621712010-04-24 17:59:49 +000014337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14338$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014339if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014340 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014341else
Martin v. Löwis11437992002-04-12 09:54:03 +000014342
Matthias Kloseb9621712010-04-24 17:59:49 +000014343if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014344 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014345else
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014347/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014348
14349int main()
14350{
14351 int val1 = nice(1);
14352 if (val1 != -1 && val1 == nice(2))
14353 exit(0);
14354 exit(1);
14355}
14356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014359 ac_cv_broken_nice=yes
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014365fi
14366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367fi
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14370$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014371if test "$ac_cv_broken_nice" = yes
14372then
Martin v. Löwis11437992002-04-12 09:54:03 +000014373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014375
14376fi
14377
Matthias Kloseb9621712010-04-24 17:59:49 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14379$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014380if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014381 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014384 ac_cv_broken_poll=no
14385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014387/* end confdefs.h. */
14388
14389#include <poll.h>
14390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014391int main()
14392{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014393 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014394 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014395
14396 close (42);
14397
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014398 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014399 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014400 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014401 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014402 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014403 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014404 return 1;
14405}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014406
14407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014409 ac_cv_broken_poll=yes
14410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014416
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014417fi
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14420$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014421if test "$ac_cv_broken_poll" = yes
14422then
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014425
14426fi
14427
Brett Cannon43802422005-02-10 20:48:03 +000014428# 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 +000014429# (which is not required by ISO C or UNIX spec) and/or if we support
14430# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014431ac_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 +000014432#include <$ac_cv_struct_tm>
14433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434"
Victor Stinnere0be4232011-10-25 13:06:09 +020014435if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014436
14437cat >>confdefs.h <<_ACEOF
14438#define HAVE_STRUCT_TM_TM_ZONE 1
14439_ACEOF
14440
14441
14442fi
14443
14444if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014447
14448else
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14450"
Victor Stinnere0be4232011-10-25 13:06:09 +020014451if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014452 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455fi
14456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014458#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459_ACEOF
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14462$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014463if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014464 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014465else
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014467/* end confdefs.h. */
14468#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469#if !HAVE_DECL_TZNAME
14470extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014471#endif
14472
14473int
14474main ()
14475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014477 ;
14478 return 0;
14479}
14480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014481if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014482 ac_cv_var_tzname=yes
14483else
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014486rm -f core conftest.err conftest.$ac_objext \
14487 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14490$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014491 if test $ac_cv_var_tzname = yes; then
14492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014494
14495 fi
14496fi
14497
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014498
Martin v. Löwis1d459062005-03-14 21:23:33 +000014499# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14501$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014502if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014504else
14505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014507 ac_cv_working_tzset=no
14508else
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014510/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014511
14512#include <stdlib.h>
14513#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014514#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014515
14516#if HAVE_TZNAME
14517extern char *tzname[];
14518#endif
14519
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014520int main()
14521{
Brett Cannon18367812003-09-19 00:59:16 +000014522 /* Note that we need to ensure that not only does tzset(3)
14523 do 'something' with localtime, but it works as documented
14524 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014525 This includes making sure that tzname is set properly if
14526 tm->tm_zone does not exist since it is the alternative way
14527 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014528
14529 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014530 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014531 */
14532
Martin v. Löwis1d459062005-03-14 21:23:33 +000014533 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014534 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14535
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014536 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014537 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014538 if (localtime(&groundhogday)->tm_hour != 0)
14539 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014540#if HAVE_TZNAME
14541 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14542 if (strcmp(tzname[0], "UTC") ||
14543 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14544 exit(1);
14545#endif
Brett Cannon18367812003-09-19 00:59:16 +000014546
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014547 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014548 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014549 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014550 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014551#if HAVE_TZNAME
14552 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14553 exit(1);
14554#endif
Brett Cannon18367812003-09-19 00:59:16 +000014555
14556 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14557 tzset();
14558 if (localtime(&groundhogday)->tm_hour != 11)
14559 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014560#if HAVE_TZNAME
14561 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14562 exit(1);
14563#endif
14564
14565#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014566 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14567 exit(1);
14568 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14569 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014570#endif
Brett Cannon18367812003-09-19 00:59:16 +000014571
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014572 exit(0);
14573}
14574
14575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014576if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014577 ac_cv_working_tzset=yes
14578else
Matthias Kloseb9621712010-04-24 17:59:49 +000014579 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014580fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014583fi
14584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014585fi
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14588$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014589if test "$ac_cv_working_tzset" = yes
14590then
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014593
14594fi
14595
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014596# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14598$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014599if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014603/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014604#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014605int
14606main ()
14607{
14608
14609struct stat st;
14610st.st_mtim.tv_nsec = 1;
14611
14612 ;
14613 return 0;
14614}
14615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014617 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014618else
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14622fi
14623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14625$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014626if test "$ac_cv_stat_tv_nsec" = yes
14627then
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014630
14631fi
14632
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014633# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14635$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014636if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014640/* end confdefs.h. */
14641#include <sys/stat.h>
14642int
14643main ()
14644{
14645
14646struct stat st;
14647st.st_mtimespec.tv_nsec = 1;
14648
14649 ;
14650 return 0;
14651}
14652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014654 ac_cv_stat_tv_nsec2=yes
14655else
Matthias Kloseb9621712010-04-24 17:59:49 +000014656 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14659fi
14660
Matthias Kloseb9621712010-04-24 17:59:49 +000014661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14662$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014663if test "$ac_cv_stat_tv_nsec2" = yes
14664then
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014667
14668fi
14669
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014670# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014671ac_save_cppflags="$CPPFLAGS"
14672CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014673
14674for ac_header in curses.h ncurses.h
14675do :
14676 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14677ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14678if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14679 cat >>confdefs.h <<_ACEOF
14680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14681_ACEOF
14682
14683fi
14684
14685done
14686
14687
14688# On Solaris, term.h requires curses.h
14689for ac_header in term.h
14690do :
14691 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14692#ifdef HAVE_CURSES_H
14693#include <curses.h>
14694#endif
14695
14696"
14697if test "x$ac_cv_header_term_h" = xyes; then :
14698 cat >>confdefs.h <<_ACEOF
14699#define HAVE_TERM_H 1
14700_ACEOF
14701
14702fi
14703
14704done
14705
14706
Jack Jansen666b1e72001-10-31 12:11:48 +000014707# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14709$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014710if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014712else
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014714/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014715#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014716int
14717main ()
14718{
Jack Jansen666b1e72001-10-31 12:11:48 +000014719
14720 int rtn;
14721 rtn = mvwdelch(0,0,0);
14722
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 ;
14724 return 0;
14725}
14726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014727if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014728 ac_cv_mvwdelch_is_expression=yes
14729else
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014731fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14733fi
14734
Matthias Kloseb9621712010-04-24 17:59:49 +000014735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14736$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014737
14738if test "$ac_cv_mvwdelch_is_expression" = yes
14739then
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Matthias Kloseb9621712010-04-24 17:59:49 +000014741$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014742
14743fi
14744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14746$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014747if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014749else
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014752#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014753int
14754main ()
14755{
Jack Jansen666b1e72001-10-31 12:11:48 +000014756
14757 WINDOW *w;
14758 w->_flags = 0;
14759
Martin v. Löwis11437992002-04-12 09:54:03 +000014760 ;
14761 return 0;
14762}
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014765 ac_cv_window_has_flags=yes
14766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14770fi
14771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14773$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014774
Jack Jansen666b1e72001-10-31 12:11:48 +000014775
14776if test "$ac_cv_window_has_flags" = yes
14777then
Martin v. Löwis11437992002-04-12 09:54:03 +000014778
Matthias Kloseb9621712010-04-24 17:59:49 +000014779$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014780
14781fi
14782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14784$as_echo_n "checking for is_term_resized... " >&6; }
14785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014786/* end confdefs.h. */
14787#include <curses.h>
14788int
14789main ()
14790{
14791void *x=is_term_resized
14792 ;
14793 return 0;
14794}
14795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014796if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014799
Matthias Kloseb159a552010-04-25 21:00:44 +000014800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014801$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014802else
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14804$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014805
14806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14810$as_echo_n "checking for resize_term... " >&6; }
14811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014812/* end confdefs.h. */
14813#include <curses.h>
14814int
14815main ()
14816{
14817void *x=resize_term
14818 ;
14819 return 0;
14820}
14821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014822if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014825
Matthias Kloseb159a552010-04-25 21:00:44 +000014826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014827$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14830$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014831
14832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14834
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14836$as_echo_n "checking for resizeterm... " >&6; }
14837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014838/* end confdefs.h. */
14839#include <curses.h>
14840int
14841main ()
14842{
14843void *x=resizeterm
14844 ;
14845 return 0;
14846}
14847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014848if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014851
Matthias Kloseb159a552010-04-25 21:00:44 +000014852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014853$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014854else
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14856$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014857
14858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014860# last curses configure check
14861CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14864$as_echo "$as_me: checking for device files" >&6;}
14865
14866if test "x$cross_compiling" = xyes; then
14867 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14869$as_echo_n "checking for /dev/ptmx... " >&6; }
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14871$as_echo "not set" >&6; }
14872 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14873 fi
14874 if test "${ac_cv_file__dev_ptc+set}" != set; then
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14876$as_echo_n "checking for /dev/ptc... " >&6; }
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14878$as_echo "not set" >&6; }
14879 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14880 fi
14881fi
14882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14884$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014885if ${ac_cv_file__dev_ptmx+:} false; then :
14886 $as_echo_n "(cached) " >&6
14887else
14888 test "$cross_compiling" = yes &&
14889 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14890if test -r "/dev/ptmx"; then
14891 ac_cv_file__dev_ptmx=yes
14892else
14893 ac_cv_file__dev_ptmx=no
14894fi
14895fi
14896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14897$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14898if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014899
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014900fi
14901
14902if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014903
Matthias Kloseb9621712010-04-24 17:59:49 +000014904$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014905
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14908$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014909if ${ac_cv_file__dev_ptc+:} false; then :
14910 $as_echo_n "(cached) " >&6
14911else
14912 test "$cross_compiling" = yes &&
14913 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14914if test -r "/dev/ptc"; then
14915 ac_cv_file__dev_ptc=yes
14916else
14917 ac_cv_file__dev_ptc=no
14918fi
14919fi
14920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14921$as_echo "$ac_cv_file__dev_ptc" >&6; }
14922if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014923
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014924fi
14925
14926if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014927
Matthias Kloseb9621712010-04-24 17:59:49 +000014928$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014929
Neal Norwitz865400f2003-03-21 01:42:58 +000014930fi
14931
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014932if test "$have_long_long" = yes
14933then
Matthias Kloseb9621712010-04-24 17:59:49 +000014934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14935$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014938else
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014940 ac_cv_have_long_long_format="cross -- assuming no"
14941 if test x$GCC = xyes; then
14942 save_CFLAGS=$CFLAGS
14943 CFLAGS="$CFLAGS -Werror -Wformat"
14944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14945/* end confdefs.h. */
14946
14947 #include <stdio.h>
14948 #include <stddef.h>
14949
14950int
14951main ()
14952{
14953
14954 char *buffer;
14955 sprintf(buffer, "%lld", (long long)123);
14956 sprintf(buffer, "%lld", (long long)-123);
14957 sprintf(buffer, "%llu", (unsigned long long)123);
14958
14959 ;
14960 return 0;
14961}
14962_ACEOF
14963if ac_fn_c_try_compile "$LINENO"; then :
14964 ac_cv_have_long_long_format=yes
14965
14966fi
14967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14968 CFLAGS=$save_CFLAGS
14969 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014970else
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014972/* end confdefs.h. */
14973
14974 #include <stdio.h>
14975 #include <stddef.h>
14976 #include <string.h>
14977
14978 #ifdef HAVE_SYS_TYPES_H
14979 #include <sys/types.h>
14980 #endif
14981
14982 int main()
14983 {
14984 char buffer[256];
14985
14986 if (sprintf(buffer, "%lld", (long long)123) < 0)
14987 return 1;
14988 if (strcmp(buffer, "123"))
14989 return 1;
14990
14991 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14992 return 1;
14993 if (strcmp(buffer, "-123"))
14994 return 1;
14995
14996 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14997 return 1;
14998 if (strcmp(buffer, "123"))
14999 return 1;
15000
15001 return 0;
15002 }
15003
15004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015005if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015006 ac_cv_have_long_long_format=yes
15007else
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015009fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015012fi
15013
15014
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015015fi
15016
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15018$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015019fi
15020
Mark Dickinson89d7d412009-12-31 20:50:59 +000015021if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015022then
15023
Matthias Kloseb9621712010-04-24 17:59:49 +000015024$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015025
15026fi
15027
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015028if test $ac_sys_system = Darwin
15029then
15030 LIBS="$LIBS -framework CoreFoundation"
15031fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15034$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015035if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015036 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015037else
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015039 ac_cv_have_size_t_format="cross -- assuming yes"
15040
Thomas Wouters477c8d52006-05-27 19:21:47 +000015041else
Matthias Kloseb9621712010-04-24 17:59:49 +000015042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015043/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015044
Thomas Wouters477c8d52006-05-27 19:21:47 +000015045#include <stdio.h>
15046#include <stddef.h>
15047#include <string.h>
15048
Christian Heimes2c181612007-12-17 20:04:13 +000015049#ifdef HAVE_SYS_TYPES_H
15050#include <sys/types.h>
15051#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015052
15053#ifdef HAVE_SSIZE_T
15054typedef ssize_t Py_ssize_t;
15055#elif SIZEOF_VOID_P == SIZEOF_LONG
15056typedef long Py_ssize_t;
15057#else
15058typedef int Py_ssize_t;
15059#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015060
Christian Heimes2c181612007-12-17 20:04:13 +000015061int main()
15062{
15063 char buffer[256];
15064
Thomas Wouters477c8d52006-05-27 19:21:47 +000015065 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15066 return 1;
15067
Thomas Wouters89f507f2006-12-13 04:49:30 +000015068 if (strcmp(buffer, "123"))
15069 return 1;
15070
15071 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15072 return 1;
15073
15074 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015075 return 1;
15076
15077 return 0;
15078}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015079
Thomas Wouters477c8d52006-05-27 19:21:47 +000015080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015081if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015082 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015083else
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15087 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015088fi
15089
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15092$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015093if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015096
15097fi
15098
Matthias Kloseb9621712010-04-24 17:59:49 +000015099ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015100#ifdef HAVE_SYS_TYPES_H
15101#include <sys/types.h>
15102#endif
15103#ifdef HAVE_SYS_SOCKET_H
15104#include <sys/socket.h>
15105#endif
15106
Matthias Kloseb9621712010-04-24 17:59:49 +000015107"
Victor Stinnere0be4232011-10-25 13:06:09 +020015108if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015109
Martin v. Löwis11437992002-04-12 09:54:03 +000015110else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015113
15114fi
15115
Michael W. Hudson54241132001-12-07 15:38:26 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15118$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015119if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015123 ac_cv_broken_mbstowcs=no
15124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015126/* end confdefs.h. */
15127
Stefan Krah19c21392012-11-22 23:47:32 +010015128#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015129#include<stdlib.h>
15130int main() {
15131 size_t len = -1;
15132 const char *str = "text";
15133 len = mbstowcs(NULL, str, 0);
15134 return (len != 4);
15135}
15136
15137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015138if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015139 ac_cv_broken_mbstowcs=no
15140else
Matthias Kloseb9621712010-04-24 17:59:49 +000015141 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015142fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15144 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015145fi
15146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015147fi
15148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15150$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015151if test "$ac_cv_broken_mbstowcs" = yes
15152then
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015155
15156fi
15157
Antoine Pitroub52ec782009-01-25 16:34:23 +000015158# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15160$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015161
15162# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015163if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015164 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015165if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015166then
15167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15171$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015172fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015173if test "$withval" = no
15174then
15175
15176$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15179$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015180fi
15181
Antoine Pitrou042b1282010-08-13 21:15:58 +000015182else
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15184$as_echo "no value specified" >&6; }
15185fi
15186
Antoine Pitroub52ec782009-01-25 16:34:23 +000015187
Matthias Kloseb17289e2012-03-15 19:51:34 +010015188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15189$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15190if ${ac_cv_computed_gotos+:} false; then :
15191 $as_echo_n "(cached) " >&6
15192else
15193 if test "$cross_compiling" = yes; then :
15194 if test "${with_computed_gotos+set}" = set; then
15195 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15196 else
15197 ac_cv_computed_gotos=no
15198 fi
15199else
15200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15201/* end confdefs.h. */
15202
15203int main(int argc, char **argv)
15204{
15205 static void *targets[1] = { &&LABEL1 };
15206 goto LABEL2;
15207LABEL1:
15208 return 0;
15209LABEL2:
15210 goto *targets[0];
15211 return 1;
15212}
15213
15214_ACEOF
15215if ac_fn_c_try_run "$LINENO"; then :
15216 ac_cv_computed_gotos=yes
15217else
15218 ac_cv_computed_gotos=no
15219fi
15220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15221 conftest.$ac_objext conftest.beam conftest.$ac_ext
15222fi
15223
15224fi
15225
15226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15227$as_echo "$ac_cv_computed_gotos" >&6; }
15228case "$ac_cv_computed_gotos" in yes*)
15229
15230$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15231
15232esac
15233
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015234case $ac_sys_system in
15235AIX*)
15236
15237$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15238 ;;
15239esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015240
Michael W. Hudson54241132001-12-07 15:38:26 +000015241
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015242
15243
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015244for h in `(cd $srcdir;echo Python/thread_*.h)`
15245do
15246 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15247done
15248
Michael W. Hudson54241132001-12-07 15:38:26 +000015249
Neal Norwitzd24499d2005-12-18 21:36:39 +000015250SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15252$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015253for dir in $SRCDIRS; do
15254 if test ! -d $dir; then
15255 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015256 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015257done
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15259$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015260
Stefan Krah1919b7e2012-03-21 18:25:23 +010015261# Availability of -O2:
15262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15263$as_echo_n "checking for -O2... " >&6; }
15264saved_cflags="$CFLAGS"
15265CFLAGS="-O2"
15266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15267/* end confdefs.h. */
15268
15269int
15270main ()
15271{
15272
15273
15274 ;
15275 return 0;
15276}
15277_ACEOF
15278if ac_fn_c_try_compile "$LINENO"; then :
15279 have_O2=yes
15280else
15281 have_O2=no
15282fi
15283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15285$as_echo "$have_O2" >&6; }
15286CFLAGS="$saved_cflags"
15287
15288# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15289# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15291$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15292saved_cflags="$CFLAGS"
15293CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15294if test "$have_O2" = no; then
15295 CFLAGS=""
15296fi
15297if test "$cross_compiling" = yes; then :
15298 have_glibc_memmove_bug=undefined
15299else
15300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301/* end confdefs.h. */
15302
15303#include <stdio.h>
15304#include <stdlib.h>
15305#include <string.h>
15306void foo(void *p, void *q) { memmove(p, q, 19); }
15307int main() {
15308 char a[32] = "123456789000000000";
15309 foo(&a[9], a);
15310 if (strcmp(a, "123456789123456789000000000") != 0)
15311 return 1;
15312 foo(a, &a[9]);
15313 if (strcmp(a, "123456789000000000") != 0)
15314 return 1;
15315 return 0;
15316}
15317
15318_ACEOF
15319if ac_fn_c_try_run "$LINENO"; then :
15320 have_glibc_memmove_bug=no
15321else
15322 have_glibc_memmove_bug=yes
15323fi
15324rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15325 conftest.$ac_objext conftest.beam conftest.$ac_ext
15326fi
15327
15328CFLAGS="$saved_cflags"
15329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15330$as_echo "$have_glibc_memmove_bug" >&6; }
15331if test "$have_glibc_memmove_bug" = yes; then
15332
15333$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15334
15335fi
15336
15337if test "$have_gcc_asm_for_x87" = yes; then
15338 # Some versions of gcc miscompile inline asm:
15339 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15340 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15341 case $CC in
15342 *gcc*)
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15344$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15345 saved_cflags="$CFLAGS"
15346 CFLAGS="-O2"
15347 if test "$cross_compiling" = yes; then :
15348 have_ipa_pure_const_bug=undefined
15349else
15350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15351/* end confdefs.h. */
15352
15353 __attribute__((noinline)) int
15354 foo(int *p) {
15355 int r;
15356 asm ( "movl \$6, (%1)\n\t"
15357 "xorl %0, %0\n\t"
15358 : "=r" (r) : "r" (p) : "memory"
15359 );
15360 return r;
15361 }
15362 int main() {
15363 int p = 8;
15364 if ((foo(&p) ? : p) != 6)
15365 return 1;
15366 return 0;
15367 }
15368
15369_ACEOF
15370if ac_fn_c_try_run "$LINENO"; then :
15371 have_ipa_pure_const_bug=no
15372else
15373 have_ipa_pure_const_bug=yes
15374fi
15375rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15376 conftest.$ac_objext conftest.beam conftest.$ac_ext
15377fi
15378
15379 CFLAGS="$saved_cflags"
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15381$as_echo "$have_ipa_pure_const_bug" >&6; }
15382 if test "$have_ipa_pure_const_bug" = yes; then
15383
15384$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15385
15386 fi
15387 ;;
15388 esac
15389fi
15390
Ned Deily322f5ba2013-11-21 23:01:59 -080015391# ensurepip option
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15393$as_echo_n "checking for ensurepip... " >&6; }
15394
15395# Check whether --with-ensurepip was given.
15396if test "${with_ensurepip+set}" = set; then :
15397 withval=$with_ensurepip;
15398else
15399 with_ensurepip=upgrade
15400fi
15401
15402case $with_ensurepip in #(
15403 yes|upgrade) :
15404 ENSUREPIP=upgrade ;; #(
15405 install) :
15406 ENSUREPIP=install ;; #(
15407 no) :
15408 ENSUREPIP=no ;; #(
15409 *) :
15410 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15411esac
15412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15413$as_echo "$ENSUREPIP" >&6; }
15414
15415
Guido van Rossum627b2d71993-12-24 10:39:16 +000015416# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015417ac_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 +000015418
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015419ac_config_files="$ac_config_files Modules/ld_so_aix"
15420
Martin v. Löwis11437992002-04-12 09:54:03 +000015421cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015422# This file is a shell script that caches the results of configure
15423# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015424# scripts and configure runs, see configure's option --config-cache.
15425# It is not useful on other systems. If it contains results you don't
15426# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015427#
Martin v. Löwis11437992002-04-12 09:54:03 +000015428# config.status only pays attention to the cache file if you give it
15429# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015430#
Skip Montanaro6dead952003-09-25 14:50:04 +000015431# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015432# loading this file, other *unset* `ac_cv_foo' will be assigned the
15433# following values.
15434
15435_ACEOF
15436
Guido van Rossumf78abae1997-01-21 22:02:36 +000015437# The following way of writing the cache mishandles newlines in values,
15438# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015440# Ultrix sh set writes to stderr and can't be redirected directly,
15441# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442(
15443 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15444 eval ac_val=\$$ac_var
15445 case $ac_val in #(
15446 *${as_nl}*)
15447 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15449$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015450 esac
15451 case $ac_var in #(
15452 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15454 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455 esac ;;
15456 esac
15457 done
15458
Martin v. Löwis11437992002-04-12 09:54:03 +000015459 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15461 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 # `set' does not quote correctly, so add quotes: double-quote
15463 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015465 "s/'/'\\\\''/g;
15466 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015467 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 *)
15469 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472 esac |
15473 sort
15474) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15480 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015481 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15482 :end' >>confcache
15483if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15484 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015485 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015486 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15487$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015488 if test ! -f "$cache_file" || test -h "$cache_file"; then
15489 cat confcache >"$cache_file"
15490 else
15491 case $cache_file in #(
15492 */* | ?:*)
15493 mv -f confcache "$cache_file"$$ &&
15494 mv -f "$cache_file"$$ "$cache_file" ;; #(
15495 *)
15496 mv -f confcache "$cache_file" ;;
15497 esac
15498 fi
15499 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015500 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15502$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015503 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015504fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015505rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015506
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015507test "x$prefix" = xNONE && prefix=$ac_default_prefix
15508# Let make expand exec_prefix.
15509test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015511DEFS=-DHAVE_CONFIG_H
15512
Skip Montanaro6dead952003-09-25 14:50:04 +000015513ac_libobjs=
15514ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015515U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015516for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15517 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15521 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15523 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015524done
15525LIBOBJS=$ac_libobjs
15526
15527LTLIBOBJS=$ac_ltlibobjs
15528
15529
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
Matthias Kloseb9621712010-04-24 17:59:49 +000015531
Victor Stinnere0be4232011-10-25 13:06:09 +020015532: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015533ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015534ac_clean_files_save=$ac_clean_files
15535ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15537$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15538as_write_fail=0
15539cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015540#! $SHELL
15541# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015542# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015543# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015544# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015547ac_cs_recheck=false
15548ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550SHELL=\${CONFIG_SHELL-$SHELL}
15551export SHELL
15552_ASEOF
15553cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15554## -------------------- ##
15555## M4sh Initialization. ##
15556## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015558# Be more Bourne compatible
15559DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015560if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 emulate sh
15562 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015564 # is contrary to our usage. Disable this feature.
15565 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015566 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015567else
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 case `(set -o) 2>/dev/null` in #(
15569 *posix*) :
15570 set -o posix ;; #(
15571 *) :
15572 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015574fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015575
15576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577as_nl='
15578'
15579export as_nl
15580# Printing a long string crashes Solaris 7 /usr/bin/printf.
15581as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15582as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15583as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15584# Prefer a ksh shell builtin over an external printf program on Solaris,
15585# but without wasting forks for bash or zsh.
15586if test -z "$BASH_VERSION$ZSH_VERSION" \
15587 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15588 as_echo='print -r --'
15589 as_echo_n='print -rn --'
15590elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15591 as_echo='printf %s\n'
15592 as_echo_n='printf %s'
15593else
15594 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15595 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15596 as_echo_n='/usr/ucb/echo -n'
15597 else
15598 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15599 as_echo_n_body='eval
15600 arg=$1;
15601 case $arg in #(
15602 *"$as_nl"*)
15603 expr "X$arg" : "X\\(.*\\)$as_nl";
15604 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15605 esac;
15606 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15607 '
15608 export as_echo_n_body
15609 as_echo_n='sh -c $as_echo_n_body as_echo'
15610 fi
15611 export as_echo_body
15612 as_echo='sh -c $as_echo_body as_echo'
15613fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615# The user is always right.
15616if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015617 PATH_SEPARATOR=:
15618 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15619 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15620 PATH_SEPARATOR=';'
15621 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015622fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624
15625# IFS
15626# We need space, tab and new line, in precisely that order. Quoting is
15627# there to prevent editors from complaining about space-tab.
15628# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15629# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630IFS=" "" $as_nl"
15631
15632# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015633as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015634case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635 *[\\/]* ) as_myself=$0 ;;
15636 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015637for as_dir in $PATH
15638do
15639 IFS=$as_save_IFS
15640 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645 ;;
15646esac
15647# We did not find ourselves, most probably we were run as `sh COMMAND'
15648# in which case we are not to be found in the path.
15649if test "x$as_myself" = x; then
15650 as_myself=$0
15651fi
15652if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15654 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655fi
15656
Matthias Kloseb9621712010-04-24 17:59:49 +000015657# Unset variables that we do not need and which cause bugs (e.g. in
15658# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15659# suppresses any "Segmentation fault" message there. '((' could
15660# trigger a bug in pdksh 5.2.14.
15661for as_var in BASH_ENV ENV MAIL MAILPATH
15662do eval test x\${$as_var+set} = xset \
15663 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664done
15665PS1='$ '
15666PS2='> '
15667PS4='+ '
15668
15669# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015670LC_ALL=C
15671export LC_ALL
15672LANGUAGE=C
15673export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015674
Matthias Kloseb9621712010-04-24 17:59:49 +000015675# CDPATH.
15676(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15677
15678
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015679# as_fn_error STATUS ERROR [LINENO LOG_FD]
15680# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015681# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15682# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015683# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015684as_fn_error ()
15685{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015686 as_status=$1; test $as_status -eq 0 && as_status=1
15687 if test "$4"; then
15688 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15689 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015691 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 as_fn_exit $as_status
15693} # as_fn_error
15694
15695
15696# as_fn_set_status STATUS
15697# -----------------------
15698# Set $? to STATUS, without forking.
15699as_fn_set_status ()
15700{
15701 return $1
15702} # as_fn_set_status
15703
15704# as_fn_exit STATUS
15705# -----------------
15706# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15707as_fn_exit ()
15708{
15709 set +e
15710 as_fn_set_status $1
15711 exit $1
15712} # as_fn_exit
15713
15714# as_fn_unset VAR
15715# ---------------
15716# Portably unset VAR.
15717as_fn_unset ()
15718{
15719 { eval $1=; unset $1;}
15720}
15721as_unset=as_fn_unset
15722# as_fn_append VAR VALUE
15723# ----------------------
15724# Append the text in VALUE to the end of the definition contained in VAR. Take
15725# advantage of any shell optimizations that allow amortized linear growth over
15726# repeated appends, instead of the typical quadratic growth present in naive
15727# implementations.
15728if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15729 eval 'as_fn_append ()
15730 {
15731 eval $1+=\$2
15732 }'
15733else
15734 as_fn_append ()
15735 {
15736 eval $1=\$$1\$2
15737 }
15738fi # as_fn_append
15739
15740# as_fn_arith ARG...
15741# ------------------
15742# Perform arithmetic evaluation on the ARGs, and store the result in the
15743# global $as_val. Take advantage of shells that can avoid forks. The arguments
15744# must be portable across $(()) and expr.
15745if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15746 eval 'as_fn_arith ()
15747 {
15748 as_val=$(( $* ))
15749 }'
15750else
15751 as_fn_arith ()
15752 {
15753 as_val=`expr "$@" || test $? -eq 1`
15754 }
15755fi # as_fn_arith
15756
15757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758if expr a : '\(a\)' >/dev/null 2>&1 &&
15759 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15760 as_expr=expr
15761else
15762 as_expr=false
15763fi
15764
15765if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15766 as_basename=basename
15767else
15768 as_basename=false
15769fi
15770
Matthias Kloseb9621712010-04-24 17:59:49 +000015771if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15772 as_dirname=dirname
15773else
15774 as_dirname=false
15775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777as_me=`$as_basename -- "$0" ||
15778$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15779 X"$0" : 'X\(//\)$' \| \
15780 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015781$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782 sed '/^.*\/\([^/][^/]*\)\/*$/{
15783 s//\1/
15784 q
15785 }
15786 /^X\/\(\/\/\)$/{
15787 s//\1/
15788 q
15789 }
15790 /^X\/\(\/\).*/{
15791 s//\1/
15792 q
15793 }
15794 s/.*/./; q'`
15795
Matthias Kloseb9621712010-04-24 17:59:49 +000015796# Avoid depending upon Character Ranges.
15797as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15798as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15799as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15800as_cr_digits='0123456789'
15801as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802
15803ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015804case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015806 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 xy) ECHO_C='\c';;
15809 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15810 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015811 esac;;
15812*)
15813 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015814esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015817if test -d conf$$.dir; then
15818 rm -f conf$$.dir/conf$$.file
15819else
15820 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015823if (echo >conf$$.file) 2>/dev/null; then
15824 if ln -s conf$$.file conf$$ 2>/dev/null; then
15825 as_ln_s='ln -s'
15826 # ... but there are two gotchas:
15827 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15828 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015829 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015831 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 elif ln conf$$.file conf$$ 2>/dev/null; then
15833 as_ln_s=ln
15834 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015835 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015837else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015838 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15841rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843
15844# as_fn_mkdir_p
15845# -------------
15846# Create "$as_dir" as a directory, including parents if necessary.
15847as_fn_mkdir_p ()
15848{
15849
15850 case $as_dir in #(
15851 -*) as_dir=./$as_dir;;
15852 esac
15853 test -d "$as_dir" || eval $as_mkdir_p || {
15854 as_dirs=
15855 while :; do
15856 case $as_dir in #(
15857 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15858 *) as_qdir=$as_dir;;
15859 esac
15860 as_dirs="'$as_qdir' $as_dirs"
15861 as_dir=`$as_dirname -- "$as_dir" ||
15862$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15863 X"$as_dir" : 'X\(//\)[^/]' \| \
15864 X"$as_dir" : 'X\(//\)$' \| \
15865 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15866$as_echo X"$as_dir" |
15867 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15868 s//\1/
15869 q
15870 }
15871 /^X\(\/\/\)[^/].*/{
15872 s//\1/
15873 q
15874 }
15875 /^X\(\/\/\)$/{
15876 s//\1/
15877 q
15878 }
15879 /^X\(\/\).*/{
15880 s//\1/
15881 q
15882 }
15883 s/.*/./; q'`
15884 test -d "$as_dir" && break
15885 done
15886 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015887 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015888
15889
15890} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015891if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015893else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015894 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015895 as_mkdir_p=false
15896fi
15897
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015898
15899# as_fn_executable_p FILE
15900# -----------------------
15901# Test if FILE is an executable regular file.
15902as_fn_executable_p ()
15903{
15904 test -f "$1" && test -x "$1"
15905} # as_fn_executable_p
15906as_test_x='test -x'
15907as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015908
15909# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015910as_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 +000015911
15912# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015913as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015914
15915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015917## ----------------------------------- ##
15918## Main body of $CONFIG_STATUS script. ##
15919## ----------------------------------- ##
15920_ASEOF
15921test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15924# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015925# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926# values after options handling.
15927ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015928This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015929generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015930
15931 CONFIG_FILES = $CONFIG_FILES
15932 CONFIG_HEADERS = $CONFIG_HEADERS
15933 CONFIG_LINKS = $CONFIG_LINKS
15934 CONFIG_COMMANDS = $CONFIG_COMMANDS
15935 $ $0 $@
15936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937on `(hostname || uname -n) 2>/dev/null | sed 1q`
15938"
15939
Martin v. Löwis11437992002-04-12 09:54:03 +000015940_ACEOF
15941
Matthias Kloseb9621712010-04-24 17:59:49 +000015942case $ac_config_files in *"
15943"*) set x $ac_config_files; shift; ac_config_files=$*;;
15944esac
15945
15946case $ac_config_headers in *"
15947"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15948esac
15949
15950
15951cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015953config_files="$ac_config_files"
15954config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015956_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015959ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015960\`$as_me' instantiates files and other configuration actions
15961from templates according to the current configuration. Unless the files
15962and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015963
Matthias Kloseb9621712010-04-24 17:59:49 +000015964Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015965
15966 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015968 --config print configuration, then exit
15969 -q, --quiet, --silent
15970 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 -d, --debug don't remove temporary files
15972 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 --file=FILE[:TEMPLATE]
15974 instantiate the configuration file FILE
15975 --header=FILE[:TEMPLATE]
15976 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015977
15978Configuration files:
15979$config_files
15980
15981Configuration headers:
15982$config_headers
15983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15988ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015989ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015990python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015991configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015994Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015995This config.status script is free software; the Free Software Foundation
15996gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997
15998ac_pwd='$ac_pwd'
15999srcdir='$srcdir'
16000INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016001MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016002test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016003_ACEOF
16004
Matthias Kloseb9621712010-04-24 17:59:49 +000016005cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16006# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016007ac_need_defaults=:
16008while test $# != 0
16009do
16010 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016011 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016012 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16013 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016014 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016015 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016016 --*=)
16017 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16018 ac_optarg=
16019 ac_shift=:
16020 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016022 ac_option=$1
16023 ac_optarg=$2
16024 ac_shift=shift
16025 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016026 esac
16027
Skip Montanaro6dead952003-09-25 14:50:04 +000016028 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016029 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016030 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16031 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016033 $as_echo "$ac_cs_version"; exit ;;
16034 --config | --confi | --conf | --con | --co | --c )
16035 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016036 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 debug=: ;;
16038 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016039 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 case $ac_optarg in
16041 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016042 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016043 esac
16044 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 ac_need_defaults=false;;
16046 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016047 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016048 case $ac_optarg in
16049 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16050 esac
16051 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016052 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053 --he | --h)
16054 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016055 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016056Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016058 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016059 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16060 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16061 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016062
16063 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016065Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016068 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016069
16070 esac
16071 shift
16072done
16073
Skip Montanaro6dead952003-09-25 14:50:04 +000016074ac_configure_extra_args=
16075
16076if $ac_cs_silent; then
16077 exec 6>/dev/null
16078 ac_configure_extra_args="$ac_configure_extra_args --silent"
16079fi
16080
16081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016082cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016083if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016084 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016085 shift
16086 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16087 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016088 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016090fi
16091
Martin v. Löwis11437992002-04-12 09:54:03 +000016092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094exec 5>>config.log
16095{
16096 echo
16097 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16098## Running $as_me. ##
16099_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016100 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016104cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
Matthias Kloseb9621712010-04-24 17:59:49 +000016107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108
16109# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016110for ac_config_target in $ac_config_targets
16111do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112 case $ac_config_target in
16113 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16114 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16115 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016116 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16117 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16119 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016120 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016121 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016122 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123
Victor Stinnere0be4232011-10-25 13:06:09 +020016124 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016125 esac
16126done
16127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128
Martin v. Löwis11437992002-04-12 09:54:03 +000016129# If the user did not use the arguments to specify the items to instantiate,
16130# then the envvar interface is used. Set only those that are not.
16131# We use the long form for the default assignment because of an extremely
16132# bizarre bug on SunOS 4.1.3.
16133if $ac_need_defaults; then
16134 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16135 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16136fi
16137
Skip Montanaro6dead952003-09-25 14:50:04 +000016138# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016140# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141# Hook for its removal unless debugging.
16142# Note that there is a small window in which the directory will not be cleaned:
16143# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016144$debug ||
16145{
Victor Stinnere0be4232011-10-25 13:06:09 +020016146 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016148 : "${ac_tmp:=$tmp}"
16149 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016150' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016151 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016152}
Martin v. Löwis11437992002-04-12 09:54:03 +000016153# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016154
Martin v. Löwis11437992002-04-12 09:54:03 +000016155{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016157 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016158} ||
16159{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016160 tmp=./conf$$-$RANDOM
16161 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016162} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016163ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016164
Matthias Kloseb9621712010-04-24 17:59:49 +000016165# Set up the scripts for CONFIG_FILES section.
16166# No need to generate them if there are no CONFIG_FILES.
16167# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016168if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170
16171ac_cr=`echo X | tr X '\015'`
16172# On cygwin, bash can eat \r inside `` if the user requested igncr.
16173# But we know of no other shell where ac_cr would be empty at this
16174# point, so we can use a bashism as a fallback.
16175if test "x$ac_cr" = x; then
16176 eval ac_cr=\$\'\\r\'
16177fi
16178ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16179if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016180 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016181else
16182 ac_cs_awk_cr=$ac_cr
16183fi
16184
Victor Stinnere0be4232011-10-25 13:06:09 +020016185echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016186_ACEOF
16187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188
Matthias Kloseb9621712010-04-24 17:59:49 +000016189{
16190 echo "cat >conf$$subs.awk <<_ACEOF" &&
16191 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16192 echo "_ACEOF"
16193} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016194 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16195ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196ac_delim='%!_!# '
16197for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016198 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016199 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016200
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16202 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016203 break
16204 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016205 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 else
16207 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016208 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209done
Matthias Kloseb9621712010-04-24 17:59:49 +000016210rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211
Matthias Kloseb9621712010-04-24 17:59:49 +000016212cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016213cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016215sed -n '
16216h
16217s/^/S["/; s/!.*/"]=/
16218p
16219g
16220s/^[^!]*!//
16221:repl
16222t repl
16223s/'"$ac_delim"'$//
16224t delim
16225:nl
16226h
16227s/\(.\{148\}\)..*/\1/
16228t more1
16229s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16230p
16231n
16232b repl
16233:more1
16234s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16235p
16236g
16237s/.\{148\}//
16238t nl
16239:delim
16240h
16241s/\(.\{148\}\)..*/\1/
16242t more2
16243s/["\\]/\\&/g; s/^/"/; s/$/"/
16244p
16245b
16246:more2
16247s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16248p
16249g
16250s/.\{148\}//
16251t delim
16252' <conf$$subs.awk | sed '
16253/^[^""]/{
16254 N
16255 s/\n//
16256}
16257' >>$CONFIG_STATUS || ac_write_fail=1
16258rm -f conf$$subs.awk
16259cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16260_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016261cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016262 for (key in S) S_is_set[key] = 1
16263 FS = ""
16264
16265}
16266{
16267 line = $ 0
16268 nfields = split(line, field, "@")
16269 substed = 0
16270 len = length(field[1])
16271 for (i = 2; i < nfields; i++) {
16272 key = field[i]
16273 keylen = length(key)
16274 if (S_is_set[key]) {
16275 value = S[key]
16276 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16277 len += length(value) + length(field[++i])
16278 substed = 1
16279 } else
16280 len += 1 + keylen
16281 }
16282
16283 print line
16284}
16285
16286_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016288cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16289if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16290 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16291else
16292 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016293fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016294 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016295_ACEOF
16296
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016297# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16298# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299# trailing colons and then remove the whole line if VPATH becomes empty
16300# (actually we leave an empty line to preserve line numbers).
16301if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016302 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16303h
16304s///
16305s/^/:/
16306s/[ ]*$/:/
16307s/:\$(srcdir):/:/g
16308s/:\${srcdir}:/:/g
16309s/:@srcdir@:/:/g
16310s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016312x
16313s/\(=[ ]*\).*/\1/
16314G
16315s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316s/^[^=]*=[ ]*$//
16317}'
16318fi
16319
Matthias Kloseb9621712010-04-24 17:59:49 +000016320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016321fi # test -n "$CONFIG_FILES"
16322
Matthias Kloseb9621712010-04-24 17:59:49 +000016323# Set up the scripts for CONFIG_HEADERS section.
16324# No need to generate them if there are no CONFIG_HEADERS.
16325# This happens for instance with `./config.status Makefile'.
16326if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016327cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016328BEGIN {
16329_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330
Matthias Kloseb9621712010-04-24 17:59:49 +000016331# Transform confdefs.h into an awk script `defines.awk', embedded as
16332# here-document in config.status, that substitutes the proper values into
16333# config.h.in to produce config.h.
16334
16335# Create a delimiter string that does not exist in confdefs.h, to ease
16336# handling of long lines.
16337ac_delim='%!_!# '
16338for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016339 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16340 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 break
16342 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016343 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016344 else
16345 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16346 fi
16347done
16348
16349# For the awk script, D is an array of macro values keyed by name,
16350# likewise P contains macro parameters if any. Preserve backslash
16351# newline sequences.
16352
16353ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16354sed -n '
16355s/.\{148\}/&'"$ac_delim"'/g
16356t rset
16357:rset
16358s/^[ ]*#[ ]*define[ ][ ]*/ /
16359t def
16360d
16361:def
16362s/\\$//
16363t bsnl
16364s/["\\]/\\&/g
16365s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16366D["\1"]=" \3"/p
16367s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16368d
16369:bsnl
16370s/["\\]/\\&/g
16371s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16372D["\1"]=" \3\\\\\\n"\\/p
16373t cont
16374s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16375t cont
16376d
16377:cont
16378n
16379s/.\{148\}/&'"$ac_delim"'/g
16380t clear
16381:clear
16382s/\\$//
16383t bsnlc
16384s/["\\]/\\&/g; s/^/"/; s/$/"/p
16385d
16386:bsnlc
16387s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16388b cont
16389' <confdefs.h | sed '
16390s/'"$ac_delim"'/"\\\
16391"/g' >>$CONFIG_STATUS || ac_write_fail=1
16392
16393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16394 for (key in D) D_is_set[key] = 1
16395 FS = ""
16396}
16397/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16398 line = \$ 0
16399 split(line, arg, " ")
16400 if (arg[1] == "#") {
16401 defundef = arg[2]
16402 mac1 = arg[3]
16403 } else {
16404 defundef = substr(arg[1], 2)
16405 mac1 = arg[2]
16406 }
16407 split(mac1, mac2, "(") #)
16408 macro = mac2[1]
16409 prefix = substr(line, 1, index(line, defundef) - 1)
16410 if (D_is_set[macro]) {
16411 # Preserve the white space surrounding the "#".
16412 print prefix "define", macro P[macro] D[macro]
16413 next
16414 } else {
16415 # Replace #undef with comments. This is necessary, for example,
16416 # in the case of _POSIX_SOURCE, which is predefined and required
16417 # on some systems where configure will not decide to define it.
16418 if (defundef == "undef") {
16419 print "/*", prefix defundef, macro, "*/"
16420 next
16421 }
16422 }
16423}
16424{ print }
16425_ACAWK
16426_ACEOF
16427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016428 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016429fi # test -n "$CONFIG_HEADERS"
16430
16431
16432eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16433shift
16434for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016435do
16436 case $ac_tag in
16437 :[FHLC]) ac_mode=$ac_tag; continue;;
16438 esac
16439 case $ac_mode$ac_tag in
16440 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016441 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442 :[FH]-) ac_tag=-:-;;
16443 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16444 esac
16445 ac_save_IFS=$IFS
16446 IFS=:
16447 set x $ac_tag
16448 IFS=$ac_save_IFS
16449 shift
16450 ac_file=$1
16451 shift
16452
16453 case $ac_mode in
16454 :L) ac_source=$1;;
16455 :[FH])
16456 ac_file_inputs=
16457 for ac_f
16458 do
16459 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016460 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461 *) # Look for the file first in the build tree, then in the source tree
16462 # (if the path is not absolute). The absolute path cannot be DOS-style,
16463 # because $ac_f cannot contain `:'.
16464 test -f "$ac_f" ||
16465 case $ac_f in
16466 [\\/$]*) false;;
16467 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16468 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016469 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016470 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16472 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016473 done
16474
16475 # Let's still pretend it is `configure' which instantiates (i.e., don't
16476 # use $as_me), people would be surprised to read:
16477 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016478 configure_input='Generated from '`
16479 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16480 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481 if test x"$ac_file" != x-; then
16482 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016483 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16484$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016486 # Neutralize special characters interpreted by sed in replacement strings.
16487 case $configure_input in #(
16488 *\&* | *\|* | *\\* )
16489 ac_sed_conf_input=`$as_echo "$configure_input" |
16490 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16491 *) ac_sed_conf_input=$configure_input;;
16492 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493
16494 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016495 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16496 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497 esac
16498 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016499 esac
16500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016502$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016503 X"$ac_file" : 'X\(//\)[^/]' \| \
16504 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016506$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16508 s//\1/
16509 q
16510 }
16511 /^X\(\/\/\)[^/].*/{
16512 s//\1/
16513 q
16514 }
16515 /^X\(\/\/\)$/{
16516 s//\1/
16517 q
16518 }
16519 /^X\(\/\).*/{
16520 s//\1/
16521 q
16522 }
16523 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016524 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 ac_builddir=.
16526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527case "$ac_dir" in
16528.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16529*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016530 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 case $ac_top_builddir_sub in
16534 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16535 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16536 esac ;;
16537esac
16538ac_abs_top_builddir=$ac_pwd
16539ac_abs_builddir=$ac_pwd$ac_dir_suffix
16540# for backward compatibility:
16541ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016542
16543case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 ac_top_srcdir=$ac_top_builddir_sub
16547 ac_abs_top_srcdir=$ac_pwd ;;
16548 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016549 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016550 ac_top_srcdir=$srcdir
16551 ac_abs_top_srcdir=$srcdir ;;
16552 *) # Relative name.
16553 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16554 ac_top_srcdir=$ac_top_build_prefix$srcdir
16555 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016556esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 case $ac_mode in
16561 :F)
16562 #
16563 # CONFIG_FILE
16564 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016565
16566 case $INSTALL in
16567 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016570 ac_MKDIR_P=$MKDIR_P
16571 case $MKDIR_P in
16572 [\\/$]* | ?:[\\/]* ) ;;
16573 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16574 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016575_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016576
Matthias Kloseb9621712010-04-24 17:59:49 +000016577cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578# If the template does not know about datarootdir, expand it.
16579# FIXME: This hack should be removed a few years after 2.60.
16580ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016581ac_sed_dataroot='
16582/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583 p
16584 q
16585}
16586/@datadir@/p
16587/@docdir@/p
16588/@infodir@/p
16589/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016590/@mandir@/p'
16591case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592*datarootdir*) ac_datarootdir_seen=yes;;
16593*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016594 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16595$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598 ac_datarootdir_hack='
16599 s&@datadir@&$datadir&g
16600 s&@docdir@&$docdir&g
16601 s&@infodir@&$infodir&g
16602 s&@localedir@&$localedir&g
16603 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016604 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016605esac
16606_ACEOF
16607
16608# Neutralize VPATH when `$srcdir' = `.'.
16609# Shell code in configure.ac might set extrasub.
16610# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16612ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016613$extrasub
16614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016615cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016616:t
16617/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016618s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016620s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621s&@srcdir@&$ac_srcdir&;t t
16622s&@abs_srcdir@&$ac_abs_srcdir&;t t
16623s&@top_srcdir@&$ac_top_srcdir&;t t
16624s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16625s&@builddir@&$ac_builddir&;t t
16626s&@abs_builddir@&$ac_abs_builddir&;t t
16627s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16628s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016629s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016630$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016631"
Victor Stinnere0be4232011-10-25 13:06:09 +020016632eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16633 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016636 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16637 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16638 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016639 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016640which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016641$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016642which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016643
Victor Stinnere0be4232011-10-25 13:06:09 +020016644 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016646 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16647 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016648 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016649 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650 ;;
16651 :H)
16652 #
16653 # CONFIG_HEADER
16654 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016656 {
16657 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016658 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16659 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016660 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016661 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016662 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16663$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016664 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016665 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016666 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016667 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 fi
16669 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016671 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016672 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676
16677 esac
16678
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016679
16680 case $ac_file$ac_mode in
16681 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16682
16683 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684done # for ac_tag
16685
Guido van Rossum627b2d71993-12-24 10:39:16 +000016686
Matthias Kloseb9621712010-04-24 17:59:49 +000016687as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016688_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016689ac_clean_files=$ac_clean_files_save
16690
Matthias Kloseb9621712010-04-24 17:59:49 +000016691test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016692 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016693
Martin v. Löwis11437992002-04-12 09:54:03 +000016694
16695# configure is writing to config.log, and then calls config.status.
16696# config.status does its own redirection, appending to config.log.
16697# Unfortunately, on DOS this fails, as config.log is still kept open
16698# by configure, so config.status won't be able to write to it; its
16699# output is simply discarded. So we exec the FD to /dev/null,
16700# effectively closing config.log, so it can be properly (re)opened and
16701# appended to by config.status. When coming back to configure, we
16702# need to make the FD available again.
16703if test "$no_create" != yes; then
16704 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016705 ac_config_status_args=
16706 test "$silent" = yes &&
16707 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016708 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016709 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 exec 5>>config.log
16711 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16712 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016713 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016714fi
16715if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16717$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016718fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016719
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016720
Christian Heimes75ed8902013-11-20 01:11:18 +010016721echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016722if test ! -f Modules/Setup
16723then
16724 cp $srcdir/Modules/Setup.dist Modules/Setup
16725fi
16726
Christian Heimes75ed8902013-11-20 01:11:18 +010016727echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016728if test ! -f Modules/Setup.local
16729then
16730 echo "# Edit this file for local setup changes" >Modules/Setup.local
16731fi
16732
Christian Heimes75ed8902013-11-20 01:11:18 +010016733echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016734$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16735 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016736 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016737mv config.c Modules