blob: 73792038507c8112fd26decfb554f4ef71ecffe1 [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
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700665CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000666BASECFLAGS
667OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000668ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000669LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100670MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000671INSTALL_DATA
672INSTALL_SCRIPT
673INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200674PYTHON
675ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200676ac_ct_READELF
677READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000678ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200679ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000680AR
681RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000682USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000683GNULD
684LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000685LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000686RUNSHARED
687INSTSONAME
688LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000689PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000690BLDLIBRARY
691DLLLIBRARY
692LDLIBRARY
693LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100694MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000695BUILDEXEEXT
696EGREP
697GREP
698CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200699NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000701MAINCC
702CXX
703OBJEXT
704EXEEXT
705ac_ct_CC
706CPPFLAGS
707LDFLAGS
708CFLAGS
709CC
710EXPORT_MACOSX_DEPLOYMENT_TARGET
711CONFIGURE_MACOSX_DEPLOYMENT_TARGET
712SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200713_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000714MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000715FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800717FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000718FRAMEWORKALTINSTALLLAST
719FRAMEWORKALTINSTALLFIRST
720FRAMEWORKINSTALLLAST
721FRAMEWORKINSTALLFIRST
722PYTHONFRAMEWORKINSTALLDIR
723PYTHONFRAMEWORKPREFIX
724PYTHONFRAMEWORKDIR
725PYTHONFRAMEWORKIDENTIFIER
726PYTHONFRAMEWORK
727LIPO_32BIT_FLAGS
728ARCH_RUN_32BIT
729UNIVERSALSDK
730CONFIG_ARGS
731SOVERSION
732VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100734host_os
735host_vendor
736host_cpu
737host
738build_os
739build_vendor
740build_cpu
741build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500742HAS_HG
743HGBRANCH
744HGTAG
745HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400746BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
793with_cxx_main
794with_suffix
795enable_shared
796enable_profiling
797with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100798with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000799with_libs
800with_system_expat
801with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100802with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000803enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700804with_tcltk_includes
805with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_dbmliborder
807with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_threads
809with_thread
810enable_ipv6
811with_doc_strings
812with_tsc
813with_pymalloc
814with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_fpectl
816with_libm
817with_libc
818enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000819with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800820with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000821'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000822 ac_precious_vars='build_alias
823host_alias
824target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100825MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826CC
827CFLAGS
828LDFLAGS
829LIBS
830CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200831CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000835ac_init_help=
836ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000837ac_unrecognized_opts=
838ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# The variables have the same names as the options, with
840# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000841cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844no_recursion=
845prefix=NONE
846program_prefix=NONE
847program_suffix=NONE
848program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853x_includes=NONE
854x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000855
856# Installation directory options.
857# These are left unexpanded so users can "make install exec_prefix=/foo"
858# and all the variables that are supposed to be based on exec_prefix
859# by default will actually change.
860# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862bindir='${exec_prefix}/bin'
863sbindir='${exec_prefix}/sbin'
864libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865datarootdir='${prefix}/share'
866datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867sysconfdir='${prefix}/etc'
868sharedstatedir='${prefix}/com'
869localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870includedir='${prefix}/include'
871oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
873infodir='${datarootdir}/info'
874htmldir='${docdir}'
875dvidir='${docdir}'
876pdfdir='${docdir}'
877psdir='${docdir}'
878libdir='${exec_prefix}/lib'
879localedir='${datarootdir}/locale'
880mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000885do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886 # If the previous option needs an argument, assign it.
887 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889 ac_prev=
890 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000891 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200894 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
895 *=) ac_optarg= ;;
896 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899 # Accept the important Cygnus configure options, so we can diagnose typos.
900
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901 case $ac_dashdash$ac_option in
902 --)
903 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 -bindir | --bindir | --bindi | --bind | --bin | --bi)
906 ac_prev=bindir ;;
907 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909
910 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 -cache-file | --cache-file | --cache-fil | --cache-fi \
916 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
917 ac_prev=cache_file ;;
918 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
919 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 cache_file=$ac_optarg ;;
921
922 --config-cache | -C)
923 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
931 | --dataroo | --dataro | --datar)
932 ac_prev=datarootdir ;;
933 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
934 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
935 datarootdir=$ac_optarg ;;
936
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000938 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000940 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200941 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000942 ac_useropt_orig=$ac_useropt
943 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
944 case $ac_user_opts in
945 *"
946"enable_$ac_useropt"
947"*) ;;
948 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
949 ac_unrecognized_sep=', ';;
950 esac
951 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952
953 -docdir | --docdir | --docdi | --doc | --do)
954 ac_prev=docdir ;;
955 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
956 docdir=$ac_optarg ;;
957
958 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
959 ac_prev=dvidir ;;
960 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
961 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
963 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
980 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
981 | --exec | --exe | --ex)
982 ac_prev=exec_prefix ;;
983 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
984 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
985 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Obsolete; use --with-gas.
990 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 -help | --help | --hel | --he | -h)
993 ac_init_help=long ;;
994 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
995 ac_init_help=recursive ;;
996 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
997 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
999 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1005 ac_prev=htmldir ;;
1006 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1007 | --ht=*)
1008 htmldir=$ac_optarg ;;
1009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010 -includedir | --includedir | --includedi | --included | --include \
1011 | --includ | --inclu | --incl | --inc)
1012 ac_prev=includedir ;;
1013 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1014 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -infodir | --infodir | --infodi | --infod | --info | --inf)
1018 ac_prev=infodir ;;
1019 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libdir | --libdir | --libdi | --libd)
1023 ac_prev=libdir ;;
1024 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1028 | --libexe | --libex | --libe)
1029 ac_prev=libexecdir ;;
1030 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1031 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -localedir | --localedir | --localedi | --localed | --locale)
1035 ac_prev=localedir ;;
1036 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1037 localedir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041 ac_prev=localstatedir ;;
1042 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001043 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1047 ac_prev=mandir ;;
1048 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052 # Obsolete; use --without-fp.
1053 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
1055 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 no_create=yes ;;
1058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001059 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1060 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1061 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1064 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1065 | --oldin | --oldi | --old | --ol | --o)
1066 ac_prev=oldincludedir ;;
1067 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1068 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1069 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1073 ac_prev=prefix ;;
1074 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1078 | --program-pre | --program-pr | --program-p)
1079 ac_prev=program_prefix ;;
1080 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1081 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1085 | --program-suf | --program-su | --program-s)
1086 ac_prev=program_suffix ;;
1087 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1088 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-transform-name | --program-transform-name \
1092 | --program-transform-nam | --program-transform-na \
1093 | --program-transform-n | --program-transform- \
1094 | --program-transform | --program-transfor \
1095 | --program-transfo | --program-transf \
1096 | --program-trans | --program-tran \
1097 | --progr-tra | --program-tr | --program-t)
1098 ac_prev=program_transform_name ;;
1099 -program-transform-name=* | --program-transform-name=* \
1100 | --program-transform-nam=* | --program-transform-na=* \
1101 | --program-transform-n=* | --program-transform-=* \
1102 | --program-transform=* | --program-transfor=* \
1103 | --program-transfo=* | --program-transf=* \
1104 | --program-trans=* | --program-tran=* \
1105 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001108 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1109 ac_prev=pdfdir ;;
1110 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1111 pdfdir=$ac_optarg ;;
1112
1113 -psdir | --psdir | --psdi | --psd | --ps)
1114 ac_prev=psdir ;;
1115 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1116 psdir=$ac_optarg ;;
1117
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1119 | -silent | --silent | --silen | --sile | --sil)
1120 silent=yes ;;
1121
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1123 ac_prev=sbindir ;;
1124 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1125 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
1128 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1129 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1130 | --sharedst | --shareds | --shared | --share | --shar \
1131 | --sha | --sh)
1132 ac_prev=sharedstatedir ;;
1133 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1134 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1135 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1136 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 -site | --site | --sit)
1140 ac_prev=site ;;
1141 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1145 ac_prev=srcdir ;;
1146 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1150 | --syscon | --sysco | --sysc | --sys | --sy)
1151 ac_prev=sysconfdir ;;
1152 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1153 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
Guido van Rossum7f43da71994-08-01 12:15:30 +00001156 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001160
1161 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1162 verbose=yes ;;
1163
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 -version | --version | --versio | --versi | --vers | -V)
1165 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001168 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001170 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001171 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 ac_useropt_orig=$ac_useropt
1173 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1174 case $ac_user_opts in
1175 *"
1176"with_$ac_useropt"
1177"*) ;;
1178 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1179 ac_unrecognized_sep=', ';;
1180 esac
1181 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001184 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001185 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001187 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192"with_$ac_useropt"
1193"*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 --x)
1200 # Obsolete; use --with-x.
1201 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1204 | --x-incl | --x-inc | --x-in | --x-i)
1205 ac_prev=x_includes ;;
1206 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1207 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1211 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1212 ac_prev=x_libraries ;;
1213 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1214 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1218Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219 ;;
1220
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 *=*)
1222 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 case $ac_envvar in #(
1225 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001226 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001227 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001228 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 export $ac_envvar ;;
1230
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001231 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001235 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001236 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
1239 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001240done
1241
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245fi
1246
Matthias Kloseb9621712010-04-24 17:59:49 +00001247if test -n "$ac_unrecognized_opts"; then
1248 case $enable_option_checking in
1249 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1252 esac
1253fi
1254
1255# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1257 datadir sysconfdir sharedstatedir localstatedir includedir \
1258 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1259 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001260do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 # Remove trailing slashes.
1263 case $ac_val in
1264 */ )
1265 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1266 eval $ac_var=\$ac_val;;
1267 esac
1268 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001270 [\\/$]* | ?:[\\/]* ) continue;;
1271 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001274done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276# There might be people who depend on the old broken behavior: `$host'
1277# used to hold the argument of --host etc.
1278# FIXME: To remove some day.
1279build=$build_alias
1280host=$host_alias
1281target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001282
Martin v. Löwis11437992002-04-12 09:54:03 +00001283# FIXME: To remove some day.
1284if test "x$host_alias" != x; then
1285 if test "x$build_alias" = x; then
1286 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 elif test "x$build_alias" != "x$host_alias"; then
1288 cross_compiling=yes
1289 fi
1290fi
1291
1292ac_tool_prefix=
1293test -n "$host_alias" && ac_tool_prefix=$host_alias-
1294
1295test "$silent" = yes && exec 6>/dev/null
1296
Guido van Rossum627b2d71993-12-24 10:39:16 +00001297
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298ac_pwd=`pwd` && test -n "$ac_pwd" &&
1299ac_ls_di=`ls -di .` &&
1300ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304
1305
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306# Find the source files, if location was not specified.
1307if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001310 ac_confdir=`$as_dirname -- "$as_myself" ||
1311$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1312 X"$as_myself" : 'X\(//\)[^/]' \| \
1313 X"$as_myself" : 'X\(//\)$' \| \
1314 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1315$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1317 s//\1/
1318 q
1319 }
1320 /^X\(\/\/\)[^/].*/{
1321 s//\1/
1322 q
1323 }
1324 /^X\(\/\/\)$/{
1325 s//\1/
1326 q
1327 }
1328 /^X\(\/\).*/{
1329 s//\1/
1330 q
1331 }
1332 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335 srcdir=..
1336 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001337else
1338 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340if test ! -r "$srcdir/$ac_unique_file"; then
1341 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001342 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1345ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001346 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 pwd)`
1348# When building in place, set srcdir=.
1349if test "$ac_abs_confdir" = "$ac_pwd"; then
1350 srcdir=.
1351fi
1352# Remove unnecessary trailing slashes from srcdir.
1353# Double slashes in file names in object file debugging info
1354# mess up M-x gdb in Emacs.
1355case $srcdir in
1356*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1357esac
1358for ac_var in $ac_precious_vars; do
1359 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1360 eval ac_env_${ac_var}_value=\$${ac_var}
1361 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1362 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1363done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364
Martin v. Löwis11437992002-04-12 09:54:03 +00001365#
1366# Report the --help message.
1367#
1368if test "$ac_init_help" = "long"; then
1369 # Omit some internal or obsolete options to make the list less imposing.
1370 # This message is too long to be a string in the A/UX 3.1 sh.
1371 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001372\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373
1374Usage: $0 [OPTION]... [VAR=VALUE]...
1375
1376To assign environment variables (e.g., CC, CFLAGS...), specify them as
1377VAR=VALUE. See below for descriptions of some of the useful variables.
1378
1379Defaults for the options are specified in brackets.
1380
1381Configuration:
1382 -h, --help display this help and exit
1383 --help=short display options specific to this package
1384 --help=recursive display the short help of all the included packages
1385 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001386 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001387 --cache-file=FILE cache test results in FILE [disabled]
1388 -C, --config-cache alias for \`--cache-file=config.cache'
1389 -n, --no-create do not create output files
1390 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392Installation directories:
1393 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001396 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398By default, \`make install' will install all the files in
1399\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1400an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1401for instance \`--prefix=\$HOME'.
1402
1403For better control, use the options below.
1404
1405Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001406 --bindir=DIR user executables [EPREFIX/bin]
1407 --sbindir=DIR system admin executables [EPREFIX/sbin]
1408 --libexecdir=DIR program executables [EPREFIX/libexec]
1409 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1410 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1411 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1412 --libdir=DIR object code libraries [EPREFIX/lib]
1413 --includedir=DIR C header files [PREFIX/include]
1414 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1415 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1416 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1417 --infodir=DIR info documentation [DATAROOTDIR/info]
1418 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1419 --mandir=DIR man documentation [DATAROOTDIR/man]
1420 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1421 --htmldir=DIR html documentation [DOCDIR]
1422 --dvidir=DIR dvi documentation [DOCDIR]
1423 --pdfdir=DIR pdf documentation [DOCDIR]
1424 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425_ACEOF
1426
1427 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001428
1429System types:
1430 --build=BUILD configure for building on BUILD [guessed]
1431 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432_ACEOF
1433fi
1434
1435if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001436 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001437 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001438 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001439 cat <<\_ACEOF
1440
1441Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001443 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1444 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001445 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001446 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001447 --enable-framework[=INSTALLDIR]
1448 Build (MacOSX|Darwin) framework
1449 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001450 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001451 --enable-loadable-sqlite-extensions
1452 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --enable-ipv6 Enable ipv6 (with ipv4) support
1454 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001455 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001456 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001457
1458Optional Packages:
1459 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1460 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001461 --with-universal-archs=ARCH
1462 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001463 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001464 --with-framework-name=FRAMEWORK
1465 specify an alternate name of the framework built
1466 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001468 --with-cxx-main=<compiler>
1469 compile main() and link python executable with C++
1470 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-suffix=.exe set executable suffix
1472 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001473 --with-hash-algorithm=[fnv|siphash24]
1474 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001476 --with-system-expat build pyexpat module using an installed expat
1477 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001478 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001479 --with-system-libmpdec build _decimal module using an installed libmpdec
1480 library
Ned Deilyd819b932013-09-06 01:07:05 -07001481 --with-tcltk-includes='-I...'
1482 override search for Tcl and Tk include files
1483 --with-tcltk-libs='-L...'
1484 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001485 --with-dbmliborder=db1:db2:...
1486 order to check db backends for dbm. Valid value is a
1487 colon separated string with the backend names
1488 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with(out)-threads[=DIRECTORY]
1491 disable/enable thread support
1492 --with(out)-thread[=DIRECTORY]
1493 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001495 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001497 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-fpectl enable SIGFPE catching
1499 --with-libm=STRING math library
1500 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001501 --with(out)-computed-gotos
1502 Use computed gotos in evaluation loop (enabled by
1503 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001504 --with(out)-ensurepip=[=upgrade]
1505 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001506
1507Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001508 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 CC C compiler command
1510 CFLAGS C compiler flags
1511 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1512 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001513 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001514 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 CPP C preprocessor
1517
1518Use these variables to override the choices made by `configure' or to help
1519it to find libraries and programs with nonstandard names/locations.
1520
Georg Brandle2e15612009-05-20 18:25:10 +00001521Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001524fi
1525
1526if test "$ac_init_help" = "recursive"; then
1527 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001529 test -d "$ac_dir" ||
1530 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1531 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 ac_builddir=.
1533
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534case "$ac_dir" in
1535.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1536*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001539 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 case $ac_top_builddir_sub in
1541 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1542 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1543 esac ;;
1544esac
1545ac_abs_top_builddir=$ac_pwd
1546ac_abs_builddir=$ac_pwd$ac_dir_suffix
1547# for backward compatibility:
1548ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 ac_top_srcdir=$ac_top_builddir_sub
1554 ac_abs_top_srcdir=$ac_pwd ;;
1555 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 ac_top_srcdir=$srcdir
1558 ac_abs_top_srcdir=$srcdir ;;
1559 *) # Relative name.
1560 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1561 ac_top_srcdir=$ac_top_build_prefix$srcdir
1562 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001563esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 cd "$ac_dir" || { ac_status=$?; continue; }
1567 # Check for guested configure.
1568 if test -f "$ac_srcdir/configure.gnu"; then
1569 echo &&
1570 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1571 elif test -f "$ac_srcdir/configure"; then
1572 echo &&
1573 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001576 fi || ac_status=$?
1577 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 done
1579fi
1580
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001582if $ac_init_version; then
1583 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001584python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001585generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001587Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588This configure script is free software; the Free Software Foundation
1589gives unlimited permission to copy, distribute and modify it.
1590_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001593
1594## ------------------------ ##
1595## Autoconf initialization. ##
1596## ------------------------ ##
1597
1598# ac_fn_c_try_compile LINENO
1599# --------------------------
1600# Try to compile conftest.$ac_ext, and return whether this succeeded.
1601ac_fn_c_try_compile ()
1602{
1603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1604 rm -f conftest.$ac_objext
1605 if { { ac_try="$ac_compile"
1606case "(($ac_try" in
1607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1608 *) ac_try_echo=$ac_try;;
1609esac
1610eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1611$as_echo "$ac_try_echo"; } >&5
1612 (eval "$ac_compile") 2>conftest.err
1613 ac_status=$?
1614 if test -s conftest.err; then
1615 grep -v '^ *+' conftest.err >conftest.er1
1616 cat conftest.er1 >&5
1617 mv -f conftest.er1 conftest.err
1618 fi
1619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1620 test $ac_status = 0; } && {
1621 test -z "$ac_c_werror_flag" ||
1622 test ! -s conftest.err
1623 } && test -s conftest.$ac_objext; then :
1624 ac_retval=0
1625else
1626 $as_echo "$as_me: failed program was:" >&5
1627sed 's/^/| /' conftest.$ac_ext >&5
1628
1629 ac_retval=1
1630fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001631 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001632 as_fn_set_status $ac_retval
1633
1634} # ac_fn_c_try_compile
1635
Matthias Kloseb9621712010-04-24 17:59:49 +00001636# ac_fn_c_try_link LINENO
1637# -----------------------
1638# Try to link conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_link ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 rm -f conftest.$ac_objext conftest$ac_exeext
1643 if { { ac_try="$ac_link"
1644case "(($ac_try" in
1645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646 *) ac_try_echo=$ac_try;;
1647esac
1648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649$as_echo "$ac_try_echo"; } >&5
1650 (eval "$ac_link") 2>conftest.err
1651 ac_status=$?
1652 if test -s conftest.err; then
1653 grep -v '^ *+' conftest.err >conftest.er1
1654 cat conftest.er1 >&5
1655 mv -f conftest.er1 conftest.err
1656 fi
1657 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658 test $ac_status = 0; } && {
1659 test -z "$ac_c_werror_flag" ||
1660 test ! -s conftest.err
1661 } && test -s conftest$ac_exeext && {
1662 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001663 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001664 }; then :
1665 ac_retval=0
1666else
1667 $as_echo "$as_me: failed program was:" >&5
1668sed 's/^/| /' conftest.$ac_ext >&5
1669
1670 ac_retval=1
1671fi
1672 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1673 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1674 # interfere with the next link command; also delete a directory that is
1675 # left behind by Apple's compiler. We do this before executing the actions.
1676 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_link
1681
Matthias Kloseb9621712010-04-24 17:59:49 +00001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001703 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
1719# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1720# -------------------------------------------------------
1721# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1722# the include files in INCLUDES and setting the cache variable VAR
1723# accordingly.
1724ac_fn_c_check_header_mongrel ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001727 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001730if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001731 $as_echo_n "(cached) " >&6
1732fi
1733eval ac_res=\$$3
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1735$as_echo "$ac_res" >&6; }
1736else
1737 # Is the header compilable?
1738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1739$as_echo_n "checking $2 usability... " >&6; }
1740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1741/* end confdefs.h. */
1742$4
1743#include <$2>
1744_ACEOF
1745if ac_fn_c_try_compile "$LINENO"; then :
1746 ac_header_compiler=yes
1747else
1748 ac_header_compiler=no
1749fi
1750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1752$as_echo "$ac_header_compiler" >&6; }
1753
1754# Is the header present?
1755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1756$as_echo_n "checking $2 presence... " >&6; }
1757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1758/* end confdefs.h. */
1759#include <$2>
1760_ACEOF
1761if ac_fn_c_try_cpp "$LINENO"; then :
1762 ac_header_preproc=yes
1763else
1764 ac_header_preproc=no
1765fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001766rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1768$as_echo "$ac_header_preproc" >&6; }
1769
1770# So? What about this header?
1771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1772 yes:no: )
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1774$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1776$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1777 ;;
1778 no:yes:* )
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1780$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1782$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1784$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1786$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1788$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001789( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001790## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001791## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001792 ) | sed "s/^/$as_me: WARNING: /" >&2
1793 ;;
1794esac
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1796$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001797if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001798 $as_echo_n "(cached) " >&6
1799else
1800 eval "$3=\$ac_header_compiler"
1801fi
1802eval ac_res=\$$3
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1804$as_echo "$ac_res" >&6; }
1805fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001806 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001807
1808} # ac_fn_c_check_header_mongrel
1809
1810# ac_fn_c_try_run LINENO
1811# ----------------------
1812# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1813# that executables *can* be run.
1814ac_fn_c_try_run ()
1815{
1816 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1817 if { { ac_try="$ac_link"
1818case "(($ac_try" in
1819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1820 *) ac_try_echo=$ac_try;;
1821esac
1822eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1823$as_echo "$ac_try_echo"; } >&5
1824 (eval "$ac_link") 2>&5
1825 ac_status=$?
1826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1827 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1828 { { case "(($ac_try" in
1829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1830 *) ac_try_echo=$ac_try;;
1831esac
1832eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1833$as_echo "$ac_try_echo"; } >&5
1834 (eval "$ac_try") 2>&5
1835 ac_status=$?
1836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1837 test $ac_status = 0; }; }; then :
1838 ac_retval=0
1839else
1840 $as_echo "$as_me: program exited with status $ac_status" >&5
1841 $as_echo "$as_me: failed program was:" >&5
1842sed 's/^/| /' conftest.$ac_ext >&5
1843
1844 ac_retval=$ac_status
1845fi
1846 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001847 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 as_fn_set_status $ac_retval
1849
1850} # ac_fn_c_try_run
1851
1852# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1853# -------------------------------------------------------
1854# Tests whether HEADER exists and can be compiled using the include files in
1855# INCLUDES, setting the cache variable VAR accordingly.
1856ac_fn_c_check_header_compile ()
1857{
1858 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1860$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001861if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001862 $as_echo_n "(cached) " >&6
1863else
1864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1865/* end confdefs.h. */
1866$4
1867#include <$2>
1868_ACEOF
1869if ac_fn_c_try_compile "$LINENO"; then :
1870 eval "$3=yes"
1871else
1872 eval "$3=no"
1873fi
1874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1875fi
1876eval ac_res=\$$3
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1878$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001879 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001880
1881} # ac_fn_c_check_header_compile
1882
Matthias Kloseb9621712010-04-24 17:59:49 +00001883# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1884# -------------------------------------------
1885# Tests whether TYPE exists after having included INCLUDES, setting cache
1886# variable VAR accordingly.
1887ac_fn_c_check_type ()
1888{
1889 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1891$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001892if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 $as_echo_n "(cached) " >&6
1894else
1895 eval "$3=no"
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897/* end confdefs.h. */
1898$4
1899int
1900main ()
1901{
1902if (sizeof ($2))
1903 return 0;
1904 ;
1905 return 0;
1906}
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912int
1913main ()
1914{
1915if (sizeof (($2)))
1916 return 0;
1917 ;
1918 return 0;
1919}
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922
1923else
1924 eval "$3=yes"
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1929fi
1930eval ac_res=\$$3
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1932$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001933 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001934
1935} # ac_fn_c_check_type
1936
1937# ac_fn_c_find_uintX_t LINENO BITS VAR
1938# ------------------------------------
1939# Finds an unsigned integer type with width BITS, setting cache variable VAR
1940# accordingly.
1941ac_fn_c_find_uintX_t ()
1942{
1943 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1945$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001946if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001947 $as_echo_n "(cached) " >&6
1948else
1949 eval "$3=no"
1950 # Order is important - never check a type that is potentially smaller
1951 # than half of the expected target width.
1952 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1953 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$ac_includes_default
1957int
1958main ()
1959{
1960static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001961test_array [0] = 0;
1962return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964 ;
1965 return 0;
1966}
1967_ACEOF
1968if ac_fn_c_try_compile "$LINENO"; then :
1969 case $ac_type in #(
1970 uint$2_t) :
1971 eval "$3=yes" ;; #(
1972 *) :
1973 eval "$3=\$ac_type" ;;
1974esac
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001977 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001978
1979else
1980 break
1981fi
1982 done
1983fi
1984eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001987 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001988
1989} # ac_fn_c_find_uintX_t
1990
1991# ac_fn_c_find_intX_t LINENO BITS VAR
1992# -----------------------------------
1993# Finds a signed integer type with width BITS, setting cache variable VAR
1994# accordingly.
1995ac_fn_c_find_intX_t ()
1996{
1997 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1999$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002000if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002001 $as_echo_n "(cached) " >&6
2002else
2003 eval "$3=no"
2004 # Order is important - never check a type that is potentially smaller
2005 # than half of the expected target width.
2006 for ac_type in int$2_t 'int' 'long int' \
2007 'long long int' 'short int' 'signed char'; do
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002011 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002012int
2013main ()
2014{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002015static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002027 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002028int
2029main ()
2030{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002031static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002032 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002033test_array [0] = 0;
2034return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036 ;
2037 return 0;
2038}
2039_ACEOF
2040if ac_fn_c_try_compile "$LINENO"; then :
2041
2042else
2043 case $ac_type in #(
2044 int$2_t) :
2045 eval "$3=yes" ;; #(
2046 *) :
2047 eval "$3=\$ac_type" ;;
2048esac
2049fi
2050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002053 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002054
2055else
2056 break
2057fi
2058 done
2059fi
2060eval ac_res=\$$3
2061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2062$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002063 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065} # ac_fn_c_find_intX_t
2066
2067# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068# --------------------------------------------
2069# Tries to find the compile-time value of EXPR in a program that includes
2070# INCLUDES, setting VAR accordingly. Returns whether the value could be
2071# computed
2072ac_fn_c_compute_int ()
2073{
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078/* end confdefs.h. */
2079$4
2080int
2081main ()
2082{
2083static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002084test_array [0] = 0;
2085return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002086
2087 ;
2088 return 0;
2089}
2090_ACEOF
2091if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2115 fi
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2117fi
2118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
2120else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002128test_array [0] = 0;
2129return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139/* end confdefs.h. */
2140$4
2141int
2142main ()
2143{
2144static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002145test_array [0] = 0;
2146return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002147
2148 ;
2149 return 0;
2150}
2151_ACEOF
2152if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2161fi
2162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164else
2165 ac_lo= ac_hi=
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168fi
2169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170# Binary search between lo and hi bounds.
2171while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174/* end confdefs.h. */
2175$4
2176int
2177main ()
2178{
2179static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002180test_array [0] = 0;
2181return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002182
2183 ;
2184 return 0;
2185}
2186_ACEOF
2187if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193done
2194case $ac_lo in #((
2195?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196'') ac_retval=1 ;;
2197esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200/* end confdefs.h. */
2201$4
2202static long int longval () { return $2; }
2203static unsigned long int ulongval () { return $2; }
2204#include <stdio.h>
2205#include <stdlib.h>
2206int
2207main ()
2208{
2209
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2214 {
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2219 }
2220 else
2221 {
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2226 }
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
2230
2231 ;
2232 return 0;
2233}
2234_ACEOF
2235if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237else
2238 ac_retval=1
2239fi
2240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242rm -f conftest.val
2243
2244 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002246 as_fn_set_status $ac_retval
2247
2248} # ac_fn_c_compute_int
2249
2250# ac_fn_c_check_func LINENO FUNC VAR
2251# ----------------------------------
2252# Tests whether FUNC exists, setting the cache variable VAR accordingly
2253ac_fn_c_check_func ()
2254{
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002258if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002259 $as_echo_n "(cached) " >&6
2260else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h. */
2263/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265#define $2 innocuous_$2
2266
2267/* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2271
2272#ifdef __STDC__
2273# include <limits.h>
2274#else
2275# include <assert.h>
2276#endif
2277
2278#undef $2
2279
2280/* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283#ifdef __cplusplus
2284extern "C"
2285#endif
2286char $2 ();
2287/* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290#if defined __stub_$2 || defined __stub___$2
2291choke me
2292#endif
2293
2294int
2295main ()
2296{
2297return $2 ();
2298 ;
2299 return 0;
2300}
2301_ACEOF
2302if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304else
2305 eval "$3=no"
2306fi
2307rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext conftest.$ac_ext
2309fi
2310eval ac_res=\$$3
2311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2312$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002313 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002314
2315} # ac_fn_c_check_func
2316
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002317# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2318# ---------------------------------------------
2319# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2320# accordingly.
2321ac_fn_c_check_decl ()
2322{
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 as_decl_name=`echo $2|sed 's/ *(.*//'`
2325 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2327$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2328if eval \${$3+:} false; then :
2329 $as_echo_n "(cached) " >&6
2330else
2331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h. */
2333$4
2334int
2335main ()
2336{
2337#ifndef $as_decl_name
2338#ifdef __cplusplus
2339 (void) $as_decl_use;
2340#else
2341 (void) $as_decl_name;
2342#endif
2343#endif
2344
2345 ;
2346 return 0;
2347}
2348_ACEOF
2349if ac_fn_c_try_compile "$LINENO"; then :
2350 eval "$3=yes"
2351else
2352 eval "$3=no"
2353fi
2354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2355fi
2356eval ac_res=\$$3
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2358$as_echo "$ac_res" >&6; }
2359 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2360
2361} # ac_fn_c_check_decl
2362
Matthias Kloseb9621712010-04-24 17:59:49 +00002363# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2364# ----------------------------------------------------
2365# Tries to find if the field MEMBER exists in type AGGR, after including
2366# INCLUDES, setting cache variable VAR accordingly.
2367ac_fn_c_check_member ()
2368{
2369 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2371$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002372if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002373 $as_echo_n "(cached) " >&6
2374else
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376/* end confdefs.h. */
2377$5
2378int
2379main ()
2380{
2381static $2 ac_aggr;
2382if (ac_aggr.$3)
2383return 0;
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$4=yes"
2390else
2391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2392/* end confdefs.h. */
2393$5
2394int
2395main ()
2396{
2397static $2 ac_aggr;
2398if (sizeof ac_aggr.$3)
2399return 0;
2400 ;
2401 return 0;
2402}
2403_ACEOF
2404if ac_fn_c_try_compile "$LINENO"; then :
2405 eval "$4=yes"
2406else
2407 eval "$4=no"
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2410fi
2411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2412fi
2413eval ac_res=\$$4
2414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002416 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002417
2418} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002419cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002420This file contains any messages produced by compilers while
2421running configure, to aid debugging if configure makes a mistake.
2422
Georg Brandl08a90122012-09-29 09:34:13 +02002423It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002424generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002425
2426 $ $0 $@
2427
2428_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002430{
2431cat <<_ASUNAME
2432## --------- ##
2433## Platform. ##
2434## --------- ##
2435
2436hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2437uname -m = `(uname -m) 2>/dev/null || echo unknown`
2438uname -r = `(uname -r) 2>/dev/null || echo unknown`
2439uname -s = `(uname -s) 2>/dev/null || echo unknown`
2440uname -v = `(uname -v) 2>/dev/null || echo unknown`
2441
2442/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2443/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2444
2445/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2446/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2447/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002449/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2450/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2451/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2452
2453_ASUNAME
2454
2455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 $as_echo "PATH: $as_dir"
2461 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
2464} >&5
2465
2466cat >&5 <<_ACEOF
2467
2468
2469## ----------- ##
2470## Core tests. ##
2471## ----------- ##
2472
2473_ACEOF
2474
2475
2476# Keep a trace of the command line.
2477# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002478# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002479# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002480# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002481ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002482ac_configure_args0=
2483ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002484ac_must_keep_next=false
2485for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002486do
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 for ac_arg
2488 do
2489 case $ac_arg in
2490 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2491 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2492 | -silent | --silent | --silen | --sile | --sil)
2493 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 esac
2497 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002502 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002504 case $ac_arg in
2505 *=* | --config-cache | -C | -disable-* | --disable-* \
2506 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2507 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2508 | -with-* | --with-* | -without-* | --without-* | --x)
2509 case "$ac_configure_args0 " in
2510 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2511 esac
2512 ;;
2513 -* ) ac_must_keep_next=true ;;
2514 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 ;;
2518 esac
2519 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002520done
Matthias Kloseb9621712010-04-24 17:59:49 +00002521{ ac_configure_args0=; unset ac_configure_args0;}
2522{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002523
2524# When interrupted or exit'd, cleanup temporary files, and complete
2525# config.log. We remove comments because anyway the quotes in there
2526# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527# WARNING: Use '\'' to represent an apostrophe within the trap.
2528# 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 +00002529trap 'exit_status=$?
2530 # Save into config.log some information that might help in debugging.
2531 {
2532 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002533
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002534 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002535## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002536## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002537 echo
2538 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539(
2540 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2541 eval ac_val=\$$ac_var
2542 case $ac_val in #(
2543 *${as_nl}*)
2544 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2546$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 esac
2548 case $ac_var in #(
2549 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002550 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2551 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 esac ;;
2553 esac
2554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2557 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 "s/'\''/'\''\\\\'\'''\''/g;
2560 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2561 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002562 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002564 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 esac |
2566 sort
2567)
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002569
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002570 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002571## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002572## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002573 echo
2574 for ac_var in $ac_subst_vars
2575 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 eval ac_val=\$$ac_var
2577 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 done | sort
2582 echo
2583
2584 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002585 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002587## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002588 echo
2589 for ac_var in $ac_subst_files
2590 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 eval ac_val=\$$ac_var
2592 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002596 done | sort
2597 echo
2598 fi
2599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002602## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002603## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002604 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
2607 fi
2608 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$as_me: caught signal $ac_signal"
2610 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 rm -f core *.core core.conftest.* &&
2613 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002616for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002618done
2619ac_signal=0
2620
2621# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002623
Matthias Kloseb9621712010-04-24 17:59:49 +00002624$as_echo "/* confdefs.h */" > confdefs.h
2625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626# Predefined preprocessor variables.
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_NAME "$PACKAGE_NAME"
2630_ACEOF
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2634_ACEOF
2635
Martin v. Löwis11437992002-04-12 09:54:03 +00002636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_VERSION "$PACKAGE_VERSION"
2638_ACEOF
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_STRING "$PACKAGE_STRING"
2642_ACEOF
2643
Martin v. Löwis11437992002-04-12 09:54:03 +00002644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2646_ACEOF
2647
Matthias Kloseb9621712010-04-24 17:59:49 +00002648cat >>confdefs.h <<_ACEOF
2649#define PACKAGE_URL "$PACKAGE_URL"
2650_ACEOF
2651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
2653# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002654# Prefer an explicitly selected file to automatically selected ones.
2655ac_site_file1=NONE
2656ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002657if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002658 # We do not want a PATH search for config.site.
2659 case $CONFIG_SITE in #((
2660 -*) ac_site_file1=./$CONFIG_SITE;;
2661 */*) ac_site_file1=$CONFIG_SITE;;
2662 *) ac_site_file1=./$CONFIG_SITE;;
2663 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002664elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 ac_site_file1=$prefix/share/config.site
2666 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667else
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 ac_site_file1=$ac_default_prefix/share/config.site
2669 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002671for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002672do
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 test "x$ac_site_file" = xNONE && continue
2674 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2676$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 . "$ac_site_file" \
2679 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2681as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002682See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683 fi
2684done
2685
2686if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 # Some versions of bash will fail to source /dev/null (special files
2688 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2689 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2690 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2691$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2694 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002695 esac
2696 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697else
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2699$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 >$cache_file
2701fi
2702
2703# Check that the precious variables saved in the cache have kept the same
2704# value.
2705ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2708 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002709 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2710 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 case $ac_old_set,$ac_new_set in
2712 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2714$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 +00002715 ac_cache_corrupted=: ;;
2716 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2718$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 ac_cache_corrupted=: ;;
2720 ,);;
2721 *)
2722 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002723 # differences in whitespace do not lead to failure.
2724 ac_old_val_w=`echo x $ac_old_val`
2725 ac_new_val_w=`echo x $ac_new_val`
2726 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2728$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2729 ac_cache_corrupted=:
2730 else
2731 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2732$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2733 eval $ac_var=\$ac_old_val
2734 fi
2735 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2736$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2738$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 fi;;
2740 esac
2741 # Pass precious variables to config.status.
2742 if test "$ac_new_set" = set; then
2743 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002744 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 *) ac_arg=$ac_var=$ac_new_val ;;
2746 esac
2747 case " $ac_configure_args " in
2748 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002749 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 esac
2751 fi
2752done
2753if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2755$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2757$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002758 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002760## -------------------- ##
2761## Main body of script. ##
2762## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002763
Guido van Rossum7f43da71994-08-01 12:15:30 +00002764ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002765ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002766ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2767ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2768ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002769
Guido van Rossum627b2d71993-12-24 10:39:16 +00002770
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Trent Nelson4d4ec652012-10-16 08:51:24 -04002772
Trent Nelson5595ab52012-10-17 04:47:31 -04002773if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002774 # If we're building out-of-tree, we need to make sure the following
2775 # resources get picked up before their $srcdir counterparts.
2776 # Objects/ -> typeslots.inc
2777 # Include/ -> Python-ast.h, graminit.h
2778 # Python/ -> importlib.h
2779 # (A side effect of this is that these resources will automatically be
2780 # regenerated when building out-of-tree, regardless of whether or not
2781 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2782 # off.)
2783 BASECPPFLAGS="-IObjects -IInclude -IPython"
2784else
2785 BASECPPFLAGS=""
2786fi
2787
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788
2789
2790
2791
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002792if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002793then
2794# Extract the first word of "hg", so it can be a program name with args.
2795set dummy hg; ac_word=$2
2796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2797$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002798if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799 $as_echo_n "(cached) " >&6
2800else
2801 if test -n "$HAS_HG"; then
2802 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2803else
2804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2805for as_dir in $PATH
2806do
2807 IFS=$as_save_IFS
2808 test -z "$as_dir" && as_dir=.
2809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002811 ac_cv_prog_HAS_HG="found"
2812 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2813 break 2
2814 fi
2815done
2816 done
2817IFS=$as_save_IFS
2818
2819 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2820fi
2821fi
2822HAS_HG=$ac_cv_prog_HAS_HG
2823if test -n "$HAS_HG"; then
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2825$as_echo "$HAS_HG" >&6; }
2826else
2827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2828$as_echo "no" >&6; }
2829fi
2830
2831
2832else
2833HAS_HG=no-repository
2834fi
2835if test $HAS_HG = found
2836then
2837 HGVERSION="hg id -i \$(srcdir)"
2838 HGTAG="hg id -t \$(srcdir)"
2839 HGBRANCH="hg id -b \$(srcdir)"
2840else
2841 HGVERSION=""
2842 HGTAG=""
2843 HGBRANCH=""
2844fi
2845
2846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002848
2849
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002850ac_aux_dir=
2851for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2852 if test -f "$ac_dir/install-sh"; then
2853 ac_aux_dir=$ac_dir
2854 ac_install_sh="$ac_aux_dir/install-sh -c"
2855 break
2856 elif test -f "$ac_dir/install.sh"; then
2857 ac_aux_dir=$ac_dir
2858 ac_install_sh="$ac_aux_dir/install.sh -c"
2859 break
2860 elif test -f "$ac_dir/shtool"; then
2861 ac_aux_dir=$ac_dir
2862 ac_install_sh="$ac_aux_dir/shtool install -c"
2863 break
2864 fi
2865done
2866if test -z "$ac_aux_dir"; then
2867 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2868fi
2869
2870# These three variables are undocumented and unsupported,
2871# and are intended to be withdrawn in a future Autoconf release.
2872# They can cause serious problems if a builder's source tree is in a directory
2873# whose full name contains unusual characters.
2874ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2875ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2876ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2877
2878
2879# Make sure we can run config.sub.
2880$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2881 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2882
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2884$as_echo_n "checking build system type... " >&6; }
2885if ${ac_cv_build+:} false; then :
2886 $as_echo_n "(cached) " >&6
2887else
2888 ac_build_alias=$build_alias
2889test "x$ac_build_alias" = x &&
2890 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2891test "x$ac_build_alias" = x &&
2892 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2893ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2894 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2895
2896fi
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2898$as_echo "$ac_cv_build" >&6; }
2899case $ac_cv_build in
2900*-*-*) ;;
2901*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2902esac
2903build=$ac_cv_build
2904ac_save_IFS=$IFS; IFS='-'
2905set x $ac_cv_build
2906shift
2907build_cpu=$1
2908build_vendor=$2
2909shift; shift
2910# Remember, the first character of IFS is used to create $*,
2911# except with old shells:
2912build_os=$*
2913IFS=$ac_save_IFS
2914case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2915
2916
2917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2918$as_echo_n "checking host system type... " >&6; }
2919if ${ac_cv_host+:} false; then :
2920 $as_echo_n "(cached) " >&6
2921else
2922 if test "x$host_alias" = x; then
2923 ac_cv_host=$ac_cv_build
2924else
2925 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2926 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2927fi
2928
2929fi
2930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2931$as_echo "$ac_cv_host" >&6; }
2932case $ac_cv_host in
2933*-*-*) ;;
2934*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2935esac
2936host=$ac_cv_host
2937ac_save_IFS=$IFS; IFS='-'
2938set x $ac_cv_host
2939shift
2940host_cpu=$1
2941host_vendor=$2
2942shift; shift
2943# Remember, the first character of IFS is used to create $*,
2944# except with old shells:
2945host_os=$*
2946IFS=$ac_save_IFS
2947case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2948
2949
2950
doko@python.orga10e4a92013-01-25 18:45:12 +01002951
2952
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953if test "$cross_compiling" = yes; then
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2955$as_echo_n "checking for python interpreter for cross build... " >&6; }
2956 if test -z "$PYTHON_FOR_BUILD"; then
2957 for interp in python$PACKAGE_VERSION python3 python; do
2958 which $interp >/dev/null 2>&1 || continue
2959 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2960 break
2961 fi
2962 interp=
2963 done
2964 if test x$interp = x; then
2965 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2966 fi
2967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2968$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002969 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 +02002970 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002971elif test "$cross_compiling" = maybe; then
2972 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002973else
2974 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2975fi
2976
2977
Martin v. Löwis11437992002-04-12 09:54:03 +00002978
Benjamin Petersond23f8222009-04-05 19:13:16 +00002979if test "$prefix" != "/"; then
2980 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2981fi
2982
2983
Martin v. Löwis11437992002-04-12 09:54:03 +00002984
2985
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002986# We don't use PACKAGE_ variables, and they cause conflicts
2987# with other autoconf-based packages that include Python.h
2988grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2989rm confdefs.h
2990mv confdefs.h.new confdefs.h
2991
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002992
Georg Brandl08a90122012-09-29 09:34:13 +02002993VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002994
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002995# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002996
2997SOVERSION=1.0
2998
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999# The later defininition of _XOPEN_SOURCE disables certain features
3000# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
3004
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3006# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003010
3011
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003012# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3013# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3014# them.
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003017
3018
Martin v. Löwisd6320502004-08-12 13:45:08 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3021
Matthias Kloseb9621712010-04-24 17:59:49 +00003022$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003023
3024
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003025# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3026# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3027# them.
3028
Matthias Kloseb9621712010-04-24 17:59:49 +00003029$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003030
3031
3032
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003033define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003034
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003035# Arguments passed to configure.
3036
3037CONFIG_ARGS="$ac_configure_args"
3038
Matthias Kloseb9621712010-04-24 17:59:49 +00003039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3040$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003042if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044 case $enableval in
3045 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003046 # Locate the best usable SDK, see Mac/README.txt for more
3047 # information
3048 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003049 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003051 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3052 if test ! -d "${enableval}"
3053 then
3054 enableval=/
3055 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003056 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003057 ;;
3058 esac
3059 case $enableval in
3060 no)
3061 UNIVERSALSDK=
3062 enable_universalsdk=
3063 ;;
3064 *)
3065 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066 if test ! -d "${UNIVERSALSDK}"
3067 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003068 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070 ;;
3071 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003072
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003073
Thomas Wouters477c8d52006-05-27 19:21:47 +00003074else
3075
3076 UNIVERSALSDK=
3077 enable_universalsdk=
3078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081if test -n "${UNIVERSALSDK}"
3082then
Matthias Kloseb9621712010-04-24 17:59:49 +00003083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3084$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003085else
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003091
Ned Deily87adb6e2013-10-18 21:09:56 -07003092ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003093
Ned Deilycbfb9a52012-06-23 16:02:19 -07003094# For backward compatibility reasons we prefer to select '32-bit' if available,
3095# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097if test "`uname -s`" = "Darwin"
3098then
3099 if test -n "${UNIVERSALSDK}"
3100 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003101 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003102 then
3103 UNIVERSAL_ARCHS="intel"
3104 fi
3105 fi
3106fi
3107
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003108
Matthias Kloseb9621712010-04-24 17:59:49 +00003109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3110$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111
3112# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003113if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115 UNIVERSAL_ARCHS="$withval"
3116
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117fi
3118
Ned Deily87adb6e2013-10-18 21:09:56 -07003119if test -n "${UNIVERSALSDK}"
3120then
3121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3122$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3123else
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3125$as_echo "no" >&6; }
3126fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003128
3129# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003130if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131 withval=$with_framework_name;
3132 PYTHONFRAMEWORK=${withval}
3133 PYTHONFRAMEWORKDIR=${withval}.framework
3134 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3135
3136else
3137
3138 PYTHONFRAMEWORK=Python
3139 PYTHONFRAMEWORKDIR=Python.framework
3140 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3141
3142fi
3143
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003144# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003145if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003146 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003147 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003148 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003149 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 esac
3151 case $enableval in
3152 no)
3153 PYTHONFRAMEWORK=
3154 PYTHONFRAMEWORKDIR=no-framework
3155 PYTHONFRAMEWORKPREFIX=
3156 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003157 FRAMEWORKINSTALLFIRST=
3158 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003159 FRAMEWORKALTINSTALLFIRST=
3160 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003161 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 if test "x${prefix}" = "xNONE"; then
3163 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3164 else
3165 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3166 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003168 ;;
3169 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003171 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003172 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003173 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003174 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3175 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003176 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003178
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003179 if test "x${prefix}" = "xNONE" ; then
3180 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 else
3183 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3184 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003185
3186 case "${enableval}" in
3187 /System*)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 if test "${prefix}" = "NONE" ; then
3190 # See below
3191 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3192 fi
3193 ;;
3194
3195 /Library*)
3196 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3197 ;;
3198
3199 */Library/Frameworks)
3200 MDIR="`dirname "${enableval}"`"
3201 MDIR="`dirname "${MDIR}"`"
3202 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3203
3204 if test "${prefix}" = "NONE"; then
3205 # User hasn't specified the
3206 # --prefix option, but wants to install
3207 # the framework in a non-default location,
3208 # ensure that the compatibility links get
3209 # installed relative to that prefix as well
3210 # instead of in /usr/local.
3211 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3212 fi
3213 ;;
3214
3215 *)
3216 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3217 ;;
3218 esac
3219
Jack Jansen127e56e2001-09-11 14:41:54 +00003220 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003222 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003223 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003224 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003225
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3229
3230 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3231
Jack Jansene578a632001-08-15 01:27:14 +00003232 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003233
Guido van Rossum563e7081996-09-10 18:20:48 +00003234else
Martin v. Löwis11437992002-04-12 09:54:03 +00003235
Jack Jansene578a632001-08-15 01:27:14 +00003236 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003237 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003238 PYTHONFRAMEWORKPREFIX=
3239 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003240 FRAMEWORKINSTALLFIRST=
3241 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003242 FRAMEWORKALTINSTALLFIRST=
3243 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003244 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 if test "x${prefix}" = "xNONE" ; then
3246 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3247 else
3248 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3249 fi
Jack Jansene578a632001-08-15 01:27:14 +00003250 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003252
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003253fi
3254
Thomas Wouters477c8d52006-05-27 19:21:47 +00003255
3256
Michael W. Hudson54241132001-12-07 15:38:26 +00003257
3258
3259
3260
Jack Jansene578a632001-08-15 01:27:14 +00003261
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003262
3263
3264
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003265
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
Ned Deilyb8f944f2013-11-21 22:42:25 -08003267
Jack Jansene578a632001-08-15 01:27:14 +00003268##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003269## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003270## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003271##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003272# Set name for machine-dependent library files
3273
Matthias Kloseb9621712010-04-24 17:59:49 +00003274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3275$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276if test -z "$MACHDEP"
3277then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 # avoid using uname for cross builds
3279 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003280 # ac_sys_system and ac_sys_release are used for setting
3281 # a lot of different things including 'define_xopen_source'
3282 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case "$host" in
3284 *-*-linux*)
3285 ac_sys_system=Linux
3286 ;;
3287 *-*-cygwin*)
3288 ac_sys_system=Cygwin
3289 ;;
3290 *)
3291 # for now, limit cross builds to known configurations
3292 MACHDEP="unknown"
3293 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3294 esac
3295 ac_sys_release=
3296 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003297 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003298 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003299 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003302 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 fi
3305 ac_md_system=`echo $ac_sys_system |
3306 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3307 ac_md_release=`echo $ac_sys_release |
3308 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3309 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003310
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003311 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003312 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003313 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003314 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003315 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003316 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003317 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003318fi
Guido van Rossum91922671997-10-09 20:24:13 +00003319
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003320
3321if test "$cross_compiling" = yes; then
3322 case "$host" in
3323 *-*-linux*)
3324 case "$host_cpu" in
3325 arm*)
3326 _host_cpu=arm
3327 ;;
3328 *)
3329 _host_cpu=$host_cpu
3330 esac
3331 ;;
3332 *-*-cygwin*)
3333 _host_cpu=
3334 ;;
3335 *)
3336 # for now, limit cross builds to known configurations
3337 MACHDEP="unknown"
3338 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3339 esac
3340 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3341fi
3342
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003343# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3344# disable features if it is defined, without any means to access these
3345# features as extensions. For these systems, we skip the definition of
3346# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3347# some feature, make sure there is no alternative way to access this
3348# feature. Also, when using wildcards, make sure you have verified the
3349# need for not defining _XOPEN_SOURCE on all systems matching the
3350# wildcard, and that the wildcard does not include future systems
3351# (which may remove their limitations).
3352case $ac_sys_system/$ac_sys_release in
3353 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3354 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003355 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003356 # In addition, Stefan Krah confirms that issue #1244610 exists through
3357 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003358 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003359 define_xopen_source=no
3360 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3361 # also defined. This can be overridden by defining _BSD_SOURCE
3362 # As this has a different meaning on Linux, only define it on OpenBSD
3363
Matthias Kloseb9621712010-04-24 17:59:49 +00003364$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003365
3366 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003367 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003368 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3369 # also defined. This can be overridden by defining _BSD_SOURCE
3370 # As this has a different meaning on Linux, only define it on OpenBSD
3371
Matthias Kloseb9621712010-04-24 17:59:49 +00003372$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003373
3374 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003375 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3376 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3377 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003378 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 +00003379 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003380 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3381 # request to enable features supported by the standard as a request
3382 # to disable features not supported by the standard. The best way
3383 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3384 # entirely and define __EXTENSIONS__ instead.
3385 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003386 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003387 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3388 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003389 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003390 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003391 define_xopen_source=no;;
3392 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003393 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003395 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003396 # On FreeBSD 4, the math functions C89 does not cover are never defined
3397 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3398 FreeBSD/4.*)
3399 define_xopen_source=no;;
3400 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3401 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3402 # identifies itself as Darwin/7.*
3403 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3404 # disables platform specific features beyond repair.
3405 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3406 # has no effect, don't bother defining them
3407 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003408 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003409 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003410 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003411 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3412 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3413 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003414 AIX/4)
3415 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003416 AIX/5)
3417 if test `uname -r` -eq 1; then
3418 define_xopen_source=no
3419 fi
3420 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003421 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3422 # defining NI_NUMERICHOST.
3423 QNX/6.3.2)
3424 define_xopen_source=no
3425 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427esac
3428
3429if test $define_xopen_source = yes
3430then
Victor Stinner14d098d2011-09-07 22:29:43 +02003431 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
Victor Stinner14d098d2011-09-07 22:29:43 +02003433$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
3436 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3437 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3438 # several APIs are not declared. Since this is also needed in some
3439 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003440
Matthias Kloseb9621712010-04-24 17:59:49 +00003441$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003442
3443
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003444
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003445$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003447fi
3448
Christian Heimes647cd872013-12-07 23:39:33 +01003449# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3450case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003451 hp*|HP*)
3452 define_stdc_a1=yes;;
3453 *)
3454 define_stdc_a1=no;;
3455esac
3456
3457if test $define_stdc_a1 = yes
3458then
Christian Heimes647cd872013-12-07 23:39:33 +01003459
3460$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3461
Christian Heimesb02bcae2013-12-08 15:21:08 +01003462fi
Christian Heimes647cd872013-12-07 23:39:33 +01003463
Guido van Rossum91922671997-10-09 20:24:13 +00003464#
3465# SGI compilers allow the specification of the both the ABI and the
3466# ISA on the command line. Depending on the values of these switches,
3467# different and often incompatable code will be generated.
3468#
3469# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3470# thus supply support for various ABI/ISA combinations. The MACHDEP
3471# variable is also adjusted.
3472#
3473
3474if test ! -z "$SGI_ABI"
3475then
3476 CC="cc $SGI_ABI"
3477 LDFLAGS="$SGI_ABI $LDFLAGS"
3478 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3481$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003482
Jack Jansen6b08a402004-06-03 12:41:45 +00003483# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3484# it may influence the way we can build extensions, so distutils
3485# needs to check it
3486
Thomas Wouters477c8d52006-05-27 19:21:47 +00003487
Jack Jansen6b08a402004-06-03 12:41:45 +00003488CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003489EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003490
Guido van Rossum627b2d71993-12-24 10:39:16 +00003491# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003492
3493# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3494# for debug/optimization stuff. BASECFLAGS is for flags that are required
3495# just to get things to compile and link. Users are free to override OPT
3496# when running configure or make. The build should not break if they do.
3497# BASECFLAGS should generally not be messed with, however.
3498
3499# XXX shouldn't some/most/all of this code be merged with the stuff later
3500# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3502$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003504# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003505if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003506 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003507 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003508 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003509 without_gcc=yes;;
3510 yes) CC=gcc
3511 without_gcc=no;;
3512 *) CC=$withval
3513 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003514 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003515else
Martin v. Löwis11437992002-04-12 09:54:03 +00003516
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003517 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003518 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003519 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003520 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003521 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003522fi
3523
Matthias Kloseb9621712010-04-24 17:59:49 +00003524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3525$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003534# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3535# when the compiler supports them, but we don't always want -O2, and
3536# we set -g later.
3537if test -z "$CFLAGS"; then
3538 CFLAGS=
3539fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003540
3541if test "$ac_sys_system" = "Darwin"
3542then
3543 # Compiler selection on MacOSX is more complicated than
3544 # AC_PROG_CC can handle, see Mac/README.txt for more
3545 # information
3546 if test -z "${CC}"
3547 then
3548 found_gcc=
3549 found_clang=
3550 as_save_IFS=$IFS; IFS=:
3551 for as_dir in $PATH
3552 do
3553 IFS=$as_save_IFS
3554 if test -x $as_dir/gcc; then
3555 if test -z "${found_gcc}"; then
3556 found_gcc=$as_dir/gcc
3557 fi
3558 fi
3559 if test -x $as_dir/clang; then
3560 if test -z "${found_clang}"; then
3561 found_clang=$as_dir/clang
3562 fi
3563 fi
3564 done
3565 IFS=$as_save_IFS
3566
3567 if test -n "$found_gcc" -a -n "$found_clang"
3568 then
3569 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3570 then
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3572$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3573 CC="$found_clang"
3574 CXX="$found_clang++"
3575 fi
3576
3577
3578 elif test -z "$found_gcc" -a -n "$found_clang"
3579 then
3580 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3581$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3582 CC="$found_clang"
3583 CXX="$found_clang++"
3584
3585 elif test -z "$found_gcc" -a -z "$found_clang"
3586 then
3587 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3588 if test -n "${found_clang}"
3589 then
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3591$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3592 CC="${found_clang}"
3593 CXX="`/usr/bin/xcrun -find clang++`"
3594
3595 # else: use default behaviour
3596 fi
3597 fi
3598 fi
3599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003600ac_ext=c
3601ac_cpp='$CPP $CPPFLAGS'
3602ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3603ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3604ac_compiler_gnu=$ac_cv_c_compiler_gnu
3605if test -n "$ac_tool_prefix"; then
3606 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3609$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003610if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003612else
3613 if test -n "$CC"; then
3614 ac_cv_prog_CC="$CC" # Let the user override the test.
3615else
Martin v. Löwis11437992002-04-12 09:54:03 +00003616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3617for as_dir in $PATH
3618do
3619 IFS=$as_save_IFS
3620 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 $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 +00003625 break 2
3626 fi
3627done
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003630
Jack Jansendd19cf82001-12-06 22:36:17 +00003631fi
3632fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003634if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3636$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3639$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003640fi
3641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644if test -z "$ac_cv_prog_CC"; then
3645 ac_ct_CC=$CC
3646 # Extract the first word of "gcc", so it can be a program name with args.
3647set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3649$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003650if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
3653 if test -n "$ac_ct_CC"; then
3654 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3655else
3656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3657for as_dir in $PATH
3658do
3659 IFS=$as_save_IFS
3660 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 $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 +00003665 break 2
3666 fi
3667done
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003670
3671fi
3672fi
3673ac_ct_CC=$ac_cv_prog_ac_ct_CC
3674if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3676$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3679$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680fi
3681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 if test "x$ac_ct_CC" = x; then
3683 CC=""
3684 else
3685 case $cross_compiling:$ac_tool_warned in
3686yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689ac_tool_warned=yes ;;
3690esac
3691 CC=$ac_ct_CC
3692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003693else
3694 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003695fi
3696
Jack Jansendd19cf82001-12-06 22:36:17 +00003697if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698 if test -n "$ac_tool_prefix"; then
3699 # 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 +00003700set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3702$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003703if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003705else
3706 if test -n "$CC"; then
3707 ac_cv_prog_CC="$CC" # Let the user override the test.
3708else
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
3713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 $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 +00003718 break 2
3719 fi
3720done
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003722IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003723
3724fi
3725fi
3726CC=$ac_cv_prog_CC
3727if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3729$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003730else
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3732$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738if test -z "$CC"; then
3739 # Extract the first word of "cc", so it can be a program name with args.
3740set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003743if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003745else
3746 if test -n "$CC"; then
3747 ac_cv_prog_CC="$CC" # Let the user override the test.
3748else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753 IFS=$as_save_IFS
3754 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3758 ac_prog_rejected=yes
3759 continue
3760 fi
3761 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $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 +00003763 break 2
3764 fi
3765done
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003768
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769if test $ac_prog_rejected = yes; then
3770 # We found a bogon in the path, so make sure we never use it.
3771 set dummy $ac_cv_prog_CC
3772 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 # We chose a different compiler from the bogus one.
3775 # However, it has the same basename, so the bogon will be chosen
3776 # first if we set CC to just the basename; use the full file name.
3777 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003778 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779 fi
3780fi
3781fi
3782fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003783CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3786$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787else
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790fi
3791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003792
Martin v. Löwis11437992002-04-12 09:54:03 +00003793fi
3794if test -z "$CC"; then
3795 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 do
3798 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3801$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003802if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003804else
3805 if test -n "$CC"; then
3806 ac_cv_prog_CC="$CC" # Let the user override the test.
3807else
Martin v. Löwis11437992002-04-12 09:54:03 +00003808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809for as_dir in $PATH
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003815 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003818 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
3823fi
3824fi
3825CC=$ac_cv_prog_CC
3826if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3828$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003829else
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3831$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003832fi
3833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003834
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 test -n "$CC" && break
3836 done
3837fi
3838if test -z "$CC"; then
3839 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003841do
3842 # Extract the first word of "$ac_prog", so it can be a program name with args.
3843set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3845$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003846if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003848else
3849 if test -n "$ac_ct_CC"; then
3850 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3851else
3852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3853for as_dir in $PATH
3854do
3855 IFS=$as_save_IFS
3856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003859 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 $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 +00003861 break 2
3862 fi
3863done
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003866
Martin v. Löwis11437992002-04-12 09:54:03 +00003867fi
3868fi
3869ac_ct_CC=$ac_cv_prog_ac_ct_CC
3870if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3872$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003873else
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3875$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878
Martin v. Löwis11437992002-04-12 09:54:03 +00003879 test -n "$ac_ct_CC" && break
3880done
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882 if test "x$ac_ct_CC" = x; then
3883 CC=""
3884 else
3885 case $cross_compiling:$ac_tool_warned in
3886yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889ac_tool_warned=yes ;;
3890esac
3891 CC=$ac_ct_CC
3892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
3894
3895fi
3896
3897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3899$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003900as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003901See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003902
3903# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003904$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3905set X $ac_compile
3906ac_compiler=$2
3907for ac_option in --version -v -V -qversion; do
3908 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003913eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3914$as_echo "$ac_try_echo"; } >&5
3915 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test -s conftest.err; then
3918 sed '10a\
3919... rest of stderr output deleted ...
3920 10q' conftest.err >conftest.er1
3921 cat conftest.er1 >&5
3922 fi
3923 rm -f conftest.er1 conftest.err
3924 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3925 test $ac_status = 0; }
3926done
Martin v. Löwis11437992002-04-12 09:54:03 +00003927
Matthias Kloseb9621712010-04-24 17:59:49 +00003928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003930
Martin v. Löwis11437992002-04-12 09:54:03 +00003931int
3932main ()
3933{
3934
3935 ;
3936 return 0;
3937}
3938_ACEOF
3939ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003940ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003941# Try to create an executable without -o first, disregard a.out.
3942# It will help us diagnose broken compilers, and finding out an intuition
3943# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3945$as_echo_n "checking whether the C compiler works... " >&6; }
3946ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3947
3948# The possible output files:
3949ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951ac_rmfiles=
3952for ac_file in $ac_files
3953do
3954 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003956 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3957 esac
3958done
3959rm -f $ac_rmfiles
3960
Matthias Kloseb9621712010-04-24 17:59:49 +00003961if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003962case "(($ac_try" in
3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3964 *) ac_try_echo=$ac_try;;
3965esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3967$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003969 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3971 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3973# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3974# in a Makefile. We should not override ac_cv_exeext if it was cached,
3975# so that the user can short-circuit this test for compilers unknown to
3976# Autoconf.
3977for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003978do
3979 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 ;;
3983 [ab].out )
3984 # We found the default executable, but exeext='' is most
3985 # certainly right.
3986 break;;
3987 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 then :; else
3990 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 fi
3992 # We set ac_cv_exeext here because the later test for it is not
3993 # safe: cross compilers may not add the suffix if given an `-o'
3994 # argument, so we may need to know it at that point already.
3995 # Even if this section looks crufty: it has the advantage of
3996 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997 break;;
3998 * )
3999 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 esac
4001done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002test "$ac_cv_exeext" = no && ac_cv_exeext=
4003
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004004else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005 ac_file=''
4006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004007if test -z "$ac_file"; then :
4008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4009$as_echo "no" >&6; }
4010$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004011sed 's/^/| /' conftest.$ac_ext >&5
4012
Matthias Kloseb9621712010-04-24 17:59:49 +00004013{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004015as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004016See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004017else
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4019$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4022$as_echo_n "checking for C compiler default output file name... " >&6; }
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4024$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
Matthias Kloseb9621712010-04-24 17:59:49 +00004027rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4030$as_echo_n "checking for suffix of executables... " >&6; }
4031if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004032case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004038 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004039 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4043# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4044# work properly (i.e., refer to `conftest.exe'), while it won't with
4045# `rm'.
4046for ac_file in conftest.exe conftest conftest.*; do
4047 test -f "$ac_file" || continue
4048 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4051 break;;
4052 * ) break;;
4053 esac
4054done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004055else
Matthias Kloseb9621712010-04-24 17:59:49 +00004056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004058as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004059See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061rm -f conftest conftest$ac_cv_exeext
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4063$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064
4065rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004066EXEEXT=$ac_cv_exeext
4067ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4069/* end confdefs.h. */
4070#include <stdio.h>
4071int
4072main ()
4073{
4074FILE *f = fopen ("conftest.out", "w");
4075 return ferror (f) || fclose (f) != 0;
4076
4077 ;
4078 return 0;
4079}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004081ac_clean_files="$ac_clean_files conftest.out"
4082# Check that the compiler produces executables we can run. If not, either
4083# the compiler is broken, or we cross compile.
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4085$as_echo_n "checking whether we are cross compiling... " >&6; }
4086if test "$cross_compiling" != yes; then
4087 { { ac_try="$ac_link"
4088case "(($ac_try" in
4089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4090 *) ac_try_echo=$ac_try;;
4091esac
4092eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4093$as_echo "$ac_try_echo"; } >&5
4094 (eval "$ac_link") 2>&5
4095 ac_status=$?
4096 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4097 test $ac_status = 0; }
4098 if { ac_try='./conftest$ac_cv_exeext'
4099 { { case "(($ac_try" in
4100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4101 *) ac_try_echo=$ac_try;;
4102esac
4103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4104$as_echo "$ac_try_echo"; } >&5
4105 (eval "$ac_try") 2>&5
4106 ac_status=$?
4107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4108 test $ac_status = 0; }; }; then
4109 cross_compiling=no
4110 else
4111 if test "$cross_compiling" = maybe; then
4112 cross_compiling=yes
4113 else
4114 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004116as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004117If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004118See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 fi
4120 fi
4121fi
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4123$as_echo "$cross_compiling" >&6; }
4124
4125rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4126ac_clean_files=$ac_clean_files_save
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4128$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004129if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 $as_echo_n "(cached) " >&6
4131else
4132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133/* end confdefs.h. */
4134
4135int
4136main ()
4137{
4138
4139 ;
4140 return 0;
4141}
4142_ACEOF
4143rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004144if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145case "(($ac_try" in
4146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4147 *) ac_try_echo=$ac_try;;
4148esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4150$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4154 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 for ac_file in conftest.o conftest.obj conftest.*; do
4156 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4160 break;;
4161 esac
4162done
4163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004165sed 's/^/| /' conftest.$ac_ext >&5
4166
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004169as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004170See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4175$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004176OBJEXT=$ac_cv_objext
4177ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4179$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004180if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
4187main ()
4188{
4189#ifndef __GNUC__
4190 choke me
4191#endif
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_compiler_gnu=yes
4199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004203ac_cv_c_compiler_gnu=$ac_compiler_gnu
4204
4205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4207$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4208if test $ac_compiler_gnu = yes; then
4209 GCC=yes
4210else
4211 GCC=
4212fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_test_CFLAGS=${CFLAGS+set}
4214ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4216$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_save_c_werror_flag=$ac_c_werror_flag
4221 ac_c_werror_flag=yes
4222 ac_cv_prog_cc_g=no
4223 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
Martin v. Löwis11437992002-04-12 09:54:03 +00004227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004235if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004236 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 CFLAGS=""
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004250if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251
Matthias Kloseb9621712010-04-24 17:59:49 +00004252else
4253 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* end confdefs.h. */
4257
4258int
4259main ()
4260{
4261
4262 ;
4263 return 0;
4264}
4265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004266if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4274 ac_c_werror_flag=$ac_save_c_werror_flag
4275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4277$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004278if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004280elif test $ac_cv_prog_cc_g = yes; then
4281 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004282 CFLAGS="-g -O2"
4283 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 fi
4286else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 if test "$GCC" = yes; then
4288 CFLAGS="-O2"
4289 else
4290 CFLAGS=
4291 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4294$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004295if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004297else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004299ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004301/* end confdefs.h. */
4302#include <stdarg.h>
4303#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004304struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4306struct buf { int x; };
4307FILE * (*rcsopen) (struct buf *, struct stat *, int);
4308static char *e (p, i)
4309 char **p;
4310 int i;
4311{
4312 return p[i];
4313}
4314static char *f (char * (*g) (char **, int), char **p, ...)
4315{
4316 char *s;
4317 va_list v;
4318 va_start (v,p);
4319 s = g (p, va_arg (v,int));
4320 va_end (v);
4321 return s;
4322}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323
4324/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4325 function prototypes and stuff, but not '\xHH' hex character constants.
4326 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004328 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4329 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4334 inside strings and character constants. */
4335#define FOO(x) 'x'
4336int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4337
Skip Montanaro6dead952003-09-25 14:50:04 +00004338int test (int i, double x);
4339struct s1 {int (*f) (int a);};
4340struct s2 {int (*f) (double a);};
4341int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4342int argc;
4343char **argv;
4344int
4345main ()
4346{
4347return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4348 ;
4349 return 0;
4350}
4351_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4353 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004354do
4355 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004356 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359rm -f core conftest.err conftest.$ac_objext
4360 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004361done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004363CC=$ac_save_CC
4364
4365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366# AC_CACHE_VAL
4367case "x$ac_cv_prog_cc_c89" in
4368 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4370$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4373$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004374 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4377$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004379if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004380
Matthias Kloseb9621712010-04-24 17:59:49 +00004381fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004382
Martin v. Löwis11437992002-04-12 09:54:03 +00004383ac_ext=c
4384ac_cpp='$CPP $CPPFLAGS'
4385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4387ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004389
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004390
4391
Matthias Kloseb9621712010-04-24 17:59:49 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4393$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004395# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004397 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004398
4399 case $withval in
4400 no) with_cxx_main=no
4401 MAINCC='$(CC)';;
4402 yes) with_cxx_main=yes
4403 MAINCC='$(CXX)';;
4404 *) with_cxx_main=yes
4405 MAINCC=$withval
4406 if test -z "$CXX"
4407 then
4408 CXX=$withval
4409 fi;;
4410 esac
4411else
4412
4413 with_cxx_main=no
4414 MAINCC='$(CC)'
4415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416fi
4417
Matthias Kloseb9621712010-04-24 17:59:49 +00004418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4419$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004420
4421preset_cxx="$CXX"
4422if test -z "$CXX"
4423then
4424 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004425 gcc) if test -n "$ac_tool_prefix"; then
4426 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4427set dummy ${ac_tool_prefix}g++; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_CXX+:} false; then :
4431 $as_echo_n "(cached) " >&6
4432else
4433 case $CXX in
4434 [\\/]* | ?:[\\/]*)
4435 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4436 ;;
4437 *)
4438 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in notfound
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453 ;;
4454esac
4455fi
4456CXX=$ac_cv_path_CXX
4457if test -n "$CXX"; then
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4459$as_echo "$CXX" >&6; }
4460else
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466fi
4467if test -z "$ac_cv_path_CXX"; then
4468 ac_pt_CXX=$CXX
4469 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004470set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4472$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004473if ${ac_cv_path_ac_pt_CXX+:} false; then :
4474 $as_echo_n "(cached) " >&6
4475else
4476 case $ac_pt_CXX in
4477 [\\/]* | ?:[\\/]*)
4478 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4479 ;;
4480 *)
4481 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4482for as_dir in notfound
4483do
4484 IFS=$as_save_IFS
4485 test -z "$as_dir" && as_dir=.
4486 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004487 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004488 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4489 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4490 break 2
4491 fi
4492done
4493 done
4494IFS=$as_save_IFS
4495
4496 ;;
4497esac
4498fi
4499ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4500if test -n "$ac_pt_CXX"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4502$as_echo "$ac_pt_CXX" >&6; }
4503else
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508 if test "x$ac_pt_CXX" = x; then
4509 CXX="g++"
4510 else
4511 case $cross_compiling:$ac_tool_warned in
4512yes:)
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4515ac_tool_warned=yes ;;
4516esac
4517 CXX=$ac_pt_CXX
4518 fi
4519else
4520 CXX="$ac_cv_path_CXX"
4521fi
4522 ;;
4523 cc) if test -n "$ac_tool_prefix"; then
4524 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4525set dummy ${ac_tool_prefix}c++; ac_word=$2
4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4527$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004528if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530else
4531 case $CXX in
4532 [\\/]* | ?:[\\/]*)
4533 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4534 ;;
4535 *)
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in notfound
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004541 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 break 2
4546 fi
4547done
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004549IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004551 ;;
4552esac
4553fi
4554CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004555if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4557$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558else
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004563
4564fi
4565if test -z "$ac_cv_path_CXX"; then
4566 ac_pt_CXX=$CXX
4567 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4570$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004571if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004575 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576 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 +00004577 ;;
4578 *)
4579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4580for as_dir in notfound
4581do
4582 IFS=$as_save_IFS
4583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004584 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004586 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588 break 2
4589 fi
4590done
Matthias Kloseb9621712010-04-24 17:59:49 +00004591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594 ;;
4595esac
4596fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004597ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4598if test -n "$ac_pt_CXX"; then
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4600$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004601else
Matthias Kloseb9621712010-04-24 17:59:49 +00004602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4603$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004605
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004606 if test "x$ac_pt_CXX" = x; then
4607 CXX="c++"
4608 else
4609 case $cross_compiling:$ac_tool_warned in
4610yes:)
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4612$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4613ac_tool_warned=yes ;;
4614esac
4615 CXX=$ac_pt_CXX
4616 fi
4617else
4618 CXX="$ac_cv_path_CXX"
4619fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004620 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004621 clang|*/clang) if test -n "$ac_tool_prefix"; then
4622 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4623set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4625$as_echo_n "checking for $ac_word... " >&6; }
4626if ${ac_cv_path_CXX+:} false; then :
4627 $as_echo_n "(cached) " >&6
4628else
4629 case $CXX in
4630 [\\/]* | ?:[\\/]*)
4631 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4632 ;;
4633 *)
4634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4635for as_dir in notfound
4636do
4637 IFS=$as_save_IFS
4638 test -z "$as_dir" && as_dir=.
4639 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4643 break 2
4644 fi
4645done
4646 done
4647IFS=$as_save_IFS
4648
Ned Deilycbfb9a52012-06-23 16:02:19 -07004649 ;;
4650esac
4651fi
4652CXX=$ac_cv_path_CXX
4653if test -n "$CXX"; then
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4655$as_echo "$CXX" >&6; }
4656else
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4658$as_echo "no" >&6; }
4659fi
4660
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004661
4662fi
4663if test -z "$ac_cv_path_CXX"; then
4664 ac_pt_CXX=$CXX
4665 # Extract the first word of "clang++", so it can be a program name with args.
4666set dummy clang++; ac_word=$2
4667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4668$as_echo_n "checking for $ac_word... " >&6; }
4669if ${ac_cv_path_ac_pt_CXX+:} false; then :
4670 $as_echo_n "(cached) " >&6
4671else
4672 case $ac_pt_CXX in
4673 [\\/]* | ?:[\\/]*)
4674 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4675 ;;
4676 *)
4677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4678for as_dir in notfound
4679do
4680 IFS=$as_save_IFS
4681 test -z "$as_dir" && as_dir=.
4682 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004684 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4686 break 2
4687 fi
4688done
4689 done
4690IFS=$as_save_IFS
4691
4692 ;;
4693esac
4694fi
4695ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4696if test -n "$ac_pt_CXX"; then
4697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4698$as_echo "$ac_pt_CXX" >&6; }
4699else
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4701$as_echo "no" >&6; }
4702fi
4703
4704 if test "x$ac_pt_CXX" = x; then
4705 CXX="clang++"
4706 else
4707 case $cross_compiling:$ac_tool_warned in
4708yes:)
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4711ac_tool_warned=yes ;;
4712esac
4713 CXX=$ac_pt_CXX
4714 fi
4715else
4716 CXX="$ac_cv_path_CXX"
4717fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004718 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004719 esac
4720 if test "$CXX" = "notfound"
4721 then
4722 CXX=""
4723 fi
4724fi
4725if test -z "$CXX"
4726then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727 if test -n "$ac_tool_prefix"; then
4728 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4729 do
4730 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004734if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736else
4737 if test -n "$CXX"; then
4738 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4739else
4740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4741for as_dir in $PATH
4742do
4743 IFS=$as_save_IFS
4744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004747 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 break 2
4750 fi
4751done
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754
4755fi
4756fi
4757CXX=$ac_cv_prog_CXX
4758if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4760$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004761else
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4763$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764fi
4765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004766
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 test -n "$CXX" && break
4768 done
4769fi
4770if test -z "$CXX"; then
4771 ac_ct_CXX=$CXX
4772 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4773do
4774 # Extract the first word of "$ac_prog", so it can be a program name with args.
4775set dummy $ac_prog; ac_word=$2
4776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4777$as_echo_n "checking for $ac_word... " >&6; }
4778if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4779 $as_echo_n "(cached) " >&6
4780else
4781 if test -n "$ac_ct_CXX"; then
4782 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4783else
4784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4785for as_dir in $PATH
4786do
4787 IFS=$as_save_IFS
4788 test -z "$as_dir" && as_dir=.
4789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004791 ac_cv_prog_ac_ct_CXX="$ac_prog"
4792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4793 break 2
4794 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 done
4797IFS=$as_save_IFS
4798
4799fi
4800fi
4801ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4802if test -n "$ac_ct_CXX"; then
4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4804$as_echo "$ac_ct_CXX" >&6; }
4805else
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811 test -n "$ac_ct_CXX" && break
4812done
4813
4814 if test "x$ac_ct_CXX" = x; then
4815 CXX="notfound"
4816 else
4817 case $cross_compiling:$ac_tool_warned in
4818yes:)
4819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4821ac_tool_warned=yes ;;
4822esac
4823 CXX=$ac_ct_CXX
4824 fi
4825fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004826
4827 if test "$CXX" = "notfound"
4828 then
4829 CXX=""
4830 fi
4831fi
4832if test "$preset_cxx" != "$CXX"
4833then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004834 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004835
4836 By default, distutils will build C++ extension modules with \"$CXX\".
4837 If this is not intended, then set CXX on the configure command line.
4838 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004839$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004840
4841 By default, distutils will build C++ extension modules with \"$CXX\".
4842 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004843 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004844fi
4845
4846
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4848$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4849save_LDFLAGS="$LDFLAGS"
4850LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004851
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4853/* end confdefs.h. */
4854
4855int
4856main ()
4857{
4858
4859 ;
4860 return 0;
4861}
4862_ACEOF
4863if ac_fn_c_try_link "$LINENO"; then :
4864 NO_AS_NEEDED="-Wl,--no-as-needed"
4865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4866$as_echo "yes" >&6; }
4867else
4868 NO_AS_NEEDED=""
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872rm -f core conftest.err conftest.$ac_objext \
4873 conftest$ac_exeext conftest.$ac_ext
4874LDFLAGS="$save_LDFLAGS"
4875
4876
4877
4878# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004879ac_ext=c
4880ac_cpp='$CPP $CPPFLAGS'
4881ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4882ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4883ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4885$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004886# On Suns, sometimes $CPP names a directory.
4887if test -n "$CPP" && test -d "$CPP"; then
4888 CPP=
4889fi
4890if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004891 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Double quotes because CPP needs to be expanded
4895 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4896 do
4897 ac_preproc_ok=false
4898for ac_c_preproc_warn_flag in '' yes
4899do
4900 # Use a header file that comes with gcc, so configuring glibc
4901 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004902 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4903 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004904 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004907/* end confdefs.h. */
4908#ifdef __STDC__
4909# include <limits.h>
4910#else
4911# include <assert.h>
4912#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004913 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004915if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004916
Matthias Kloseb9621712010-04-24 17:59:49 +00004917else
Martin v. Löwis11437992002-04-12 09:54:03 +00004918 # Broken: fails on valid input.
4919continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004920fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004921rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004923 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004927#include <ac_nonexistent.h>
4928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004929if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 # Broken: success on invalid input.
4931continue
4932else
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Passes both tests.
4934ac_preproc_ok=:
4935break
4936fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004937rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004938
4939done
4940# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004941rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004942if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004943 break
4944fi
4945
4946 done
4947 ac_cv_prog_CPP=$CPP
4948
4949fi
4950 CPP=$ac_cv_prog_CPP
4951else
4952 ac_cv_prog_CPP=$CPP
4953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4955$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004956ac_preproc_ok=false
4957for ac_c_preproc_warn_flag in '' yes
4958do
4959 # Use a header file that comes with gcc, so configuring glibc
4960 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004961 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4962 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004963 # On the NeXT, cc -E runs the code through the compiler's parser,
4964 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004966/* end confdefs.h. */
4967#ifdef __STDC__
4968# include <limits.h>
4969#else
4970# include <assert.h>
4971#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004972 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004974if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976else
Martin v. Löwis11437992002-04-12 09:54:03 +00004977 # Broken: fails on valid input.
4978continue
4979fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004980rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004983 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004986#include <ac_nonexistent.h>
4987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004988if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 # Broken: success on invalid input.
4990continue
4991else
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Passes both tests.
4993ac_preproc_ok=:
4994break
4995fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004996rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004997
4998done
4999# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005000rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005001if $ac_preproc_ok; then :
5002
Martin v. Löwis11437992002-04-12 09:54:03 +00005003else
Matthias Kloseb9621712010-04-24 17:59:49 +00005004 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005006as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005007See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005008fi
5009
5010ac_ext=c
5011ac_cpp='$CPP $CPPFLAGS'
5012ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5013ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5014ac_compiler_gnu=$ac_cv_c_compiler_gnu
5015
5016
Matthias Kloseb9621712010-04-24 17:59:49 +00005017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5018$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005019if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005021else
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 # Loop through the user's path and test for each of PROGNAME-LIST
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5027do
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 for ac_prog in grep ggrep; do
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005033 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005034# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035 # Check for GNU $ac_path_GREP
5036case `"$ac_path_GREP" --version 2>&1` in
5037*GNU*)
5038 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5039*)
5040 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042 while :
5043 do
5044 cat "conftest.in" "conftest.in" >"conftest.tmp"
5045 mv "conftest.tmp" "conftest.in"
5046 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5049 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5052 # Best one so far, save it but keep looking for a better one
5053 ac_cv_path_GREP="$ac_path_GREP"
5054 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005055 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056 # 10*(2^10) chars as input seems more than enough
5057 test $ac_count -gt 10 && break
5058 done
5059 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5060esac
5061
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 $ac_path_GREP_found && break 3
5063 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005068 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 +00005069 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070else
5071 ac_cv_path_GREP=$GREP
5072fi
5073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5076$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077 GREP="$ac_cv_path_GREP"
5078
5079
Matthias Kloseb9621712010-04-24 17:59:49 +00005080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5081$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005082if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084else
5085 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5086 then ac_cv_path_EGREP="$GREP -E"
5087 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 # Loop through the user's path and test for each of PROGNAME-LIST
5091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005096 for ac_prog in egrep; do
5097 for ac_exec_ext in '' $ac_executable_extensions; do
5098 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005099 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005100# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 # Check for GNU $ac_path_EGREP
5102case `"$ac_path_EGREP" --version 2>&1` in
5103*GNU*)
5104 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5105*)
5106 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108 while :
5109 do
5110 cat "conftest.in" "conftest.in" >"conftest.tmp"
5111 mv "conftest.tmp" "conftest.in"
5112 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5115 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5118 # Best one so far, save it but keep looking for a better one
5119 ac_cv_path_EGREP="$ac_path_EGREP"
5120 ac_path_EGREP_max=$ac_count
5121 fi
5122 # 10*(2^10) chars as input seems more than enough
5123 test $ac_count -gt 10 && break
5124 done
5125 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5126esac
5127
Matthias Kloseb9621712010-04-24 17:59:49 +00005128 $ac_path_EGREP_found && break 3
5129 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005130 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005132IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005134 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 +00005135 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005136else
5137 ac_cv_path_EGREP=$EGREP
5138fi
5139
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005140 fi
5141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5143$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005144 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005145
5146
Matthias Kloseb9621712010-04-24 17:59:49 +00005147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5148$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005149if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 $as_echo_n "(cached) " >&6
5151else
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005153/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005154#include <stdlib.h>
5155#include <stdarg.h>
5156#include <string.h>
5157#include <float.h>
5158
5159int
5160main ()
5161{
5162
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167if ac_fn_c_try_compile "$LINENO"; then :
5168 ac_cv_header_stdc=yes
5169else
5170 ac_cv_header_stdc=no
5171fi
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5173
5174if test $ac_cv_header_stdc = yes; then
5175 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5177/* end confdefs.h. */
5178#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005179
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005180_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005181if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005182 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005183
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184else
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005186fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005187rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188
Matthias Kloseb9621712010-04-24 17:59:49 +00005189fi
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <stdlib.h>
5196
5197_ACEOF
5198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5199 $EGREP "free" >/dev/null 2>&1; then :
5200
5201else
5202 ac_cv_header_stdc=no
5203fi
5204rm -f conftest*
5205
5206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5210 if test "$cross_compiling" = yes; then :
5211 :
5212else
5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5214/* end confdefs.h. */
5215#include <ctype.h>
5216#include <stdlib.h>
5217#if ((' ' & 0x0FF) == 0x020)
5218# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5219# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5220#else
5221# define ISLOWER(c) \
5222 (('a' <= (c) && (c) <= 'i') \
5223 || ('j' <= (c) && (c) <= 'r') \
5224 || ('s' <= (c) && (c) <= 'z'))
5225# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5226#endif
5227
5228#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5229int
5230main ()
5231{
5232 int i;
5233 for (i = 0; i < 256; i++)
5234 if (XOR (islower (i), ISLOWER (i))
5235 || toupper (i) != TOUPPER (i))
5236 return 2;
5237 return 0;
5238}
5239_ACEOF
5240if ac_fn_c_try_run "$LINENO"; then :
5241
5242else
5243 ac_cv_header_stdc=no
5244fi
5245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5246 conftest.$ac_objext conftest.beam conftest.$ac_ext
5247fi
5248
5249fi
5250fi
5251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5252$as_echo "$ac_cv_header_stdc" >&6; }
5253if test $ac_cv_header_stdc = yes; then
5254
5255$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5256
5257fi
5258
5259# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5260for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5261 inttypes.h stdint.h unistd.h
5262do :
5263 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5264ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5265"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005266if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005267 cat >>confdefs.h <<_ACEOF
5268#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5269_ACEOF
5270
5271fi
5272
5273done
5274
5275
5276
5277 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 +02005278if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005279 MINIX=yes
5280else
5281 MINIX=
5282fi
5283
5284
5285 if test "$MINIX" = yes; then
5286
5287$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5288
5289
5290$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5291
5292
5293$as_echo "#define _MINIX 1" >>confdefs.h
5294
5295 fi
5296
5297
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5299$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005300if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005301 $as_echo_n "(cached) " >&6
5302else
5303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5304/* end confdefs.h. */
5305
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005306# define __EXTENSIONS__ 1
5307 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_compile "$LINENO"; then :
5317 ac_cv_safe_to_define___extensions__=yes
5318else
5319 ac_cv_safe_to_define___extensions__=no
5320fi
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5322fi
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5324$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5325 test $ac_cv_safe_to_define___extensions__ = yes &&
5326 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5327
5328 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5329
5330 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5331
5332 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5333
5334 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5335
5336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338# Check for unsupported systems
5339case $ac_sys_system/$ac_sys_release in
5340atheos*|Linux*/1*)
5341 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5342 echo See README for details.
5343 exit 1;;
5344esac
5345
5346
Matthias Kloseb9621712010-04-24 17:59:49 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5348$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005349
5350# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005351if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 withval=$with_suffix;
5353 case $withval in
5354 no) EXEEXT=;;
5355 yes) EXEEXT=.exe;;
5356 *) EXEEXT=$withval;;
5357 esac
5358fi
5359
Matthias Kloseb9621712010-04-24 17:59:49 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5361$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363# Test whether we're running on a non-case-sensitive system, in which
5364# case we give a warning if no ext is given
5365
Matthias Kloseb9621712010-04-24 17:59:49 +00005366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5367$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368if test ! -d CaseSensitiveTestDir; then
5369mkdir CaseSensitiveTestDir
5370fi
5371
5372if test -d casesensitivetestdir
5373then
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5375$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376 BUILDEXEEXT=.exe
5377else
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5379$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380 BUILDEXEEXT=$EXEEXT
5381fi
5382rmdir CaseSensitiveTestDir
5383
5384case $MACHDEP in
5385bsdos*)
5386 case $CC in
5387 gcc) CC="$CC -D_HAVE_BSDI";;
5388 esac;;
5389esac
5390
5391case $ac_sys_system in
5392hp*|HP*)
5393 case $CC in
5394 cc|*/cc) CC="$CC -Ae";;
5395 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005396esac
5397
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005398MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5399
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5404$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405if test -z "$LIBRARY"
5406then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005407 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5410$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411
5412# LDLIBRARY is the name of the library to link against (as opposed to the
5413# name of the library into which to insert object files). BLDLIBRARY is also
5414# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5415# is blank as the main program is not linked directly against LDLIBRARY.
5416# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5417# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5418# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5419# DLLLIBRARY is the shared (i.e., DLL) library.
5420#
5421# RUNSHARED is used to run shared python without installed libraries
5422#
5423# INSTSONAME is the name of the shared library that will be use to install
5424# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005425#
5426# LDVERSION is the shared library version number, normally the Python version
5427# with the ABI build flags appended.
5428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429
5430
5431
5432
5433
5434
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436LDLIBRARY="$LIBRARY"
5437BLDLIBRARY='$(LDLIBRARY)'
5438INSTSONAME='$(LDLIBRARY)'
5439DLLLIBRARY=''
5440LDLIBRARYDIR=''
5441RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005442LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
5444# LINKCC is the command that links the python executable -- default is $(CC).
5445# If CXX is set, and if it is needed to link a main function that was
5446# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5447# python might then depend on the C++ runtime
5448# This is altered for AIX in order to build the export list before
5449# linking.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5452$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453if test -z "$LINKCC"
5454then
5455 LINKCC='$(PURIFY) $(MAINCC)'
5456 case $ac_sys_system in
5457 AIX*)
5458 exp_extra="\"\""
5459 if test $ac_sys_release -ge 5 -o \
5460 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5461 exp_extra="."
5462 fi
5463 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464 QNX*)
5465 # qcc must be used because the other compilers do not
5466 # support -N.
5467 LINKCC=qcc;;
5468 esac
5469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5471$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472
5473# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5474# make sure we default having it set to "no": this is used by
5475# distutils.unixccompiler to know if it should add --enable-new-dtags
5476# to linker command lines, and failing to detect GNU ld simply results
5477# in the same bahaviour as before.
5478
Matthias Kloseb9621712010-04-24 17:59:49 +00005479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5480$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481ac_prog=ld
5482if test "$GCC" = yes; then
5483 ac_prog=`$CC -print-prog-name=ld`
5484fi
5485case `"$ac_prog" -V 2>&1 < /dev/null` in
5486 *GNU*)
5487 GNULD=yes;;
5488 *)
5489 GNULD=no;;
5490esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5492$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005493
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5495$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005496if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497 $as_echo_n "(cached) " >&6
5498else
5499 ac_cv_c_inline=no
5500for ac_kw in inline __inline__ __inline; do
5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5502/* end confdefs.h. */
5503#ifndef __cplusplus
5504typedef int foo_t;
5505static $ac_kw foo_t static_foo () {return 0; }
5506$ac_kw foo_t foo () {return 0; }
5507#endif
5508
5509_ACEOF
5510if ac_fn_c_try_compile "$LINENO"; then :
5511 ac_cv_c_inline=$ac_kw
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514 test "$ac_cv_c_inline" != no && break
5515done
5516
5517fi
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5519$as_echo "$ac_cv_c_inline" >&6; }
5520
5521case $ac_cv_c_inline in
5522 inline | yes) ;;
5523 *)
5524 case $ac_cv_c_inline in
5525 no) ac_val=;;
5526 *) ac_val=$ac_cv_c_inline;;
5527 esac
5528 cat >>confdefs.h <<_ACEOF
5529#ifndef __cplusplus
5530#define inline $ac_val
5531#endif
5532_ACEOF
5533 ;;
5534esac
5535
5536if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005537
5538$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005539
5540
5541fi
5542
5543
Matthias Kloseb9621712010-04-24 17:59:49 +00005544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5545$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005546# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005547if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005548 enableval=$enable_shared;
5549fi
5550
5551
5552if test -z "$enable_shared"
5553then
5554 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005555 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556 enable_shared="yes";;
5557 *)
5558 enable_shared="no";;
5559 esac
5560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5562$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5565$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005567if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005568 enableval=$enable_profiling;
5569fi
5570
5571if test "x$enable_profiling" = xyes; then
5572 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005573 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005575/* end confdefs.h. */
5576int main() { return 0; }
5577_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005578if ac_fn_c_try_link "$LINENO"; then :
5579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005582fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005583rm -f core conftest.err conftest.$ac_objext \
5584 conftest$ac_exeext conftest.$ac_ext
5585 CC="$ac_save_cc"
5586else
5587 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005588fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5590$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592if test "x$enable_profiling" = xyes; then
5593 BASECFLAGS="-pg $BASECFLAGS"
5594 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595fi
5596
Matthias Kloseb9621712010-04-24 17:59:49 +00005597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5598$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
5600# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5601# library that we build, but we do not want to link against it (we
5602# will find it with a -framework option). For this reason there is an
5603# extra variable BLDLIBRARY against which Python and the extension
5604# modules are linked, BLDLIBRARY. This is normally the same as
5605# LDLIBRARY, but empty for MacOSX framework builds.
5606if test "$enable_framework"
5607then
5608 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005609 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 BLDLIBRARY=''
5611else
5612 BLDLIBRARY='$(LDLIBRARY)'
5613fi
5614
5615# Other platforms follow
5616if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005617 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618
Matthias Kloseb9621712010-04-24 17:59:49 +00005619$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620
5621 case $ac_sys_system in
5622 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005623 LDLIBRARY='libpython$(LDVERSION).dll.a'
5624 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005625 ;;
5626 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005627 LDLIBRARY='libpython$(LDVERSION).so'
5628 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005629 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005631 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005632 then
5633 PY3LIBRARY=libpython3.so
5634 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005636 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005637 LDLIBRARY='libpython$(LDVERSION).so'
5638 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005639 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 case $ac_sys_system in
5641 FreeBSD*)
5642 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5643 ;;
5644 esac
5645 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005646 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005647 then
5648 PY3LIBRARY=libpython3.so
5649 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650 ;;
5651 hp*|HP*)
5652 case `uname -m` in
5653 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 ;;
5656 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005661 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005664 LDLIBRARY='libpython$(LDVERSION).dylib'
5665 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005666 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005668 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005669 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005670 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673 esac
5674else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005675 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 case $ac_sys_system in
5677 CYGWIN*)
5678 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005679 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 ;;
5681 esac
5682fi
5683
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005684if test "$cross_compiling" = yes; then
5685 RUNSHARED=
5686fi
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5689$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691if test -n "$ac_tool_prefix"; then
5692 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5693set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005696if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
5699 if test -n "$RANLIB"; then
5700 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 break 2
5712 fi
5713done
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715IFS=$as_save_IFS
5716
5717fi
5718fi
5719RANLIB=$ac_cv_prog_RANLIB
5720if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5722$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728
5729fi
5730if test -z "$ac_cv_prog_RANLIB"; then
5731 ac_ct_RANLIB=$RANLIB
5732 # Extract the first word of "ranlib", so it can be a program name with args.
5733set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5735$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005736if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005737 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738else
5739 if test -n "$ac_ct_RANLIB"; then
5740 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5741else
5742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743for as_dir in $PATH
5744do
5745 IFS=$as_save_IFS
5746 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 break 2
5752 fi
5753done
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755IFS=$as_save_IFS
5756
5757fi
5758fi
5759ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5760if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5762$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763else
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5765$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766fi
5767
5768 if test "x$ac_ct_RANLIB" = x; then
5769 RANLIB=":"
5770 else
5771 case $cross_compiling:$ac_tool_warned in
5772yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775ac_tool_warned=yes ;;
5776esac
5777 RANLIB=$ac_ct_RANLIB
5778 fi
5779else
5780 RANLIB="$ac_cv_prog_RANLIB"
5781fi
5782
5783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784if test -n "$ac_tool_prefix"; then
5785 for ac_prog in ar aal
5786 do
5787 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5788set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5790$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005791if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005792 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793else
5794 if test -n "$AR"; then
5795 ac_cv_prog_AR="$AR" # Let the user override the test.
5796else
5797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5798for as_dir in $PATH
5799do
5800 IFS=$as_save_IFS
5801 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005802 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005804 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806 break 2
5807 fi
5808done
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810IFS=$as_save_IFS
5811
5812fi
5813fi
5814AR=$ac_cv_prog_AR
5815if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5817$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818else
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821fi
5822
5823
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005824 test -n "$AR" && break
5825 done
5826fi
5827if test -z "$AR"; then
5828 ac_ct_AR=$AR
5829 for ac_prog in ar aal
5830do
5831 # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if ${ac_cv_prog_ac_ct_AR+:} false; then :
5836 $as_echo_n "(cached) " >&6
5837else
5838 if test -n "$ac_ct_AR"; then
5839 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5840else
5841as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5842for as_dir in $PATH
5843do
5844 IFS=$as_save_IFS
5845 test -z "$as_dir" && as_dir=.
5846 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005848 ac_cv_prog_ac_ct_AR="$ac_prog"
5849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5850 break 2
5851 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005853 done
5854IFS=$as_save_IFS
5855
5856fi
5857fi
5858ac_ct_AR=$ac_cv_prog_ac_ct_AR
5859if test -n "$ac_ct_AR"; then
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5861$as_echo "$ac_ct_AR" >&6; }
5862else
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5864$as_echo "no" >&6; }
5865fi
5866
5867
5868 test -n "$ac_ct_AR" && break
5869done
5870
5871 if test "x$ac_ct_AR" = x; then
5872 AR="ar"
5873 else
5874 case $cross_compiling:$ac_tool_warned in
5875yes:)
5876{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5877$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5878ac_tool_warned=yes ;;
5879esac
5880 AR=$ac_ct_AR
5881 fi
5882fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883
5884
5885# tweak ARFLAGS only if the user didn't set it on the command line
5886
5887if test -z "$ARFLAGS"
5888then
5889 ARFLAGS="rc"
5890fi
5891
doko@ubuntu.com58844492012-06-30 18:25:32 +02005892if test -n "$ac_tool_prefix"; then
5893 for ac_prog in readelf
5894 do
5895 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5896set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5898$as_echo_n "checking for $ac_word... " >&6; }
5899if ${ac_cv_prog_READELF+:} false; then :
5900 $as_echo_n "(cached) " >&6
5901else
5902 if test -n "$READELF"; then
5903 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5904else
5905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908 IFS=$as_save_IFS
5909 test -z "$as_dir" && as_dir=.
5910 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005912 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914 break 2
5915 fi
5916done
5917 done
5918IFS=$as_save_IFS
5919
5920fi
5921fi
5922READELF=$ac_cv_prog_READELF
5923if test -n "$READELF"; then
5924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5925$as_echo "$READELF" >&6; }
5926else
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5928$as_echo "no" >&6; }
5929fi
5930
5931
5932 test -n "$READELF" && break
5933 done
5934fi
5935if test -z "$READELF"; then
5936 ac_ct_READELF=$READELF
5937 for ac_prog in readelf
5938do
5939 # Extract the first word of "$ac_prog", so it can be a program name with args.
5940set dummy $ac_prog; ac_word=$2
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
5943if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5944 $as_echo_n "(cached) " >&6
5945else
5946 if test -n "$ac_ct_READELF"; then
5947 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
5954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005956 ac_cv_prog_ac_ct_READELF="$ac_prog"
5957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5958 break 2
5959 fi
5960done
5961 done
5962IFS=$as_save_IFS
5963
5964fi
5965fi
5966ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5967if test -n "$ac_ct_READELF"; then
5968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5969$as_echo "$ac_ct_READELF" >&6; }
5970else
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
5973fi
5974
5975
5976 test -n "$ac_ct_READELF" && break
5977done
5978
5979 if test "x$ac_ct_READELF" = x; then
5980 READELF=":"
5981 else
5982 case $cross_compiling:$ac_tool_warned in
5983yes:)
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5986ac_tool_warned=yes ;;
5987esac
5988 READELF=$ac_ct_READELF
5989 fi
5990fi
5991
5992if test "$cross_compiling" = yes; then
5993 case "$READELF" in
5994 readelf|:)
5995 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5996 ;;
5997 esac
5998fi
5999
6000
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006001
Matthias Klosec4c48422012-10-21 23:05:35 +02006002for ac_prog in python$PACKAGE_VERSION python3 python
6003do
6004 # Extract the first word of "$ac_prog", so it can be a program name with args.
6005set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6007$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006008if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009 $as_echo_n "(cached) " >&6
6010else
Matthias Klosec4c48422012-10-21 23:05:35 +02006011 if test -n "$PYTHON"; then
6012 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006013else
6014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6015for as_dir in $PATH
6016do
6017 IFS=$as_save_IFS
6018 test -z "$as_dir" && as_dir=.
6019 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006021 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6023 break 2
6024 fi
6025done
6026 done
6027IFS=$as_save_IFS
6028
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006029fi
6030fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006031PYTHON=$ac_cv_prog_PYTHON
6032if test -n "$PYTHON"; then
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6034$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006035else
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6037$as_echo "no" >&6; }
6038fi
6039
6040
Matthias Klosec4c48422012-10-21 23:05:35 +02006041 test -n "$PYTHON" && break
6042done
6043test -n "$PYTHON" || PYTHON="not-found"
6044
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006045if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006046 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6047else
6048 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006049fi
6050
6051
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006052case $MACHDEP in
6053bsdos*|hp*|HP*)
6054 # install -d does not work on BSDI or HP-UX
6055 if test -z "$INSTALL"
6056 then
6057 INSTALL="${srcdir}/install-sh -c"
6058 fi
6059esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060# Find a good install program. We prefer a C program (faster),
6061# so one script is as good as another. But avoid the broken or
6062# incompatible versions:
6063# SysV /etc/install, /usr/sbin/install
6064# SunOS /usr/etc/install
6065# IRIX /sbin/install
6066# AIX /bin/install
6067# AmigaOS /C/install, which installs bootblocks on floppy discs
6068# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6069# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6070# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6071# OS/2's system install, which has a completely different semantic
6072# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006073# Reject install programs that cannot install multiple files.
6074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6075$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006077if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079else
6080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6081for as_dir in $PATH
6082do
6083 IFS=$as_save_IFS
6084 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 # Account for people who put trailing slashes in PATH elements.
6086case $as_dir/ in #((
6087 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090 /usr/ucb/* ) ;;
6091 *)
6092 # OSF1 and SCO ODT 3.0 have their own names for install.
6093 # Don't use installbsd from OSF since it installs stuff as root
6094 # by default.
6095 for ac_prog in ginstall scoinst install; do
6096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006097 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 if test $ac_prog = install &&
6099 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6100 # AIX install. It has an incompatible calling convention.
6101 :
6102 elif test $ac_prog = install &&
6103 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6104 # program-specific install script used by HP pwplus--don't use.
6105 :
6106 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 rm -rf conftest.one conftest.two conftest.dir
6108 echo one > conftest.one
6109 echo two > conftest.two
6110 mkdir conftest.dir
6111 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6112 test -s conftest.one && test -s conftest.two &&
6113 test -s conftest.dir/conftest.one &&
6114 test -s conftest.dir/conftest.two
6115 then
6116 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6117 break 3
6118 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119 fi
6120 fi
6121 done
6122 done
6123 ;;
6124esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006125
6126 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006127IFS=$as_save_IFS
6128
Matthias Kloseb9621712010-04-24 17:59:49 +00006129rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130
6131fi
6132 if test "${ac_cv_path_install+set}" = set; then
6133 INSTALL=$ac_cv_path_install
6134 else
6135 # As a last resort, use the slow shell script. Don't cache a
6136 # value for INSTALL within a source directory, because that will
6137 # break other packages using the cache if that directory is
6138 # removed, or if the value is a relative name.
6139 INSTALL=$ac_install_sh
6140 fi
6141fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6143$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
6145# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6146# It thinks the first close brace ends the variable substitution.
6147test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6148
6149test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6150
6151test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6152
Matthias Klose93a0ef12012-03-15 18:08:34 +01006153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6154$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6155if test -z "$MKDIR_P"; then
6156 if ${ac_cv_path_mkdir+:} false; then :
6157 $as_echo_n "(cached) " >&6
6158else
6159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6161do
6162 IFS=$as_save_IFS
6163 test -z "$as_dir" && as_dir=.
6164 for ac_prog in mkdir gmkdir; do
6165 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006166 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006167 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6168 'mkdir (GNU coreutils) '* | \
6169 'mkdir (coreutils) '* | \
6170 'mkdir (fileutils) '4.1*)
6171 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6172 break 3;;
6173 esac
6174 done
6175 done
6176 done
6177IFS=$as_save_IFS
6178
6179fi
6180
6181 test -d ./--version && rmdir ./--version
6182 if test "${ac_cv_path_mkdir+set}" = set; then
6183 MKDIR_P="$ac_cv_path_mkdir -p"
6184 else
6185 # As a last resort, use the slow shell script. Don't cache a
6186 # value for MKDIR_P within a source directory, because that will
6187 # break other packages using the cache if that directory is
6188 # removed, or if the value is a relative name.
6189 MKDIR_P="$ac_install_sh -d"
6190 fi
6191fi
6192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6193$as_echo "$MKDIR_P" >&6; }
6194
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195
6196# Not every filesystem supports hard links
6197
6198if test -z "$LN" ; then
6199 case $ac_sys_system in
6200 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201 *) LN=ln;;
6202 esac
6203fi
6204
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006205# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006206
6207ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006208
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006209# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6211$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212
6213# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006214if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215 withval=$with_pydebug;
6216if test "$withval" != no
6217then
6218
Matthias Kloseb9621712010-04-24 17:59:49 +00006219$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220
Matthias Kloseb9621712010-04-24 17:59:49 +00006221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6222$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006224 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006225else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6226$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227fi
6228else
Matthias Kloseb9621712010-04-24 17:59:49 +00006229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6230$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231fi
6232
6233
6234# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6235# merged with this chunk of code?
6236
6237# Optimizer/debugger flags
6238# ------------------------
6239# (The following bit of code is complicated enough - please keep things
6240# indented properly. Just pretend you're editing Python code. ;-)
6241
6242# There are two parallel sets of case statements below, one that checks to
6243# see if OPT was set and one that does BASECFLAGS setting based upon
6244# compiler and platform. BASECFLAGS tweaks need to be made even if the
6245# user set OPT.
6246
6247# tweak OPT based on compiler and platform, only if the user didn't set
6248# it on the command line
6249
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006250if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251then
6252 case $GCC in
6253 yes)
6254 if test "$CC" != 'g++' ; then
6255 STRICT_PROTO="-Wstrict-prototypes"
6256 fi
6257 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6258 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6259 WRAP="-fwrapv"
6260 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006261
6262 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006263 case $CC in
6264 *clang*) WRAP="-fwrapv"
6265 ;;
6266 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 case $ac_cv_prog_cc_g in
6269 yes)
6270 if test "$Py_DEBUG" = 'true' ; then
6271 # Optimization messes up debuggers, so turn it off for
6272 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006273 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006274 else
6275 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6276 fi
6277 ;;
6278 *)
6279 OPT="-O3 -Wall $STRICT_PROTO"
6280 ;;
6281 esac
6282 case $ac_sys_system in
6283 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6284 ;;
6285 esac
6286 ;;
6287
6288 *)
6289 OPT="-O"
6290 ;;
6291 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292fi
6293
6294
6295
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297# The -arch flags for universal builds on OSX
6298UNIVERSAL_ARCH_FLAGS=
6299
6300
6301# tweak BASECFLAGS based on compiler and platform
6302case $GCC in
6303yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304 # Python doesn't violate C99 aliasing rules, but older versions of
6305 # GCC produce warnings for legal Python code. Enable
6306 # -fno-strict-aliasing on versions of GCC that support but produce
6307 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6309$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 ac_save_cc="$CC"
6311 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006313 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006315else
Matthias Kloseb9621712010-04-24 17:59:49 +00006316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006318
Matthias Kloseb159a552010-04-25 21:00:44 +00006319
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006320int
6321main ()
6322{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006323
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006324 ;
6325 return 0;
6326}
Matthias Kloseb159a552010-04-25 21:00:44 +00006327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006329if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
6331 CC="$ac_save_cc -fstrict-aliasing"
6332 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006334/* end confdefs.h. */
6335
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006336 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006337int
6338main ()
6339{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006340double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006341 ;
6342 return 0;
6343}
Matthias Kloseb159a552010-04-25 21:00:44 +00006344
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006346if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006347
6348 ac_cv_no_strict_aliasing=no
6349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350else
Matthias Kloseb159a552010-04-25 21:00:44 +00006351
6352 ac_cv_no_strict_aliasing=yes
6353
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006354fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006356
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357else
Matthias Kloseb159a552010-04-25 21:00:44 +00006358
6359 ac_cv_no_strict_aliasing=no
6360
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006363fi
6364
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006365 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006366 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6368$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006369 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370 then
6371 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6372 fi
6373
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6375$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6376 ac_save_cc="$CC"
6377 CC="$CC -Wunused-result -Werror"
6378 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006379 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006380 $as_echo_n "(cached) " >&6
6381else
6382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383/* end confdefs.h. */
6384
6385
6386int
6387main ()
6388{
6389
6390 ;
6391 return 0;
6392}
6393
6394_ACEOF
6395if ac_fn_c_try_compile "$LINENO"; then :
6396
6397 ac_cv_disable_unused_result_warning=yes
6398
6399else
6400
6401 ac_cv_disable_unused_result_warning=no
6402
6403fi
6404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6405fi
6406
6407 CFLAGS="$save_CFLAGS"
6408 CC="$ac_save_cc"
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6410$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6411
6412 if test $ac_cv_disable_unused_result_warning = yes
6413 then
6414 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6415 fi
6416
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6418$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6419 ac_save_cc="$CC"
6420 CC="$CC -Werror=declaration-after-statement"
6421 save_CFLAGS="$CFLAGS"
6422 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6423 $as_echo_n "(cached) " >&6
6424else
6425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426/* end confdefs.h. */
6427
6428
6429int
6430main ()
6431{
6432
6433 ;
6434 return 0;
6435}
6436
6437_ACEOF
6438if ac_fn_c_try_compile "$LINENO"; then :
6439
6440 ac_cv_declaration_after_statement_warning=yes
6441
6442else
6443
6444 ac_cv_declaration_after_statement_warning=no
6445
6446fi
6447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6448fi
6449
6450 CFLAGS="$save_CFLAGS"
6451 CC="$ac_save_cc"
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6453$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6454
6455 if test $ac_cv_declaration_after_statement_warning = yes
6456 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006457 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006458 fi
6459
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6461 # support. Without this, treatment of subnormals doesn't follow
6462 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006463 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464 alpha*)
6465 BASECFLAGS="$BASECFLAGS -mieee"
6466 ;;
6467 esac
6468
6469 case $ac_sys_system in
6470 SCO_SV*)
6471 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6472 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006473
6474 # is there any other compiler on Darwin besides gcc?
6475 Darwin*)
6476 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6477 # used to be here, but non-Apple gcc doesn't accept them.
6478 if test "${CC}" = gcc
6479 then
6480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006481$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006482 case "${UNIVERSALSDK}" in
6483 */MacOSX10.4u.sdk)
6484 # Build using 10.4 SDK, force usage of gcc when the
6485 # compiler is gcc, otherwise the user will get very
6486 # confusing error messages when building on OSX 10.6
6487 CC=gcc-4.0
6488 CPP=cpp-4.0
6489 ;;
6490 esac
6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006492$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006493 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494
Ned Deily87adb6e2013-10-18 21:09:56 -07006495 if test "${enable_universalsdk}"
6496 then
6497 case "$UNIVERSAL_ARCHS" in
6498 32-bit)
6499 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6500 LIPO_32BIT_FLAGS=""
6501 ARCH_RUN_32BIT=""
6502 ;;
6503 64-bit)
6504 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6505 LIPO_32BIT_FLAGS=""
6506 ARCH_RUN_32BIT="true"
6507 ;;
6508 all)
6509 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6510 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6511 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6512 ;;
6513 intel)
6514 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6515 LIPO_32BIT_FLAGS="-extract i386"
6516 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6517 ;;
6518 intel-32)
6519 UNIVERSAL_ARCH_FLAGS="-arch i386"
6520 LIPO_32BIT_FLAGS=""
6521 ARCH_RUN_32BIT=""
6522 ;;
6523 3-way)
6524 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6525 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6526 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6527 ;;
6528 *)
6529 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6530 ;;
6531 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
Ned Deily87adb6e2013-10-18 21:09:56 -07006533 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6534 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6535 if test "${UNIVERSALSDK}" != "/"
6536 then
6537 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6538 fi
6539 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540
Ned Deily87adb6e2013-10-18 21:09:56 -07006541 # Calculate an appropriate deployment target for this build:
6542 # The deployment target value is used explicitly to enable certain
6543 # features are enabled (such as builtin libedit support for readline)
6544 # through the use of Apple's Availabiliy Macros and is used as a
6545 # component of the string returned by distutils.get_platform().
6546 #
6547 # Use the value from:
6548 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6549 # 2. the operating system version of the build machine if >= 10.6
6550 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6551 # below to pick either 10.3, 10.4, or 10.5 as the target.
6552 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Ned Deily87adb6e2013-10-18 21:09:56 -07006554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6555$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006556 cur_target_major=`sw_vers -productVersion | \
6557 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6558 cur_target_minor=`sw_vers -productVersion | \
6559 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6560 cur_target="${cur_target_major}.${cur_target_minor}"
6561 if test ${cur_target_major} -eq 10 && \
6562 test ${cur_target_minor} -ge 3 && \
6563 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006564 then
Ned Deily36820b62014-06-25 13:44:22 -07006565 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006566 cur_target=10.3
6567 if test ${enable_universalsdk}
6568 then
6569 case "$UNIVERSAL_ARCHS" in
6570 all|3-way|intel|64-bit)
6571 # These configurations were first supported in 10.5
6572 cur_target='10.5'
6573 ;;
6574 esac
6575 else
6576 if test `/usr/bin/arch` = "i386"
6577 then
6578 # 10.4 was the first release to support Intel archs
6579 cur_target="10.4"
6580 fi
6581 fi
6582 fi
6583 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006584
Ned Deily87adb6e2013-10-18 21:09:56 -07006585 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6586 # environment with a value that is the same as what we'll use
6587 # in the Makefile to ensure that we'll get the same compiler
6588 # environment during configure and build time.
6589 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6590 export MACOSX_DEPLOYMENT_TARGET
6591 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6593$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006594
Ned Deily87adb6e2013-10-18 21:09:56 -07006595 # end of Darwin* tests
6596 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597 esac
6598 ;;
6599
6600*)
6601 case $ac_sys_system in
6602 OpenUNIX*|UnixWare*)
6603 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6604 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605 SCO_SV*)
6606 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6607 ;;
6608 esac
6609 ;;
6610esac
6611
6612if test "$Py_DEBUG" = 'true'; then
6613 :
6614else
6615 OPT="-DNDEBUG $OPT"
6616fi
6617
6618if test "$ac_arch_flags"
6619then
6620 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6621fi
6622
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623# On some compilers, pthreads are available without further options
6624# (e.g. MacOS X). On some of these systems, the compiler will not
6625# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6626# So we have to see first whether pthreads are available without
6627# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6629$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006630if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006631 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632else
Matthias Kloseb9621712010-04-24 17:59:49 +00006633 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006634 ac_cv_pthread_is_default=no
6635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637/* end confdefs.h. */
6638
Stefan Krah7dba5942012-11-22 22:49:11 +01006639#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640#include <pthread.h>
6641
6642void* routine(void* p){return NULL;}
6643
6644int main(){
6645 pthread_t p;
6646 if(pthread_create(&p,NULL,routine,NULL)!=0)
6647 return 1;
6648 (void)pthread_detach(p);
6649 return 0;
6650}
6651
6652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006653if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654
6655 ac_cv_pthread_is_default=yes
6656 ac_cv_kthread=no
6657 ac_cv_pthread=no
6658
6659else
Matthias Kloseb9621712010-04-24 17:59:49 +00006660 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6663 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664fi
6665
6666
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667fi
6668
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6670$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006671
6672
6673if test $ac_cv_pthread_is_default = yes
6674then
6675 ac_cv_kpthread=no
6676else
6677# -Kpthread, if available, provides the right #defines
6678# and linker options to make pthread_create available
6679# Some compilers won't report that they do not support -Kpthread,
6680# so we need to run a program to see whether it really made the
6681# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6683$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006684if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006685 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006686else
6687 ac_save_cc="$CC"
6688CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006689if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006690 ac_cv_kpthread=no
6691else
Matthias Kloseb9621712010-04-24 17:59:49 +00006692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693/* end confdefs.h. */
6694
Stefan Krah7dba5942012-11-22 22:49:11 +01006695#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696#include <pthread.h>
6697
6698void* routine(void* p){return NULL;}
6699
6700int main(){
6701 pthread_t p;
6702 if(pthread_create(&p,NULL,routine,NULL)!=0)
6703 return 1;
6704 (void)pthread_detach(p);
6705 return 0;
6706}
6707
6708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006709if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710 ac_cv_kpthread=yes
6711else
Matthias Kloseb9621712010-04-24 17:59:49 +00006712 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716fi
6717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718CC="$ac_save_cc"
6719fi
6720
Matthias Kloseb9621712010-04-24 17:59:49 +00006721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6722$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723fi
6724
6725if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6726then
6727# -Kthread, if available, provides the right #defines
6728# and linker options to make pthread_create available
6729# Some compilers won't report that they do not support -Kthread,
6730# so we need to run a program to see whether it really made the
6731# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6733$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006734if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006735 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736else
6737 ac_save_cc="$CC"
6738CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006739if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740 ac_cv_kthread=no
6741else
Matthias Kloseb9621712010-04-24 17:59:49 +00006742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743/* end confdefs.h. */
6744
Stefan Krah7dba5942012-11-22 22:49:11 +01006745#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746#include <pthread.h>
6747
6748void* routine(void* p){return NULL;}
6749
6750int main(){
6751 pthread_t p;
6752 if(pthread_create(&p,NULL,routine,NULL)!=0)
6753 return 1;
6754 (void)pthread_detach(p);
6755 return 0;
6756}
6757
6758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006759if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760 ac_cv_kthread=yes
6761else
Matthias Kloseb9621712010-04-24 17:59:49 +00006762 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006764rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6765 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766fi
6767
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768CC="$ac_save_cc"
6769fi
6770
Matthias Kloseb9621712010-04-24 17:59:49 +00006771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6772$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773fi
6774
6775if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6776then
6777# -pthread, if available, provides the right #defines
6778# and linker options to make pthread_create available
6779# Some compilers won't report that they do not support -pthread,
6780# so we need to run a program to see whether it really made the
6781# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6783$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006784if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786else
6787 ac_save_cc="$CC"
6788CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006789if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790 ac_cv_pthread=no
6791else
Matthias Kloseb9621712010-04-24 17:59:49 +00006792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793/* end confdefs.h. */
6794
Stefan Krah7dba5942012-11-22 22:49:11 +01006795#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796#include <pthread.h>
6797
6798void* routine(void* p){return NULL;}
6799
6800int main(){
6801 pthread_t p;
6802 if(pthread_create(&p,NULL,routine,NULL)!=0)
6803 return 1;
6804 (void)pthread_detach(p);
6805 return 0;
6806}
6807
6808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006809if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810 ac_cv_pthread=yes
6811else
Matthias Kloseb9621712010-04-24 17:59:49 +00006812 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816fi
6817
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818CC="$ac_save_cc"
6819fi
6820
Matthias Kloseb9621712010-04-24 17:59:49 +00006821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6822$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823fi
6824
6825# If we have set a CC compiler flag for thread support then
6826# check if it works for CXX, too.
6827ac_cv_cxx_thread=no
6828if test ! -z "$CXX"
6829then
Matthias Kloseb9621712010-04-24 17:59:49 +00006830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6831$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832ac_save_cxx="$CXX"
6833
6834if test "$ac_cv_kpthread" = "yes"
6835then
6836 CXX="$CXX -Kpthread"
6837 ac_cv_cxx_thread=yes
6838elif test "$ac_cv_kthread" = "yes"
6839then
6840 CXX="$CXX -Kthread"
6841 ac_cv_cxx_thread=yes
6842elif test "$ac_cv_pthread" = "yes"
6843then
6844 CXX="$CXX -pthread"
6845 ac_cv_cxx_thread=yes
6846fi
6847
6848if test $ac_cv_cxx_thread = yes
6849then
6850 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6851 $CXX -c conftest.$ac_ext 2>&5
6852 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6853 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6854 then
6855 ac_cv_cxx_thread=yes
6856 else
6857 ac_cv_cxx_thread=no
6858 fi
6859 rm -fr conftest*
6860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6862$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
6864CXX="$ac_save_cxx"
6865
6866
6867# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6869$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006870if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872else
Matthias Kloseb9621712010-04-24 17:59:49 +00006873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874/* end confdefs.h. */
6875#include <stdlib.h>
6876#include <stdarg.h>
6877#include <string.h>
6878#include <float.h>
6879
6880int
6881main ()
6882{
6883
6884 ;
6885 return 0;
6886}
6887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006888if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 ac_cv_header_stdc=yes
6890else
Matthias Kloseb9621712010-04-24 17:59:49 +00006891 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6894
6895if test $ac_cv_header_stdc = yes; then
6896 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006898/* end confdefs.h. */
6899#include <string.h>
6900
6901_ACEOF
6902if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006903 $EGREP "memchr" >/dev/null 2>&1; then :
6904
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905else
6906 ac_cv_header_stdc=no
6907fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006908rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006909
6910fi
6911
6912if test $ac_cv_header_stdc = yes; then
6913 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915/* end confdefs.h. */
6916#include <stdlib.h>
6917
6918_ACEOF
6919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006920 $EGREP "free" >/dev/null 2>&1; then :
6921
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922else
6923 ac_cv_header_stdc=no
6924fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006925rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926
6927fi
6928
6929if test $ac_cv_header_stdc = yes; then
6930 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006932 :
6933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935/* end confdefs.h. */
6936#include <ctype.h>
6937#include <stdlib.h>
6938#if ((' ' & 0x0FF) == 0x020)
6939# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6940# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6941#else
6942# define ISLOWER(c) \
6943 (('a' <= (c) && (c) <= 'i') \
6944 || ('j' <= (c) && (c) <= 'r') \
6945 || ('s' <= (c) && (c) <= 'z'))
6946# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6947#endif
6948
6949#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6950int
6951main ()
6952{
6953 int i;
6954 for (i = 0; i < 256; i++)
6955 if (XOR (islower (i), ISLOWER (i))
6956 || toupper (i) != TOUPPER (i))
6957 return 2;
6958 return 0;
6959}
6960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006961if ac_fn_c_try_run "$LINENO"; then :
6962
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006963else
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968fi
6969
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006970fi
6971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6973$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006974if test $ac_cv_header_stdc = yes; then
6975
Matthias Kloseb9621712010-04-24 17:59:49 +00006976$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977
6978fi
6979
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006980for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006981fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006982ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006983sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006984unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006985poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006986sys/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 +01006987sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006988sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006989sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006990sys/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 -07006991libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006992bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6993sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006994do :
6995 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6996ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006997if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006998 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006999#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007000_ACEOF
7001
7002fi
7003
Guido van Rossum627b2d71993-12-24 10:39:16 +00007004done
7005
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007006ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007007for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7010$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007011if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007012 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007013else
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007015/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007016#include <sys/types.h>
7017#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007018
Martin v. Löwis11437992002-04-12 09:54:03 +00007019int
7020main ()
7021{
7022if ((DIR *) 0)
7023return 0;
7024 ;
7025 return 0;
7026}
7027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007028if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007029 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007030else
Matthias Kloseb9621712010-04-24 17:59:49 +00007031 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007035eval ac_res=\$$as_ac_Header
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7037$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007038if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007039 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007040#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007041_ACEOF
7042
7043ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007044fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007046done
7047# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7048if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7050$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007051if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053else
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058/* Override any GCC internal prototype to avoid an error.
7059 Use char because int might match the return type of a GCC
7060 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007061#ifdef __cplusplus
7062extern "C"
7063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007064char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007065int
7066main ()
7067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007069 ;
7070 return 0;
7071}
7072_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073for ac_lib in '' dir; do
7074 if test -z "$ac_lib"; then
7075 ac_res="none required"
7076 else
7077 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007078 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007080 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083rm -f core conftest.err conftest.$ac_objext \
7084 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007085 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007088done
Victor Stinnere0be4232011-10-25 13:06:09 +02007089if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091else
7092 ac_cv_search_opendir=no
7093fi
7094rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007095LIBS=$ac_func_search_save_LIBS
7096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7098$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007100if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007102
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007103fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007104
Michael W. Hudson54241132001-12-07 15:38:26 +00007105else
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7107$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007108if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007110else
7111 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115/* Override any GCC internal prototype to avoid an error.
7116 Use char because int might match the return type of a GCC
7117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007118#ifdef __cplusplus
7119extern "C"
7120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007121char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007122int
7123main ()
7124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007126 ;
7127 return 0;
7128}
7129_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130for ac_lib in '' x; do
7131 if test -z "$ac_lib"; then
7132 ac_res="none required"
7133 else
7134 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007135 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007136 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007137 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007138 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007140rm -f core conftest.err conftest.$ac_objext \
7141 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007142 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007143 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007145done
Victor Stinnere0be4232011-10-25 13:06:09 +02007146if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148else
7149 ac_cv_search_opendir=no
7150fi
7151rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007152LIBS=$ac_func_search_save_LIBS
7153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7155$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007156ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007157if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007158 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007160fi
7161
7162fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007163
Matthias Kloseb9621712010-04-24 17:59:49 +00007164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7165$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007166if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007168else
Matthias Kloseb9621712010-04-24 17:59:49 +00007169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007170/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007171#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007172int
7173main ()
7174{
7175return makedev(0, 0);
7176 ;
7177 return 0;
7178}
7179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007181 ac_cv_header_sys_types_h_makedev=yes
7182else
Matthias Kloseb9621712010-04-24 17:59:49 +00007183 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007185rm -f core conftest.err conftest.$ac_objext \
7186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007187
7188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7190$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007191
7192if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007193ac_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 +02007194if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007197
7198fi
7199
7200
7201
7202 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007203 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 +02007204if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007205
Matthias Kloseb9621712010-04-24 17:59:49 +00007206$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007207
7208fi
7209
7210
7211 fi
7212fi
7213
Michael W. Hudson54241132001-12-07 15:38:26 +00007214
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007215# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7216for ac_header in net/if.h
7217do :
7218 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7219#ifdef STDC_HEADERS
7220# include <stdlib.h>
7221# include <stddef.h>
7222#else
7223# ifdef HAVE_STDLIB_H
7224# include <stdlib.h>
7225# endif
7226#endif
7227#ifdef HAVE_SYS_SOCKET_H
7228# include <sys/socket.h>
7229#endif
7230
7231"
Victor Stinnere0be4232011-10-25 13:06:09 +02007232if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007233 cat >>confdefs.h <<_ACEOF
7234#define HAVE_NET_IF_H 1
7235_ACEOF
7236
7237fi
7238
7239done
7240
7241
Martin v. Löwis11017b12006-01-14 18:12:57 +00007242# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007243for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007244do :
7245 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 +00007246#ifdef HAVE_ASM_TYPES_H
7247#include <asm/types.h>
7248#endif
7249#ifdef HAVE_SYS_SOCKET_H
7250#include <sys/socket.h>
7251#endif
7252
Matthias Kloseb9621712010-04-24 17:59:49 +00007253"
Victor Stinnere0be4232011-10-25 13:06:09 +02007254if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007256#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007257_ACEOF
7258
7259fi
7260
7261done
7262
7263
Charles-François Natali47413c12011-10-06 19:47:44 +02007264# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007265for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007266do :
7267 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7268ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7269#ifdef HAVE_SYS_SOCKET_H
7270#include <sys/socket.h>
7271#endif
7272
7273"
7274if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7275 cat >>confdefs.h <<_ACEOF
7276#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7277_ACEOF
7278
7279fi
7280
7281done
7282
7283
Guido van Rossum627b2d71993-12-24 10:39:16 +00007284# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007285was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7287$as_echo_n "checking for clock_t in time.h... " >&6; }
7288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007290#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007291
7292_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007294 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007295 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007296else
Martin v. Löwis11437992002-04-12 09:54:03 +00007297
7298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007300
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007301
Guido van Rossum627b2d71993-12-24 10:39:16 +00007302fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007303rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007304
Matthias Kloseb9621712010-04-24 17:59:49 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7306$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7309$as_echo_n "checking for makedev... " >&6; }
7310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007312
Jesus Cea740f53a2010-04-28 11:35:30 +00007313#if defined(MAJOR_IN_MKDEV)
7314#include <sys/mkdev.h>
7315#elif defined(MAJOR_IN_SYSMACROS)
7316#include <sys/sysmacros.h>
7317#else
7318#include <sys/types.h>
7319#endif
7320
Neal Norwitz11690112002-07-30 01:08:28 +00007321int
7322main ()
7323{
Jesus Cea740f53a2010-04-28 11:35:30 +00007324
7325 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007326 ;
7327 return 0;
7328}
Matthias Kloseb159a552010-04-25 21:00:44 +00007329
Neal Norwitz11690112002-07-30 01:08:28 +00007330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007331if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007332 ac_cv_has_makedev=yes
7333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007336rm -f core conftest.err conftest.$ac_objext \
7337 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7339$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007340if test "$ac_cv_has_makedev" = "yes"; then
7341
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007343
7344fi
7345
Christian Heimes985ecdc2013-11-20 11:46:18 +01007346# byte swapping
7347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7348$as_echo_n "checking for le64toh... " >&6; }
7349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7350/* end confdefs.h. */
7351
7352#ifdef HAVE_ENDIAN_H
7353#include <endian.h>
7354#elif defined(HAVE_SYS_ENDIAN_H)
7355#include <sys/endian.h>
7356#endif
7357
7358int
7359main ()
7360{
7361
7362 le64toh(1)
7363 ;
7364 return 0;
7365}
7366
7367_ACEOF
7368if ac_fn_c_try_link "$LINENO"; then :
7369 ac_cv_has_le64toh=yes
7370else
7371 ac_cv_has_le64toh=no
7372fi
7373rm -f core conftest.err conftest.$ac_objext \
7374 conftest$ac_exeext conftest.$ac_ext
7375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7376$as_echo "$ac_cv_has_le64toh" >&6; }
7377if test "$ac_cv_has_le64toh" = "yes"; then
7378
7379$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7380
7381fi
7382
Martin v. Löwis399a6892002-10-04 10:22:02 +00007383# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7384# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7385# defined, but the compiler does not support pragma redefine_extname,
7386# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7387# structures (such as rlimit64) without declaring them. As a
7388# work-around, disable LFS on such configurations
7389
7390use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7392$as_echo_n "checking Solaris LFS bug... " >&6; }
7393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007394/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007395
7396#define _LARGEFILE_SOURCE 1
7397#define _FILE_OFFSET_BITS 64
7398#include <sys/resource.h>
7399
Martin v. Löwis399a6892002-10-04 10:22:02 +00007400int
7401main ()
7402{
7403struct rlimit foo;
7404 ;
7405 return 0;
7406}
7407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007408if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007409 sol_lfs_bug=no
7410else
Matthias Kloseb9621712010-04-24 17:59:49 +00007411 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7415$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007416if test "$sol_lfs_bug" = "yes"; then
7417 use_lfs=no
7418fi
7419
7420if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007421# Two defines needed to enable largefile support on various platforms
7422# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007423case $ac_sys_system/$ac_sys_release in
7424AIX*)
7425
7426$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7427
7428 ;;
7429esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007430
Matthias Kloseb9621712010-04-24 17:59:49 +00007431$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007432
7433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007435
Martin v. Löwis399a6892002-10-04 10:22:02 +00007436fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007437
Guido van Rossum84e7b241996-08-19 21:59:00 +00007438# Add some code to confdefs.h so that the test for off_t works on SCO
7439cat >> confdefs.h <<\EOF
7440#if defined(SCO_DS)
7441#undef _OFF_T
7442#endif
7443EOF
7444
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007446ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007447if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007448
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007449else
Martin v. Löwis11437992002-04-12 09:54:03 +00007450
7451cat >>confdefs.h <<_ACEOF
7452#define mode_t int
7453_ACEOF
7454
7455fi
7456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007458if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007459
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007460else
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007463#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007464_ACEOF
7465
7466fi
7467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007469if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007471else
Martin v. Löwis11437992002-04-12 09:54:03 +00007472
7473cat >>confdefs.h <<_ACEOF
7474#define pid_t int
7475_ACEOF
7476
7477fi
7478
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007479
Martin v. Löwis11437992002-04-12 09:54:03 +00007480cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007481#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007482_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007485if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007487else
Martin v. Löwis11437992002-04-12 09:54:03 +00007488
7489cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007490#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
7492
7493fi
7494
Matthias Kloseb9621712010-04-24 17:59:49 +00007495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7496$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007497if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007499else
Matthias Kloseb9621712010-04-24 17:59:49 +00007500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007501/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007502#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007503
7504_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507 ac_cv_type_uid_t=yes
7508else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007509 ac_cv_type_uid_t=no
7510fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007511rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007512
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7515$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007516if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007517
Matthias Kloseb9621712010-04-24 17:59:49 +00007518$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007519
7520
Matthias Kloseb9621712010-04-24 17:59:49 +00007521$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007522
7523fi
7524
Mark Dickinson983bc162012-12-02 12:11:38 +00007525
7526# There are two separate checks for each of the exact-width integer types we
7527# need. First we check whether the type is available using the usual
7528# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7529# and <stdint.h> where available). We then also use the special type checks of
7530# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7531# directly, #define's uint32_t to be a suitable type.
7532
7533ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7534if test "x$ac_cv_type_uint32_t" = xyes; then :
7535
7536$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7537
7538fi
7539
Matthias Kloseb9621712010-04-24 17:59:49 +00007540ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7541case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007542 no|yes) ;; #(
7543 *)
7544
Matthias Kloseb9621712010-04-24 17:59:49 +00007545$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007546
7547
7548cat >>confdefs.h <<_ACEOF
7549#define uint32_t $ac_cv_c_uint32_t
7550_ACEOF
7551;;
7552 esac
7553
Mark Dickinson983bc162012-12-02 12:11:38 +00007554
7555ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7556if test "x$ac_cv_type_uint64_t" = xyes; then :
7557
7558$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7559
7560fi
7561
Matthias Kloseb9621712010-04-24 17:59:49 +00007562ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7563case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007564 no|yes) ;; #(
7565 *)
7566
Matthias Kloseb9621712010-04-24 17:59:49 +00007567$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007568
7569
7570cat >>confdefs.h <<_ACEOF
7571#define uint64_t $ac_cv_c_uint64_t
7572_ACEOF
7573;;
7574 esac
7575
Mark Dickinson983bc162012-12-02 12:11:38 +00007576
7577ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7578if test "x$ac_cv_type_int32_t" = xyes; then :
7579
7580$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7581
7582fi
7583
Matthias Kloseb9621712010-04-24 17:59:49 +00007584ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7585case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007586 no|yes) ;; #(
7587 *)
7588
7589cat >>confdefs.h <<_ACEOF
7590#define int32_t $ac_cv_c_int32_t
7591_ACEOF
7592;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007593esac
7594
Mark Dickinson983bc162012-12-02 12:11:38 +00007595
7596ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7597if test "x$ac_cv_type_int64_t" = xyes; then :
7598
7599$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7600
7601fi
7602
Matthias Kloseb9621712010-04-24 17:59:49 +00007603ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7604case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007605 no|yes) ;; #(
7606 *)
7607
7608cat >>confdefs.h <<_ACEOF
7609#define int64_t $ac_cv_c_int64_t
7610_ACEOF
7611;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007612esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007613
Mark Dickinson983bc162012-12-02 12:11:38 +00007614
Matthias Kloseb9621712010-04-24 17:59:49 +00007615ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617
Matthias Kloseb9621712010-04-24 17:59:49 +00007618$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007619
7620fi
7621
Stefan Krah1919b7e2012-03-21 18:25:23 +01007622ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7623if test "x$ac_cv_type___uint128_t" = xyes; then :
7624
7625$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7626
7627fi
7628
Jack Jansendd19cf82001-12-06 22:36:17 +00007629
Michael W. Hudson54241132001-12-07 15:38:26 +00007630# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007631# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632# The cast to long int works around a bug in the HP C Compiler
7633# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7634# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7635# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7637$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007638if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007640else
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 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 +00007642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643else
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 if test "$ac_cv_type_int" = yes; then
7645 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7646$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007647as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007648See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649 else
7650 ac_cv_sizeof_int=0
7651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653
Martin v. Löwis11437992002-04-12 09:54:03 +00007654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7656$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657
7658
7659
Martin v. Löwis11437992002-04-12 09:54:03 +00007660cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007661#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007662_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007663
7664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665# The cast to long int works around a bug in the HP C Compiler
7666# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7667# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7668# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7670$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007671if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007673else
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 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 +00007675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 if test "$ac_cv_type_long" = yes; then
7678 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007680as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007681See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 else
7683 ac_cv_sizeof_long=0
7684 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686
Martin v. Löwis11437992002-04-12 09:54:03 +00007687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7689$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690
7691
7692
Martin v. Löwis11437992002-04-12 09:54:03 +00007693cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007694#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007695_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007696
7697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698# The cast to long int works around a bug in the HP C Compiler
7699# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7700# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7701# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7703$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007704if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 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 +00007708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 if test "$ac_cv_type_void_p" = yes; then
7711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007713as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007714See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715 else
7716 ac_cv_sizeof_void_p=0
7717 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719
Martin v. Löwis11437992002-04-12 09:54:03 +00007720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7722$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723
7724
7725
Martin v. Löwis11437992002-04-12 09:54:03 +00007726cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007727#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007728_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007729
7730
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731# The cast to long int works around a bug in the HP C Compiler
7732# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7733# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7734# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7736$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007737if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007739else
Matthias Kloseb9621712010-04-24 17:59:49 +00007740 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 +00007741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 if test "$ac_cv_type_short" = yes; then
7744 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007746as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007747See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007748 else
7749 ac_cv_sizeof_short=0
7750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007752
Martin v. Löwis11437992002-04-12 09:54:03 +00007753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7755$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007756
7757
7758
Martin v. Löwis11437992002-04-12 09:54:03 +00007759cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007760#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007761_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007762
7763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764# The cast to long int works around a bug in the HP C Compiler
7765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7769$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007770if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 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 +00007774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 if test "$ac_cv_type_float" = yes; then
7777 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7778$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007779as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007780See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007781 else
7782 ac_cv_sizeof_float=0
7783 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007785
Martin v. Löwis11437992002-04-12 09:54:03 +00007786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7788$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007789
7790
7791
Martin v. Löwis11437992002-04-12 09:54:03 +00007792cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007793#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007794_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007795
7796
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797# The cast to long int works around a bug in the HP C Compiler
7798# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7799# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7800# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7802$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007803if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 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 +00007807
Martin v. Löwis11437992002-04-12 09:54:03 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 if test "$ac_cv_type_double" = yes; then
7810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007812as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007813See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007814 else
7815 ac_cv_sizeof_double=0
7816 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007818
Martin v. Löwis11437992002-04-12 09:54:03 +00007819fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7821$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822
7823
7824
Martin v. Löwis11437992002-04-12 09:54:03 +00007825cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007826#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007827_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007828
7829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830# The cast to long int works around a bug in the HP C Compiler
7831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7833# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7835$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007836if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007838else
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 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 +00007840
Martin v. Löwis11437992002-04-12 09:54:03 +00007841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 if test "$ac_cv_type_fpos_t" = yes; then
7843 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007845as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007846See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847 else
7848 ac_cv_sizeof_fpos_t=0
7849 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851
Martin v. Löwis11437992002-04-12 09:54:03 +00007852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7854$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007855
7856
7857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007859#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007860_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007861
Michael W. Hudson54241132001-12-07 15:38:26 +00007862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007863# The cast to long int works around a bug in the HP C Compiler
7864# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7865# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7866# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7868$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007869if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007871else
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 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 +00007873
Martin v. Löwis18e16552006-02-15 17:27:45 +00007874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 if test "$ac_cv_type_size_t" = yes; then
7876 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7877$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007878as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007879See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 else
7881 ac_cv_sizeof_size_t=0
7882 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884
Martin v. Löwis18e16552006-02-15 17:27:45 +00007885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7887$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888
7889
7890
Martin v. Löwis18e16552006-02-15 17:27:45 +00007891cat >>confdefs.h <<_ACEOF
7892#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7893_ACEOF
7894
7895
Christian Heimes400adb02008-02-01 08:12:03 +00007896# The cast to long int works around a bug in the HP C Compiler
7897# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7898# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7899# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7901$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007902if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007904else
Matthias Kloseb9621712010-04-24 17:59:49 +00007905 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 +00007906
Christian Heimes400adb02008-02-01 08:12:03 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 if test "$ac_cv_type_pid_t" = yes; then
7909 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7910$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007911as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007912See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007913 else
7914 ac_cv_sizeof_pid_t=0
7915 fi
7916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007917
Christian Heimes400adb02008-02-01 08:12:03 +00007918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7920$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007921
7922
7923
7924cat >>confdefs.h <<_ACEOF
7925#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7926_ACEOF
7927
7928
Michael W. Hudson54241132001-12-07 15:38:26 +00007929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7931$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007932have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007934/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007935
Martin v. Löwis11437992002-04-12 09:54:03 +00007936int
7937main ()
7938{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 ;
7941 return 0;
7942}
7943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
7946
Matthias Kloseb9621712010-04-24 17:59:49 +00007947$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007948
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007949 have_long_long=yes
7950
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7954$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007955if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7961$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_long_long" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 else
7974 ac_cv_sizeof_long_long=0
7975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7980$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981
7982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007985#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007987
Michael W. Hudson54241132001-12-07 15:38:26 +00007988
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007989fi
7990
Matthias Kloseb9621712010-04-24 17:59:49 +00007991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7992$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007993have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007995/* end confdefs.h. */
7996
7997int
7998main ()
7999{
8000long double x; x = (long double)0;
8001 ;
8002 return 0;
8003}
8004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008005if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008006
8007
Matthias Kloseb9621712010-04-24 17:59:49 +00008008$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008009
8010 have_long_double=yes
8011
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008012fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8015$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008016if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008017# The cast to long int works around a bug in the HP C Compiler
8018# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8019# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8020# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8022$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008023if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008025else
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 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 +00008027
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 if test "$ac_cv_type_long_double" = yes; then
8030 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008032as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008033See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008034 else
8035 ac_cv_sizeof_long_double=0
8036 fi
8037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008038
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8041$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008042
8043
8044
8045cat >>confdefs.h <<_ACEOF
8046#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8047_ACEOF
8048
8049
8050fi
8051
8052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8054$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008055have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008057/* end confdefs.h. */
8058
8059int
8060main ()
8061{
8062_Bool x; x = (_Bool)0;
8063 ;
8064 return 0;
8065}
8066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008067if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008068
8069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008071
8072 have_c99_bool=yes
8073
Thomas Woutersb2137042007-02-01 18:02:27 +00008074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8077$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008078if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008079# The cast to long int works around a bug in the HP C Compiler
8080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8082# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8084$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008087else
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 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 +00008089
Thomas Woutersb2137042007-02-01 18:02:27 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 if test "$ac_cv_type__Bool" = yes; then
8092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008094as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008095See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096 else
8097 ac_cv_sizeof__Bool=0
8098 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100
Thomas Woutersb2137042007-02-01 18:02:27 +00008101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8103$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008104
8105
8106
Thomas Woutersb2137042007-02-01 18:02:27 +00008107cat >>confdefs.h <<_ACEOF
8108#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8109_ACEOF
8110
8111
8112fi
8113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008115 #include <stdint.h>
8116 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008117 #ifdef HAVE_INTTYPES_H
8118 #include <inttypes.h>
8119 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008120"
Victor Stinnere0be4232011-10-25 13:06:09 +02008121if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008122
8123cat >>confdefs.h <<_ACEOF
8124#define HAVE_UINTPTR_T 1
8125_ACEOF
8126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008127# The cast to long int works around a bug in the HP C Compiler
8128# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8129# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8130# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8132$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008133if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008134 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 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 +00008137
Martin v. Löwis11437992002-04-12 09:54:03 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 if test "$ac_cv_type_uintptr_t" = yes; then
8140 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008142as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008143See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144 else
8145 ac_cv_sizeof_uintptr_t=0
8146 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008147fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008148
Martin v. Löwis11437992002-04-12 09:54:03 +00008149fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8151$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008152
8153
8154
Martin v. Löwis11437992002-04-12 09:54:03 +00008155cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008156#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008157_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008158
Michael W. Hudson54241132001-12-07 15:38:26 +00008159
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008160fi
8161
Thomas Wouters89f507f2006-12-13 04:49:30 +00008162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8168$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008173#ifdef HAVE_SYS_TYPES_H
8174#include <sys/types.h>
8175#endif
8176
Matthias Kloseb9621712010-04-24 17:59:49 +00008177"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 if test "$ac_cv_type_off_t" = yes; then
8181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008183as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008184See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008185 else
8186 ac_cv_sizeof_off_t=0
8187 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008189
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8192$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008194
8195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008197#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008198_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008199
Michael W. Hudson54241132001-12-07 15:38:26 +00008200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8203$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008204if test "$have_long_long" = yes
8205then
8206if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008207 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008208
Matthias Kloseb9621712010-04-24 17:59:49 +00008209$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008210
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8212$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8215$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008216fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008217else
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008220fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008221
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008222# The cast to long int works around a bug in the HP C Compiler
8223# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8224# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8225# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8227$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008228if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008229 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008230else
Matthias Kloseb9621712010-04-24 17:59:49 +00008231 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232#ifdef HAVE_SYS_TYPES_H
8233#include <sys/types.h>
8234#endif
8235#ifdef HAVE_TIME_H
8236#include <time.h>
8237#endif
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241else
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 if test "$ac_cv_type_time_t" = yes; then
8243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008245as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008246See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247 else
8248 ac_cv_sizeof_time_t=0
8249 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8254$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008256
8257
Martin v. Löwis11437992002-04-12 09:54:03 +00008258cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008259#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008260_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008261
Michael W. Hudson54241132001-12-07 15:38:26 +00008262
8263
Trent Mick635f6fb2000-08-23 21:33:05 +00008264# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008265ac_save_cc="$CC"
8266if test "$ac_cv_kpthread" = "yes"
8267then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008268elif test "$ac_cv_kthread" = "yes"
8269then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008270elif test "$ac_cv_pthread" = "yes"
8271then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008272fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008273
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8275$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008276have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008278/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008279
8280 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008281int
8282main ()
8283{
Guido van Rossum12580492000-09-24 16:47:19 +00008284pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 ;
8286 return 0;
8287}
Matthias Kloseb159a552010-04-25 21:00:44 +00008288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008290if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008291 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8295$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008296if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008297 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008298# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8299# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8300# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8302$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008303if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008307#ifdef HAVE_PTHREAD_H
8308#include <pthread.h>
8309#endif
8310
Matthias Kloseb9621712010-04-24 17:59:49 +00008311"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008312
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008313else
Matthias Kloseb9621712010-04-24 17:59:49 +00008314 if test "$ac_cv_type_pthread_t" = yes; then
8315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8316$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008317as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008318See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319 else
8320 ac_cv_sizeof_pthread_t=0
8321 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008323
Trent Mick635f6fb2000-08-23 21:33:05 +00008324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8326$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008327
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008328
8329
Martin v. Löwis11437992002-04-12 09:54:03 +00008330cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008331#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008332_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008334
Trent Mick635f6fb2000-08-23 21:33:05 +00008335fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008336CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008337
Michael W. Hudson54241132001-12-07 15:38:26 +00008338
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008339case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008340 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008341 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8342 ;;
8343 Darwin/*)
8344 OTHER_LIBTOOL_OPT=""
8345 ;;
8346esac
8347
8348
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008349
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008350case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008351 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008352 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8353 if test "${enable_universalsdk}"; then
8354 :
8355 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008356 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008357 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008358 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008359 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008360 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008361 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008362 if test ${gcc_version} '<' 4.0
8363 then
8364 LIBTOOL_CRUFT="-lcc_dynamic"
8365 else
8366 LIBTOOL_CRUFT=""
8367 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008369 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370else
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008372/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008373
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008374 #include <unistd.h>
8375 int main(int argc, char*argv[])
8376 {
8377 if (sizeof(long) == 4) {
8378 return 0;
8379 } else {
8380 return 1;
8381 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008382 }
8383
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008385if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008386 ac_osx_32bit=yes
8387else
Matthias Kloseb9621712010-04-24 17:59:49 +00008388 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008392fi
8393
8394
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008395 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008396 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008397 i386)
8398 MACOSX_DEFAULT_ARCH="i386"
8399 ;;
8400 ppc)
8401 MACOSX_DEFAULT_ARCH="ppc"
8402 ;;
8403 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008404 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008405 ;;
8406 esac
8407 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008408 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008409 i386)
8410 MACOSX_DEFAULT_ARCH="x86_64"
8411 ;;
8412 ppc)
8413 MACOSX_DEFAULT_ARCH="ppc64"
8414 ;;
8415 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008416 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008417 ;;
8418 esac
8419
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008420 fi
8421
8422 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008423 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008424 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008425esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8427$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008428if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008429then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008430 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008431 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008432 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8437$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008438 if test $enable_shared = "yes"
8439 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008440 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 +00008441 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442else
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008445fi
8446
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8448$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008449case $ac_sys_system/$ac_sys_release in
8450 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008451
Matthias Kloseb9621712010-04-24 17:59:49 +00008452$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008453
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8455$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008456 ;;
8457 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8459$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008460 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008461esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008462
Guido van Rossum0a516c91994-09-12 10:58:40 +00008463# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008464
Michael W. Hudson54241132001-12-07 15:38:26 +00008465
8466
8467
8468
Benjamin Peterson99f03762010-04-11 22:15:28 +00008469
Thomas Wouters477c8d52006-05-27 19:21:47 +00008470
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008471# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8472# -- usually .so, .sl on HP-UX, .dll on Cygwin
8473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8474$as_echo_n "checking the extension of shared libraries... " >&6; }
8475if test -z "$SHLIB_SUFFIX"; then
8476 case $ac_sys_system in
8477 hp*|HP*)
8478 case `uname -m` in
8479 ia64) SHLIB_SUFFIX=.so;;
8480 *) SHLIB_SUFFIX=.sl;;
8481 esac
8482 ;;
8483 CYGWIN*) SHLIB_SUFFIX=.dll;;
8484 *) SHLIB_SUFFIX=.so;;
8485 esac
8486fi
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8488$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008489
Guido van Rossum0a516c91994-09-12 10:58:40 +00008490# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008491# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008492# (Shared libraries in this instance are shared modules to be loaded into
8493# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8495$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496if test -z "$LDSHARED"
8497then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008498 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008499 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008500 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008501 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008502 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008503 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008504 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008506 if test "$GCC" = "yes" ; then
8507 LDSHARED='$(CC) -shared'
8508 LDCXXSHARED='$(CXX) -shared'
8509 else
8510 LDSHARED='$(CC) -G'
8511 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008512 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008513 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008514 if test "$GCC" = "yes" ; then
8515 LDSHARED='$(CC) -shared'
8516 LDCXXSHARED='$(CXX) -shared'
8517 else
8518 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008519 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008520 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008521 LDSHARED='$(CC) -bundle'
8522 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008523 if test "$enable_framework" ; then
8524 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008525 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8526 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008528 else
8529 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008530 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008531 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008532 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008533 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED='$(CC) -bundle'
8535 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008536 if test "$enable_framework" ; then
8537 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008538 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8539 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008540 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008541 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008542 # No framework, use the Python app as bundle-loader
8543 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008544 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008545 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008546 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008547 Darwin/*)
8548 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8549 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008550
Ned Deily36820b62014-06-25 13:44:22 -07008551 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8552 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8553 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8554 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8555 if test ${dep_target_major} -eq 10 && \
8556 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008557 then
Ned Deily36820b62014-06-25 13:44:22 -07008558 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008559 LDSHARED='$(CC) -bundle'
8560 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008561 if test "$enable_framework" ; then
8562 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008563 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8564 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008565 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008566 else
8567 # No framework, use the Python app as bundle-loader
8568 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8569 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008570 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008571 fi
Ned Deily36820b62014-06-25 13:44:22 -07008572 else
8573 # building for OS X 10.3 and later
8574 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8575 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8576 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008577 fi
8578 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008579 Linux*|GNU*|QNX*)
8580 LDSHARED='$(CC) -shared'
8581 LDCXXSHARED='$(CXX) -shared';;
8582 BSD/OS*/4*)
8583 LDSHARED="gcc -shared"
8584 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008585 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008586 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008587 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008588 LDSHARED='$(CC) -shared'
8589 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008590 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008591 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008592 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008593 OpenBSD*)
8594 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8595 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008596 LDSHARED='$(CC) -shared $(CCSHARED)'
8597 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008598 else
8599 case `uname -r` in
8600 [01].* | 2.[0-7] | 2.[0-7].*)
8601 LDSHARED="ld -Bshareable ${LDFLAGS}"
8602 ;;
8603 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008604 LDSHARED='$(CC) -shared $(CCSHARED)'
8605 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008606 ;;
8607 esac
8608 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008609 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008610 LDSHARED='$(CC) -shared'
8611 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008612 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008613 if test "$GCC" = "yes" ; then
8614 LDSHARED='$(CC) -shared'
8615 LDCXXSHARED='$(CXX) -shared'
8616 else
8617 LDSHARED='$(CC) -G'
8618 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008619 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008620 SCO_SV*)
8621 LDSHARED='$(CC) -Wl,-G,-Bexport'
8622 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8623 CYGWIN*)
8624 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8625 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008626 *) LDSHARED="ld";;
8627 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8630$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008631LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008632BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008633# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008634# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8636$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008637if test -z "$CCSHARED"
8638then
Guido van Rossum07397971997-04-29 21:49:50 +00008639 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008640 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008641 then CCSHARED="-fPIC";
8642 elif test `uname -p` = sparc;
8643 then CCSHARED="-xcode=pic32";
8644 else CCSHARED="-Kpic";
8645 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008646 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008647 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008648 else CCSHARED="+z";
8649 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008650 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008651 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008652 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008653 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008654 if test "$GCC" = "yes"
8655 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008656 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008657 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008658 SCO_SV*)
8659 if test "$GCC" = "yes"
8660 then CCSHARED="-fPIC"
8661 else CCSHARED="-Kpic -belf"
8662 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008663 IRIX*/6*) case $CC in
8664 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008665 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008666 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008667 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8670$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008671# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008672# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8674$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008675if test -z "$LINKFORSHARED"
8676then
Guido van Rossum07397971997-04-29 21:49:50 +00008677 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008678 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008679 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008680 LINKFORSHARED="-Wl,-E -Wl,+s";;
8681# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008682 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008683 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008684 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008686 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008687
8688 # Issue #18075: the default maximum stack size (8MBytes) is too
8689 # small for the default recursion limit. Increase the stack size
8690 # to ensure that tests don't crash
8691 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8692
Jack Jansene578a632001-08-15 01:27:14 +00008693 if test "$enable_framework"
8694 then
Jack Jansenda49e192005-01-07 13:08:22 +00008695 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008696 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008697 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008698 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008699 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008700 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008701 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008702 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8703 then
8704 LINKFORSHARED="-Wl,--export-dynamic"
8705 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008706 SunOS/5*) case $CC in
8707 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008708 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008709 then
8710 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008711 fi;;
8712 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008713 CYGWIN*)
8714 if test $enable_shared = "no"
8715 then
8716 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8717 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008718 QNX*)
8719 # -Wl,-E causes the symbols to be added to the dynamic
8720 # symbol table so that they can be found when a module
8721 # is loaded. -N 2048K causes the stack size to be set
8722 # to 2048 kilobytes so that the stack doesn't overflow
8723 # when running test_compile.py.
8724 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8728$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729
Michael W. Hudson54241132001-12-07 15:38:26 +00008730
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8733$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008734if test ! "$LIBRARY" = "$LDLIBRARY"
8735then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008736 case $ac_sys_system in
8737 CYGWIN*)
8738 # Cygwin needs CCSHARED when building extension DLLs
8739 # but not when building the interpreter DLL.
8740 CFLAGSFORSHARED='';;
8741 *)
8742 CFLAGSFORSHARED='$(CCSHARED)'
8743 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8746$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008747
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008748# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8749# library (with --enable-shared).
8750# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008751# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8752# if it is not required, since it creates a dependency of the shared library
8753# to LIBS. This, in turn, means that applications linking the shared libpython
8754# don't need to link LIBS explicitly. The default should be only changed
8755# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008756
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8758$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008759case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008760 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008761 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008762esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8764$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008765
8766
Guido van Rossum627b2d71993-12-24 10:39:16 +00008767# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8769$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008771 $as_echo_n "(cached) " >&6
8772else
8773 ac_check_lib_save_LIBS=$LIBS
8774LIBS="-lsendfile $LIBS"
8775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8776/* end confdefs.h. */
8777
8778/* Override any GCC internal prototype to avoid an error.
8779 Use char because int might match the return type of a GCC
8780 builtin and then its argument prototype would still apply. */
8781#ifdef __cplusplus
8782extern "C"
8783#endif
8784char sendfile ();
8785int
8786main ()
8787{
8788return sendfile ();
8789 ;
8790 return 0;
8791}
8792_ACEOF
8793if ac_fn_c_try_link "$LINENO"; then :
8794 ac_cv_lib_sendfile_sendfile=yes
8795else
8796 ac_cv_lib_sendfile_sendfile=no
8797fi
8798rm -f core conftest.err conftest.$ac_objext \
8799 conftest$ac_exeext conftest.$ac_ext
8800LIBS=$ac_check_lib_save_LIBS
8801fi
8802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8803$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008804if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008805 cat >>confdefs.h <<_ACEOF
8806#define HAVE_LIBSENDFILE 1
8807_ACEOF
8808
8809 LIBS="-lsendfile $LIBS"
8810
8811fi
8812
Matthias Kloseb9621712010-04-24 17:59:49 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8814$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008815if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008817else
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008819LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823/* Override any GCC internal prototype to avoid an error.
8824 Use char because int might match the return type of a GCC
8825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008826#ifdef __cplusplus
8827extern "C"
8828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008829char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008830int
8831main ()
8832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ;
8835 return 0;
8836}
8837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008840else
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008842fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008843rm -f core conftest.err conftest.$ac_objext \
8844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8848$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008849if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 cat >>confdefs.h <<_ACEOF
8851#define HAVE_LIBDL 1
8852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008853
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008854 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008856fi
8857 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8859$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008860if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008862else
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008864LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868/* Override any GCC internal prototype to avoid an error.
8869 Use char because int might match the return type of a GCC
8870 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008871#ifdef __cplusplus
8872extern "C"
8873#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008874char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008875int
8876main ()
8877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008878return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ;
8880 return 0;
8881}
8882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888rm -f core conftest.err conftest.$ac_objext \
8889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008890LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8893$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008894if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 cat >>confdefs.h <<_ACEOF
8896#define HAVE_LIBDLD 1
8897_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008899 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008901fi
8902 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008903
Georg Brandlb1441c72009-01-03 22:33:39 +00008904# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008905if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8907$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008908if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008910else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008911 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915/* Override any GCC internal prototype to avoid an error.
8916 Use char because int might match the return type of a GCC
8917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008918#ifdef __cplusplus
8919extern "C"
8920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008921char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008922int
8923main ()
8924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008926 ;
8927 return 0;
8928}
8929_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930for ac_lib in '' pthread rt posix4; do
8931 if test -z "$ac_lib"; then
8932 ac_res="none required"
8933 else
8934 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008935 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008936 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008938 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940rm -f core conftest.err conftest.$ac_objext \
8941 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008942 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945done
Victor Stinnere0be4232011-10-25 13:06:09 +02008946if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008947
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948else
8949 ac_cv_search_sem_init=no
8950fi
8951rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008952LIBS=$ac_func_search_save_LIBS
8953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8955$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008956ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008957if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008959
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008960fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008961 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008962 # posix4 on Solaris 2.6
8963 # pthread (first!) on Linux
8964fi
8965
Martin v. Löwis19d17342003-06-14 21:03:05 +00008966# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8968$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008969if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008971else
8972 ac_check_lib_save_LIBS=$LIBS
8973LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008975/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008977/* Override any GCC internal prototype to avoid an error.
8978 Use char because int might match the return type of a GCC
8979 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008980#ifdef __cplusplus
8981extern "C"
8982#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008983char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008984int
8985main ()
8986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008987return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008988 ;
8989 return 0;
8990}
8991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008993 ac_cv_lib_intl_textdomain=yes
8994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997rm -f core conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008999LIBS=$ac_check_lib_save_LIBS
9000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9002$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009003if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004
Matthias Kloseb9621712010-04-24 17:59:49 +00009005$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006
Brett Cannonc6d936e2009-06-07 20:09:53 +00009007 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009008fi
9009
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009010
9011# checks for system dependent C++ extensions support
9012case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9014$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009016/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009017
Georg Brandl59e87bd2011-02-15 19:48:59 +00009018 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009019int
9020main ()
9021{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009022loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ;
9024 return 0;
9025}
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
Martin v. Löwis11437992002-04-12 09:54:03 +00009027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009028if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009029
Matthias Kloseb159a552010-04-25 21:00:44 +00009030
Matthias Kloseb9621712010-04-24 17:59:49 +00009031$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009032
Matthias Kloseb159a552010-04-25 21:00:44 +00009033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009034$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009035
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009036else
Matthias Kloseb159a552010-04-25 21:00:44 +00009037
9038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009039$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009040
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009041fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009042rm -f core conftest.err conftest.$ac_objext \
9043 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009044 *) ;;
9045esac
9046
Christian Heimes985ecdc2013-11-20 11:46:18 +01009047# check for systems that require aligned memory access
9048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9049$as_echo_n "checking aligned memory access is required... " >&6; }
9050if test "$cross_compiling" = yes; then :
9051 aligned_required=yes
9052else
9053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9054/* end confdefs.h. */
9055
9056int main()
9057{
9058 char s[16];
9059 int i, *p1, *p2;
9060 for (i=0; i < 16; i++)
9061 s[i] = i;
9062 p1 = (int*)(s+1);
9063 p2 = (int*)(s+2);
9064 if (*p1 == *p2)
9065 return 1;
9066 return 0;
9067}
9068
9069_ACEOF
9070if ac_fn_c_try_run "$LINENO"; then :
9071 aligned_required=no
9072else
9073 aligned_required=yes
9074fi
9075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9076 conftest.$ac_objext conftest.beam conftest.$ac_ext
9077fi
9078
9079
9080if test "$aligned_required" = yes ; then
9081
9082$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9083
9084fi
9085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9086$as_echo "$aligned_required" >&6; }
9087
9088
9089# str, bytes and memoryview hash algorithm
9090
9091
9092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9093$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9094
9095# Check whether --with-hash_algorithm was given.
9096if test "${with_hash_algorithm+set}" = set; then :
9097 withval=$with_hash_algorithm;
9098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9099$as_echo "$withval" >&6; }
9100case "$withval" in
9101 siphash24)
9102 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9103
9104 ;;
9105 fnv)
9106 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9107
9108 ;;
9109 *)
9110 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9111 ;;
9112esac
9113
9114else
9115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9116$as_echo "default" >&6; }
9117fi
9118
9119
Guido van Rossum70c7f481998-03-26 18:44:10 +00009120# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9122$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009123if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009125else
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009127LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131/* Override any GCC internal prototype to avoid an error.
9132 Use char because int might match the return type of a GCC
9133 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009134#ifdef __cplusplus
9135extern "C"
9136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009137char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009138int
9139main ()
9140{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009141return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 ;
9143 return 0;
9144}
9145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009148else
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009151rm -f core conftest.err conftest.$ac_objext \
9152 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009153LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009154fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9156$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009157if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009158 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009159fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009160 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9162$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009163if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009165else
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009167LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009171/* Override any GCC internal prototype to avoid an error.
9172 Use char because int might match the return type of a GCC
9173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009174#ifdef __cplusplus
9175extern "C"
9176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009177char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009178int
9179main ()
9180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 ;
9183 return 0;
9184}
9185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009186if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009187 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009188else
Matthias Kloseb9621712010-04-24 17:59:49 +00009189 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009191rm -f core conftest.err conftest.$ac_objext \
9192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009193LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9196$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009197if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009198 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009199fi
9200 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009201
Matthias Kloseb9621712010-04-24 17:59:49 +00009202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9203$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009206if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009207 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9209$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009210LIBS="$withval $LIBS"
9211
9212else
Matthias Kloseb9621712010-04-24 17:59:49 +00009213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9214$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215fi
9216
Guido van Rossum7f43da71994-08-01 12:15:30 +00009217
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009218if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009219 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9220set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9222$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009223if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009224 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009225else
9226 case $PKG_CONFIG in
9227 [\\/]* | ?:[\\/]*)
9228 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9229 ;;
9230 *)
9231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9232for as_dir in $PATH
9233do
9234 IFS=$as_save_IFS
9235 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009238 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009240 break 2
9241 fi
9242done
Matthias Kloseb9621712010-04-24 17:59:49 +00009243 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009244IFS=$as_save_IFS
9245
9246 ;;
9247esac
9248fi
9249PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9250if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9252$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009253else
Matthias Kloseb9621712010-04-24 17:59:49 +00009254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9255$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009256fi
9257
9258
9259fi
9260if test -z "$ac_cv_path_PKG_CONFIG"; then
9261 ac_pt_PKG_CONFIG=$PKG_CONFIG
9262 # Extract the first word of "pkg-config", so it can be a program name with args.
9263set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9265$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009266if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009267 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009268else
9269 case $ac_pt_PKG_CONFIG in
9270 [\\/]* | ?:[\\/]*)
9271 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9272 ;;
9273 *)
9274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9275for as_dir in $PATH
9276do
9277 IFS=$as_save_IFS
9278 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009279 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009280 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009281 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009283 break 2
9284 fi
9285done
Matthias Kloseb9621712010-04-24 17:59:49 +00009286 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009287IFS=$as_save_IFS
9288
9289 ;;
9290esac
9291fi
9292ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9293if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9295$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009296else
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9298$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009299fi
9300
9301 if test "x$ac_pt_PKG_CONFIG" = x; then
9302 PKG_CONFIG=""
9303 else
9304 case $cross_compiling:$ac_tool_warned in
9305yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009306{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9307$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009308ac_tool_warned=yes ;;
9309esac
9310 PKG_CONFIG=$ac_pt_PKG_CONFIG
9311 fi
9312else
9313 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9314fi
9315
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009316
9317# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9319$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009320
9321# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009322if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009323 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009324else
9325 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009326fi
9327
9328
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9330$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009331
9332# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9334$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009335
9336# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009337if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009338 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009339else
9340 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009341fi
9342
9343
9344if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009345 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9346else
9347 LIBFFI_INCLUDEDIR=""
9348fi
9349
9350
Matthias Kloseb9621712010-04-24 17:59:49 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9352$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009353
Stefan Krah60187b52012-03-23 19:06:27 +01009354# Check for use of the system libmpdec library
9355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9356$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9357
9358# Check whether --with-system_libmpdec was given.
9359if test "${with_system_libmpdec+set}" = set; then :
9360 withval=$with_system_libmpdec;
9361else
9362 with_system_libmpdec="no"
9363fi
9364
9365
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9367$as_echo "$with_system_libmpdec" >&6; }
9368
Benjamin Peterson076ed002010-10-31 17:11:02 +00009369# Check for support for loadable sqlite extensions
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9371$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9372# Check whether --enable-loadable-sqlite-extensions was given.
9373if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9374 enableval=$enable_loadable_sqlite_extensions;
9375else
9376 enable_loadable_sqlite_extensions="no"
9377fi
9378
9379
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9381$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9382
Ned Deilyd819b932013-09-06 01:07:05 -07009383# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9384
9385
9386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9387$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9388
9389# Check whether --with-tcltk-includes was given.
9390if test "${with_tcltk_includes+set}" = set; then :
9391 withval=$with_tcltk_includes;
9392else
9393 with_tcltk_includes="default"
9394fi
9395
9396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9397$as_echo "$with_tcltk_includes" >&6; }
9398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9399$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9400
9401# Check whether --with-tcltk-libs was given.
9402if test "${with_tcltk_libs+set}" = set; then :
9403 withval=$with_tcltk_libs;
9404else
9405 with_tcltk_libs="default"
9406fi
9407
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9409$as_echo "$with_tcltk_libs" >&6; }
9410if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9411then
9412 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9413 then
9414 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9415 fi
9416 TCLTK_INCLUDES=""
9417 TCLTK_LIBS=""
9418else
9419 TCLTK_INCLUDES="$with_tcltk_includes"
9420 TCLTK_LIBS="$with_tcltk_libs"
9421fi
9422
Matthias Klose55708cc2009-04-30 08:06:49 +00009423# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9425$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009426
9427# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009428if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009429 withval=$with_dbmliborder;
9430if test x$with_dbmliborder = xyes
9431then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009432as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009433else
9434 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9435 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9436 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009437 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009438 fi
9439 done
9440fi
9441fi
9442
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9444$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009445
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009446# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009447
9448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9450$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009454 withval=$with_signal_module;
9455fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009456
9457
9458if test -z "$with_signal_module"
9459then with_signal_module="yes"
9460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9462$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009463
9464if test "${with_signal_module}" = "yes"; then
9465 USE_SIGNAL_MODULE=""
9466 SIGNAL_OBJS=""
9467else
9468 USE_SIGNAL_MODULE="#"
9469 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9470fi
9471
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009472# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009473
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009474USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476
Martin v. Löwis11437992002-04-12 09:54:03 +00009477
9478# Templates for things AC_DEFINEd more than once.
9479# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009480
9481
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9484$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488 withval=$with_threads;
9489fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009490
9491
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009492# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009494# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009495if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496 withval=$with_thread; with_threads=$with_thread
9497fi
9498
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009499
9500if test -z "$with_threads"
9501then with_threads="yes"
9502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9504$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009505
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009506
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009507if test "$with_threads" = "no"
9508then
9509 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009510elif test "$ac_cv_pthread_is_default" = yes
9511then
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009513
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009514 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009516
9517 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009519elif test "$ac_cv_kpthread" = "yes"
9520then
9521 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009522 if test "$ac_cv_cxx_thread" = "yes"; then
9523 CXX="$CXX -Kpthread"
9524 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009527 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009528 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009529elif test "$ac_cv_kthread" = "yes"
9530then
9531 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009532 if test "$ac_cv_cxx_thread" = "yes"; then
9533 CXX="$CXX -Kthread"
9534 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009536
9537 posix_threads=yes
9538 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009539elif test "$ac_cv_pthread" = "yes"
9540then
9541 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009542 if test "$ac_cv_cxx_thread" = "yes"; then
9543 CXX="$CXX -pthread"
9544 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009545 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009546
9547 posix_threads=yes
9548 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009549else
9550 if test ! -z "$with_threads" -a -d "$with_threads"
9551 then LDFLAGS="$LDFLAGS -L$with_threads"
9552 fi
9553 if test ! -z "$withval" -a -d "$withval"
9554 then LDFLAGS="$LDFLAGS -L$withval"
9555 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009556
9557 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009558 # define _POSIX_THREADS in unistd.h. Some apparently don't
9559 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9561$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009563/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009564
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009565#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009566#ifdef _POSIX_THREADS
9567yes
9568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
9570_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009573 unistd_defines_pthreads=yes
9574else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009575 unistd_defines_pthreads=no
9576fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009577rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9580$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009583
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009584 # Just looking for pthread_create in libpthread is not enough:
9585 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9586 # So we really have to include pthread.h, and then link.
9587 _libs=$LIBS
9588 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9590$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009593
9594#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009595#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009596
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009597void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009598int
9599main ()
9600{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009601
9602pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ;
9604 return 0;
9605}
9606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009608
Matthias Kloseb9621712010-04-24 17:59:49 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9610$as_echo "yes" >&6; }
9611 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009612
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009613 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009614 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009615else
Martin v. Löwis11437992002-04-12 09:54:03 +00009616
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009617 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009618 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009619if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009622 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009623 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009624else
Guido van Rossumad678af1998-10-02 14:42:15 +00009625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9627$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630else
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636/* Override any GCC internal prototype to avoid an error.
9637 Use char because int might match the return type of a GCC
9638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639#ifdef __cplusplus
9640extern "C"
9641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009642char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009643int
9644main ()
9645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ;
9648 return 0;
9649}
9650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009653else
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009658LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9661$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009662if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009663 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009664
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009665 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009666 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009667 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009668else
Greg Steinadf63d62000-07-05 10:38:09 +00009669
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9671$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009672if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009674else
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009676LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680/* Override any GCC internal prototype to avoid an error.
9681 Use char because int might match the return type of a GCC
9682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009683#ifdef __cplusplus
9684extern "C"
9685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009686char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687int
9688main ()
9689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ;
9692 return 0;
9693}
9694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009697else
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700rm -f core conftest.err conftest.$ac_objext \
9701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9705$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009706if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009707 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009708
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009709 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009710 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009711 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009712else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009713
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9715$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009716if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009718else
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009720LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724/* Override any GCC internal prototype to avoid an error.
9725 Use char because int might match the return type of a GCC
9726 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727#ifdef __cplusplus
9728extern "C"
9729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009730char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009731int
9732main ()
9733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ;
9736 return 0;
9737}
9738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009741else
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744rm -f core conftest.err conftest.$ac_objext \
9745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009746LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9749$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009752
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009753 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009754 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009755 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009756else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009757
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9759$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009760if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009762else
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009764LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768/* Override any GCC internal prototype to avoid an error.
9769 Use char because int might match the return type of a GCC
9770 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009771#ifdef __cplusplus
9772extern "C"
9773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009774char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009775int
9776main ()
9777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ;
9780 return 0;
9781}
9782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009783if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009785else
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009788rm -f core conftest.err conftest.$ac_objext \
9789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9793$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009794if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009795 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009796
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009797 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009798 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009799 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009800else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009801
Martin v. Löwis130fb172001-07-19 11:00:41 +00009802 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009803fi
9804
Guido van Rossum627b2d71993-12-24 10:39:16 +00009805
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009806fi
9807
Guido van Rossum0be3e491997-05-22 20:33:33 +00009808fi
9809
Guido van Rossum49545951997-12-02 19:28:29 +00009810fi
9811
Guido van Rossumb93a8621998-05-07 13:27:32 +00009812fi
9813
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009815rm -f core conftest.err conftest.$ac_objext \
9816 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9819$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009820if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009822else
Martin v. Löwis11437992002-04-12 09:54:03 +00009823 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009824LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828/* Override any GCC internal prototype to avoid an error.
9829 Use char because int might match the return type of a GCC
9830 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009831#ifdef __cplusplus
9832extern "C"
9833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009834char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009839 ;
9840 return 0;
9841}
9842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009845else
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848rm -f core conftest.err conftest.$ac_objext \
9849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009850LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9853$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009854if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009856
Martin v. Löwis130fb172001-07-19 11:00:41 +00009857 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009858 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009859 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009860fi
9861
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009862
Neal Norwitza978ab02002-11-02 16:58:05 +00009863 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9865$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009866if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009868else
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009870LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874/* Override any GCC internal prototype to avoid an error.
9875 Use char because int might match the return type of a GCC
9876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009877#ifdef __cplusplus
9878extern "C"
9879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009880char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009881int
9882main ()
9883{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 ;
9886 return 0;
9887}
9888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009891else
Matthias Kloseb9621712010-04-24 17:59:49 +00009892 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009894rm -f core conftest.err conftest.$ac_objext \
9895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009896LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9899$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009900if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009902
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009903 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009904 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009905 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009906fi
9907
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009908 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009909fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009910
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911if test "$posix_threads" = "yes"; then
9912 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009913
Matthias Kloseb9621712010-04-24 17:59:49 +00009914$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009915
9916 fi
9917
9918 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9919 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009920 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009921$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009922
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009923 ;;
9924 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009926
9927 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009928 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009929$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009930
9931 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009932 esac
9933
Matthias Kloseb9621712010-04-24 17:59:49 +00009934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9935$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009936 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009938else
Matthias Kloseb9621712010-04-24 17:59:49 +00009939 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009940 ac_cv_pthread_system_supported=no
9941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009944
9945 #include <stdio.h>
9946 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009947 void *foo(void *parm) {
9948 return NULL;
9949 }
9950 main() {
9951 pthread_attr_t attr;
9952 pthread_t id;
9953 if (pthread_attr_init(&attr)) exit(-1);
9954 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9955 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9956 exit(0);
9957 }
9958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009959if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009960 ac_cv_pthread_system_supported=yes
9961else
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009966fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968
Guido van Rossum627b2d71993-12-24 10:39:16 +00009969fi
9970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9972$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009973 if test "$ac_cv_pthread_system_supported" = "yes"; then
9974
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009976
9977 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 for ac_func in pthread_sigmask
9979do :
9980 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009981if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009982 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009983#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009984_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009985 case $ac_sys_system in
9986 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009989
9990 ;;
9991 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009992fi
9993done
9994
Christian Heimesf77b4b22013-08-21 13:26:05 +02009995 for ac_func in pthread_atfork
9996do :
9997 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9998if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9999 cat >>confdefs.h <<_ACEOF
10000#define HAVE_PTHREAD_ATFORK 1
10001_ACEOF
10002
10003fi
10004done
10005
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010006fi
10007
10008
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010009# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010010
Matthias Kloseb9621712010-04-24 17:59:49 +000010011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10012$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010014if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010015 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010016 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019 ipv6=no
10020 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10022$as_echo "yes" >&6; }
10023 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010024
10025 ipv6=yes
10026 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010028else
Martin v. Löwis11437992002-04-12 09:54:03 +000010029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010031/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010032 /* AF_INET6 available check */
10033#include <sys/types.h>
10034#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010035int
10036main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010038int domain = AF_INET6;
10039 ;
10040 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010041}
Martin v. Löwis11437992002-04-12 09:54:03 +000010042_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010043if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10046$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010047 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010049else
Matthias Kloseb159a552010-04-25 21:00:44 +000010050
Matthias Kloseb9621712010-04-24 17:59:49 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10052$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010058if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10060$as_echo_n "checking if RFC2553 API is available... " >&6; }
10061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010062/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010063
10064 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010065#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010066int
10067main ()
10068{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010069struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010070 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ;
10072 return 0;
10073}
Matthias Kloseb159a552010-04-25 21:00:44 +000010074
Martin v. Löwis11437992002-04-12 09:54:03 +000010075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010076if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010077
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010079$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010080 ipv6=yes
10081
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010082else
Matthias Kloseb159a552010-04-25 21:00:44 +000010083
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010085$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010086 ipv6=no
10087
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010088fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010090fi
10091
10092if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010094
10095fi
10096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097fi
10098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099
10100ipv6type=unknown
10101ipv6lib=none
10102ipv6trylibc=no
10103
10104if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10106$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010107 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10108 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109 case $i in
10110 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010114#include <netinet/in.h>
10115#ifdef IPV6_INRIA_VERSION
10116yes
10117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010121 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010123rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124
10125 ;;
10126 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010129
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130#include <netinet/in.h>
10131#ifdef __KAME__
10132yes
10133#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010134_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010137 ipv6type=$i;
10138 ipv6lib=inet6
10139 ipv6libdir=/usr/local/v6/lib
10140 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010143
10144 ;;
10145 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010148
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149#include <features.h>
10150#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10151yes
10152#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010153_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010154if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156 ipv6type=$i;
10157 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010159rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010160
10161 ;;
10162 linux-inet6)
10163 if test -d /usr/inet6; then
10164 ipv6type=$i
10165 ipv6lib=inet6
10166 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010167 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010168 fi
10169 ;;
10170 solaris)
10171 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010172 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010173 ipv6type=$i
10174 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010175 fi
10176 fi
10177 ;;
10178 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010182#include <sys/param.h>
10183#ifdef _TOSHIBA_INET6
10184yes
10185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010186_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189 ipv6type=$i;
10190 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010191 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010193rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194
10195 ;;
10196 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010199
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010200#include </usr/local/v6/include/sys/v6config.h>
10201#ifdef __V6D__
10202yes
10203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010204_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010206 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207 ipv6type=$i;
10208 ipv6lib=v6;
10209 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010210 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010211fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010212rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010213
10214 ;;
10215 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010217/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010218
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010219#include <sys/param.h>
10220#ifdef _ZETA_MINAMI_INET6
10221yes
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010225 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226 ipv6type=$i;
10227 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010228 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010230rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010231
10232 ;;
10233 esac
10234 if test "$ipv6type" != "unknown"; then
10235 break
10236 fi
10237 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10239$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240fi
10241
10242if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10243 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10244 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10245 echo "using lib$ipv6lib"
10246 else
10247 if test $ipv6trylibc = "yes"; then
10248 echo "using libc"
10249 else
10250 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10251 echo "You need to fetch lib$ipv6lib.a from appropriate"
10252 echo 'ipv6 kit and compile beforehand.'
10253 exit 1
10254 fi
10255 fi
10256fi
10257
Matthias Kloseb9621712010-04-24 17:59:49 +000010258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10259$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010261/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010262
10263 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010264int
10265main ()
10266{
10267FSIORefNum fRef = 0
10268 ;
10269 return 0;
10270}
Matthias Kloseb159a552010-04-25 21:00:44 +000010271
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010273if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010274
Matthias Kloseb159a552010-04-25 21:00:44 +000010275
Matthias Kloseb9621712010-04-24 17:59:49 +000010276$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010277
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10279$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010280
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010281else
Matthias Kloseb159a552010-04-25 21:00:44 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010285
10286fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10288
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010289# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10291$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010294if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 withval=$with_doc_strings;
10296fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010297
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010298
10299if test -z "$with_doc_strings"
10300then with_doc_strings="yes"
10301fi
10302if test "$with_doc_strings" != "no"
10303then
10304
Matthias Kloseb9621712010-04-24 17:59:49 +000010305$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010306
10307fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10309$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010310
Antoine Pitrou042b1282010-08-13 21:15:58 +000010311# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10313$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010314
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010316if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010318if test "$withval" != no
10319then
10320
Matthias Kloseb9621712010-04-24 17:59:49 +000010321$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10324$as_echo "yes" >&6; }
10325else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10326$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010327fi
10328else
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331fi
10332
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010333
10334# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10336$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010339if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010340 withval=$with_pymalloc;
10341fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010342
Neil Schemenauera35c6882001-02-27 04:45:05 +000010343
Neil Schemenauer16c22972002-03-22 15:34:49 +000010344if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010345then
10346 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010347fi
10348if test "$with_pymalloc" != "no"
10349then
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010352
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010353 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010354fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10356$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010357
Benjamin Peterson05159c42009-12-03 03:01:27 +000010358# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10360$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010361
10362# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010363if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010364 withval=$with_valgrind;
10365else
10366 with_valgrind=no
10367fi
10368
Matthias Kloseb9621712010-04-24 17:59:49 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10370$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010371if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 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 +020010373if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010376
10377else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010378 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010379
10380fi
10381
10382
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010383 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010384fi
10385
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010386# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010387
Guido van Rossum98935bf2001-09-05 19:13:16 +000010388DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010389
Guido van Rossume97ee181999-12-20 21:27:22 +000010390# the dlopen() function means we might want to use dynload_shlib.o. some
10391# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010392for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010393do :
10394 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010395if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010397#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010398_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010399
Guido van Rossume97ee181999-12-20 21:27:22 +000010400fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010401done
Guido van Rossume97ee181999-12-20 21:27:22 +000010402
Michael W. Hudson54241132001-12-07 15:38:26 +000010403
Guido van Rossume97ee181999-12-20 21:27:22 +000010404# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10405# loading of modules.
10406
Matthias Kloseb9621712010-04-24 17:59:49 +000010407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10408$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010409if test -z "$DYNLOADFILE"
10410then
10411 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010412 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10413 if test "$ac_cv_func_dlopen" = yes
10414 then DYNLOADFILE="dynload_shlib.o"
10415 else DYNLOADFILE="dynload_aix.o"
10416 fi
10417 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010418 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010419 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10420 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010421 *)
10422 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10423 # out any dynamic loading
10424 if test "$ac_cv_func_dlopen" = yes
10425 then DYNLOADFILE="dynload_shlib.o"
10426 else DYNLOADFILE="dynload_stub.o"
10427 fi
10428 ;;
10429 esac
10430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10432$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010433if test "$DYNLOADFILE" != "dynload_stub.o"
10434then
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010437
10438fi
10439
Neil Schemenauer4e425612001-06-19 15:44:15 +000010440# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10441
Michael W. Hudson54241132001-12-07 15:38:26 +000010442
Matthias Kloseb9621712010-04-24 17:59:49 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10444$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010445if test -z "$MACHDEP_OBJS"
10446then
Jack Jansene578a632001-08-15 01:27:14 +000010447 MACHDEP_OBJS=$extra_machdep_objs
10448else
10449 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010450fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010451if test -z "$MACHDEP_OBJS"; then
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10453$as_echo "none" >&6; }
10454else
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10456$as_echo "$MACHDEP_OBJS" >&6; }
10457fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010458
Guido van Rossum627b2d71993-12-24 10:39:16 +000010459# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010460for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010461 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010462 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010463 futimens futimes gai_strerror \
10464 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010465 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010466 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010467 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10468 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010469 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010470 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010471 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010472 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010473 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010474 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010475 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10476 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010477 sigaction sigaltstack siginterrupt sigpending sigrelse \
10478 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010479 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010480 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010481 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010482do :
10483 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10484ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010485if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010487#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010488_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010489
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010490fi
10491done
10492
Michael W. Hudson54241132001-12-07 15:38:26 +000010493
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010494ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10495 #include <dirent.h>
10496"
10497if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10498
10499$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10500
10501fi
10502
10503
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010504# For some functions, having a definition is not sufficient, since
10505# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10507$as_echo_n "checking for chroot... " >&6; }
10508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010510#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010511int
10512main ()
10513{
10514void *x=chroot
10515 ;
10516 return 0;
10517}
10518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010520
Matthias Kloseb9621712010-04-24 17:59:49 +000010521$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010522
Matthias Kloseb159a552010-04-25 21:00:44 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010524$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010528
10529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10532$as_echo_n "checking for link... " >&6; }
10533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010534/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010535#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010536int
10537main ()
10538{
10539void *x=link
10540 ;
10541 return 0;
10542}
10543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010544if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010545
Matthias Kloseb9621712010-04-24 17:59:49 +000010546$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010547
Matthias Kloseb159a552010-04-25 21:00:44 +000010548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010549$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010553
10554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10557$as_echo_n "checking for symlink... " >&6; }
10558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010559/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010560#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010561int
10562main ()
10563{
10564void *x=symlink
10565 ;
10566 return 0;
10567}
10568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010569if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010570
Matthias Kloseb9621712010-04-24 17:59:49 +000010571$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010572
Matthias Kloseb159a552010-04-25 21:00:44 +000010573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010575else
Matthias Kloseb9621712010-04-24 17:59:49 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10577$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010578
10579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10582$as_echo_n "checking for fchdir... " >&6; }
10583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010584/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010585#include <unistd.h>
10586int
10587main ()
10588{
10589void *x=fchdir
10590 ;
10591 return 0;
10592}
10593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010594if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010597
Matthias Kloseb159a552010-04-25 21:00:44 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010600else
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10602$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010603
10604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10607$as_echo_n "checking for fsync... " >&6; }
10608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010609/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010610#include <unistd.h>
10611int
10612main ()
10613{
10614void *x=fsync
10615 ;
10616 return 0;
10617}
10618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010619if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010622
Matthias Kloseb159a552010-04-25 21:00:44 +000010623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010624$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010625else
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010628
10629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10632$as_echo_n "checking for fdatasync... " >&6; }
10633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010635#include <unistd.h>
10636int
10637main ()
10638{
10639void *x=fdatasync
10640 ;
10641 return 0;
10642}
10643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010644if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010645
Matthias Kloseb9621712010-04-24 17:59:49 +000010646$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010647
Matthias Kloseb159a552010-04-25 21:00:44 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010653
10654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10657$as_echo_n "checking for epoll... " >&6; }
10658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010659/* end confdefs.h. */
10660#include <sys/epoll.h>
10661int
10662main ()
10663{
10664void *x=epoll_create
10665 ;
10666 return 0;
10667}
10668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010669if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010672
Matthias Kloseb159a552010-04-25 21:00:44 +000010673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010675else
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010678
10679fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10682$as_echo_n "checking for epoll_create1... " >&6; }
10683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10684/* end confdefs.h. */
10685#include <sys/epoll.h>
10686int
10687main ()
10688{
10689void *x=epoll_create1
10690 ;
10691 return 0;
10692}
10693_ACEOF
10694if ac_fn_c_try_compile "$LINENO"; then :
10695
10696$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10699$as_echo "yes" >&6; }
10700else
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703
10704fi
10705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10707$as_echo_n "checking for kqueue... " >&6; }
10708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010709/* end confdefs.h. */
10710
10711#include <sys/types.h>
10712#include <sys/event.h>
10713
10714int
10715main ()
10716{
10717int x=kqueue()
10718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010725
Matthias Kloseb159a552010-04-25 21:00:44 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010731
10732fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10735$as_echo_n "checking for prlimit... " >&6; }
10736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10737/* end confdefs.h. */
10738
10739#include <sys/time.h>
10740#include <sys/resource.h>
10741
10742int
10743main ()
10744{
10745void *x=prlimit
10746 ;
10747 return 0;
10748}
10749_ACEOF
10750if ac_fn_c_try_compile "$LINENO"; then :
10751
10752$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10753
10754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10755$as_echo "yes" >&6; }
10756else
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
10759
10760fi
10761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10762
Martin v. Löwisd5843682002-11-21 20:41:28 +000010763# On some systems (eg. FreeBSD 5), we would find a definition of the
10764# functions ctermid_r, setgroups in the library, but no prototype
10765# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10766# address to avoid compiler warnings and potential miscompilations
10767# because of the missing prototypes.
10768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10770$as_echo_n "checking for ctermid_r... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010773
Martin v. Löwisd5843682002-11-21 20:41:28 +000010774#include <stdio.h>
10775
Martin v. Löwisd5843682002-11-21 20:41:28 +000010776int
10777main ()
10778{
10779void* p = ctermid_r
10780 ;
10781 return 0;
10782}
10783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010784if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010785
Matthias Kloseb9621712010-04-24 17:59:49 +000010786$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010787
Matthias Kloseb159a552010-04-25 21:00:44 +000010788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010790else
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10792$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010793
10794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10798$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010799if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010800 $as_echo_n "(cached) " >&6
10801else
10802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010803/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010804#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010805int
10806main ()
10807{
10808void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010809
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010810 ;
10811 return 0;
10812}
10813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010814if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010815 ac_cv_flock_decl=yes
10816else
10817 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010818
10819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010821
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010822fi
10823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10824$as_echo "$ac_cv_flock_decl" >&6; }
10825if test "x${ac_cv_flock_decl}" = xyes; then
10826 for ac_func in flock
10827do :
10828 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010829if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010830 cat >>confdefs.h <<_ACEOF
10831#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010832_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010833
Antoine Pitroua3000072010-09-07 14:52:42 +000010834else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010836$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010837if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010838 $as_echo_n "(cached) " >&6
10839else
10840 ac_check_lib_save_LIBS=$LIBS
10841LIBS="-lbsd $LIBS"
10842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843/* end confdefs.h. */
10844
10845/* Override any GCC internal prototype to avoid an error.
10846 Use char because int might match the return type of a GCC
10847 builtin and then its argument prototype would still apply. */
10848#ifdef __cplusplus
10849extern "C"
10850#endif
10851char flock ();
10852int
10853main ()
10854{
10855return flock ();
10856 ;
10857 return 0;
10858}
10859_ACEOF
10860if ac_fn_c_try_link "$LINENO"; then :
10861 ac_cv_lib_bsd_flock=yes
10862else
10863 ac_cv_lib_bsd_flock=no
10864fi
10865rm -f core conftest.err conftest.$ac_objext \
10866 conftest$ac_exeext conftest.$ac_ext
10867LIBS=$ac_check_lib_save_LIBS
10868fi
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10870$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010871if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010872 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010873
10874
10875$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10876
10877
10878fi
10879
10880
10881fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010882done
10883
Antoine Pitroua3000072010-09-07 14:52:42 +000010884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10887$as_echo_n "checking for getpagesize... " >&6; }
10888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010889/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010890
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010891#include <unistd.h>
10892
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010893int
10894main ()
10895{
10896void* p = getpagesize
10897 ;
10898 return 0;
10899}
10900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010902
Matthias Kloseb9621712010-04-24 17:59:49 +000010903$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010904
Matthias Kloseb159a552010-04-25 21:00:44 +000010905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010907else
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10909$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010910
10911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010913
Victor Stinner984890f2011-11-24 13:53:38 +010010914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10915$as_echo_n "checking for broken unsetenv... " >&6; }
10916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10917/* end confdefs.h. */
10918
10919#include <stdlib.h>
10920
10921int
10922main ()
10923{
10924int res = unsetenv("DUMMY")
10925 ;
10926 return 0;
10927}
10928_ACEOF
10929if ac_fn_c_try_compile "$LINENO"; then :
10930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10931$as_echo "no" >&6; }
10932else
10933
10934$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10935
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10937$as_echo "yes" >&6; }
10938
10939fi
10940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10941
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010942for ac_prog in true
10943do
10944 # Extract the first word of "$ac_prog", so it can be a program name with args.
10945set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10947$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010950else
10951 if test -n "$TRUE"; then
10952 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10953else
10954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10955for as_dir in $PATH
10956do
10957 IFS=$as_save_IFS
10958 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010961 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 $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 +000010963 break 2
10964 fi
10965done
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968
10969fi
10970fi
10971TRUE=$ac_cv_prog_TRUE
10972if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10974$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010975else
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10977$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010978fi
10979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010981 test -n "$TRUE" && break
10982done
10983test -n "$TRUE" || TRUE="/bin/true"
10984
10985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10987$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010988if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010989 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010990else
10991 ac_check_lib_save_LIBS=$LIBS
10992LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010994/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996/* Override any GCC internal prototype to avoid an error.
10997 Use char because int might match the return type of a GCC
10998 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010999#ifdef __cplusplus
11000extern "C"
11001#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011002char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011003int
11004main ()
11005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011007 ;
11008 return 0;
11009}
11010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011012 ac_cv_lib_c_inet_aton=yes
11013else
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011015fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011016rm -f core conftest.err conftest.$ac_objext \
11017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011018LIBS=$ac_check_lib_save_LIBS
11019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11021$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011022if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011023 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011024else
Matthias Kloseb9621712010-04-24 17:59:49 +000011025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11026$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011027if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011029else
11030 ac_check_lib_save_LIBS=$LIBS
11031LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035/* Override any GCC internal prototype to avoid an error.
11036 Use char because int might match the return type of a GCC
11037 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011038#ifdef __cplusplus
11039extern "C"
11040#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042int
11043main ()
11044{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051 ac_cv_lib_resolv_inet_aton=yes
11052else
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011055rm -f core conftest.err conftest.$ac_objext \
11056 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011057LIBS=$ac_check_lib_save_LIBS
11058fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11060$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011061if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011062 cat >>confdefs.h <<_ACEOF
11063#define HAVE_LIBRESOLV 1
11064_ACEOF
11065
11066 LIBS="-lresolv $LIBS"
11067
11068fi
11069
11070
11071fi
11072
11073
Christian Heimesd0764e22007-12-04 15:00:33 +000011074# On Tru64, chflags seems to be present, but calling it will
11075# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11077$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011078if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011080else
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011082 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011085/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011086
Christian Heimesd0764e22007-12-04 15:00:33 +000011087#include <sys/stat.h>
11088#include <unistd.h>
11089int main(int argc, char*argv[])
11090{
11091 if(chflags(argv[0], 0) != 0)
11092 return 1;
11093 return 0;
11094}
Ned Deily3eb67d52011-06-28 00:00:28 -070011095
Christian Heimesd0764e22007-12-04 15:00:33 +000011096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011097if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011098 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011099else
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011104fi
11105
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011107fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11109$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011110if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011113 ac_cv_have_chflags="yes"
11114else
11115 ac_cv_have_chflags="no"
11116fi
11117
11118fi
11119if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011122
11123fi
11124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11126$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011127if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011131 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011132else
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011134/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011135
Christian Heimesd0764e22007-12-04 15:00:33 +000011136#include <sys/stat.h>
11137#include <unistd.h>
11138int main(int argc, char*argv[])
11139{
11140 if(lchflags(argv[0], 0) != 0)
11141 return 1;
11142 return 0;
11143}
Ned Deily3eb67d52011-06-28 00:00:28 -070011144
Christian Heimesd0764e22007-12-04 15:00:33 +000011145_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011146if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011147 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011148else
Matthias Kloseb9621712010-04-24 17:59:49 +000011149 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011150fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11152 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011153fi
11154
11155
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011156fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11158$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011159if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011161if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011162 ac_cv_have_lchflags="yes"
11163else
11164 ac_cv_have_lchflags="no"
11165fi
11166
11167fi
11168if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011171
11172fi
11173
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011174case $ac_sys_system/$ac_sys_release in
11175Darwin/*)
11176 _CUR_CFLAGS="${CFLAGS}"
11177 _CUR_LDFLAGS="${LDFLAGS}"
11178 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11179 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11180 ;;
11181esac
11182
Matthias Kloseb9621712010-04-24 17:59:49 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11184$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011185if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011186 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011187else
11188 ac_check_lib_save_LIBS=$LIBS
11189LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011191/* end confdefs.h. */
11192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193/* Override any GCC internal prototype to avoid an error.
11194 Use char because int might match the return type of a GCC
11195 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011196#ifdef __cplusplus
11197extern "C"
11198#endif
11199char inflateCopy ();
11200int
11201main ()
11202{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011203return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011209 ac_cv_lib_z_inflateCopy=yes
11210else
Matthias Kloseb9621712010-04-24 17:59:49 +000011211 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011213rm -f core conftest.err conftest.$ac_objext \
11214 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011215LIBS=$ac_check_lib_save_LIBS
11216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11218$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011219if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011222
11223fi
11224
11225
11226case $ac_sys_system/$ac_sys_release in
11227Darwin/*)
11228 CFLAGS="${_CUR_CFLAGS}"
11229 LDFLAGS="${_CUR_LDFLAGS}"
11230 ;;
11231esac
11232
Matthias Kloseb9621712010-04-24 17:59:49 +000011233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11234$as_echo_n "checking for hstrerror... " >&6; }
11235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011236/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011237
Martin v. Löwise9416172003-05-03 10:12:45 +000011238#include <netdb.h>
11239
Martin v. Löwise9416172003-05-03 10:12:45 +000011240int
11241main ()
11242{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011243void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011244 ;
11245 return 0;
11246}
11247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011248if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011249
Matthias Kloseb9621712010-04-24 17:59:49 +000011250$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011251
Matthias Kloseb159a552010-04-25 21:00:44 +000011252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011253$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011254else
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11256$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011257
11258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011259rm -f core conftest.err conftest.$ac_objext \
11260 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011261
Matthias Kloseb9621712010-04-24 17:59:49 +000011262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11263$as_echo_n "checking for inet_aton... " >&6; }
11264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011265/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011266
Martin v. Löwis86d66262006-02-17 08:40:11 +000011267#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011268#include <sys/socket.h>
11269#include <netinet/in.h>
11270#include <arpa/inet.h>
11271
Martin v. Löwise9416172003-05-03 10:12:45 +000011272int
11273main ()
11274{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011275void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011283
Matthias Kloseb159a552010-04-25 21:00:44 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011286else
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011289
11290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011291rm -f core conftest.err conftest.$ac_objext \
11292 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011293
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11295$as_echo_n "checking for inet_pton... " >&6; }
11296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011297/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011298
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011299#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011300#include <sys/socket.h>
11301#include <netinet/in.h>
11302#include <arpa/inet.h>
11303
Martin v. Löwise9416172003-05-03 10:12:45 +000011304int
11305main ()
11306{
11307void* p = inet_pton
11308 ;
11309 return 0;
11310}
11311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011312if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011313
Matthias Kloseb9621712010-04-24 17:59:49 +000011314$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011315
Matthias Kloseb159a552010-04-25 21:00:44 +000011316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011318else
Matthias Kloseb9621712010-04-24 17:59:49 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11320$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011321
11322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011324
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011325# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11327$as_echo_n "checking for setgroups... " >&6; }
11328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011330
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011331#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011332#ifdef HAVE_GRP_H
11333#include <grp.h>
11334#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011335
Martin v. Löwisd5843682002-11-21 20:41:28 +000011336int
11337main ()
11338{
11339void* p = setgroups
11340 ;
11341 return 0;
11342}
11343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011344if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011345
Matthias Kloseb9621712010-04-24 17:59:49 +000011346$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011347
Matthias Kloseb159a552010-04-25 21:00:44 +000011348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011350else
Matthias Kloseb9621712010-04-24 17:59:49 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11352$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011353
11354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011356
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011357# check for openpty and forkpty
11358
11359for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011360do :
11361 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011362if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011363 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011364#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011365_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011367else
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11369$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011370if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011372else
Martin v. Löwis11437992002-04-12 09:54:03 +000011373 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011374LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378/* Override any GCC internal prototype to avoid an error.
11379 Use char because int might match the return type of a GCC
11380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011381#ifdef __cplusplus
11382extern "C"
11383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011384char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011385int
11386main ()
11387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 ;
11390 return 0;
11391}
11392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011395else
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011398rm -f core conftest.err conftest.$ac_objext \
11399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011400LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11403$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011404if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011405 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011406 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011407else
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11409$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011410if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011412else
11413 ac_check_lib_save_LIBS=$LIBS
11414LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011416/* end confdefs.h. */
11417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011418/* Override any GCC internal prototype to avoid an error.
11419 Use char because int might match the return type of a GCC
11420 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011421#ifdef __cplusplus
11422extern "C"
11423#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011424char openpty ();
11425int
11426main ()
11427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011428return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011434 ac_cv_lib_bsd_openpty=yes
11435else
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011437fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011438rm -f core conftest.err conftest.$ac_objext \
11439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011440LIBS=$ac_check_lib_save_LIBS
11441fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11443$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011444if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011446 LIBS="$LIBS -lbsd"
11447fi
11448
11449
11450fi
11451
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452
11453fi
11454done
11455
11456for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011457do :
11458 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011459if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011460 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011461#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011462_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011463
Fred Drake8cef4cf2000-06-28 16:40:38 +000011464else
Matthias Kloseb9621712010-04-24 17:59:49 +000011465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11466$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011467if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011469else
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011471LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011475/* Override any GCC internal prototype to avoid an error.
11476 Use char because int might match the return type of a GCC
11477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011478#ifdef __cplusplus
11479extern "C"
11480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011481char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011482int
11483main ()
11484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011495rm -f core conftest.err conftest.$ac_objext \
11496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011497LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11500$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011502 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011504else
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11506$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011507if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011509else
11510 ac_check_lib_save_LIBS=$LIBS
11511LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011513/* end confdefs.h. */
11514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011515/* Override any GCC internal prototype to avoid an error.
11516 Use char because int might match the return type of a GCC
11517 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011518#ifdef __cplusplus
11519extern "C"
11520#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011521char forkpty ();
11522int
11523main ()
11524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011525return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011531 ac_cv_lib_bsd_forkpty=yes
11532else
Matthias Kloseb9621712010-04-24 17:59:49 +000011533 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011535rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011537LIBS=$ac_check_lib_save_LIBS
11538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11540$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011541if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011543 LIBS="$LIBS -lbsd"
11544fi
11545
11546
11547fi
11548
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549
11550fi
11551done
11552
Jack Jansendd19cf82001-12-06 22:36:17 +000011553
Christian Heimesb186d002008-03-18 15:15:01 +000011554# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011555for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011556do :
11557 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011558if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011559 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011560#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011561_ACEOF
11562
11563fi
11564done
11565
11566
Michael W. Hudson54241132001-12-07 15:38:26 +000011567# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011568for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011569do :
11570 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11571ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011572if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011574#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011576
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011577fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011578done
11579
Michael W. Hudson54241132001-12-07 15:38:26 +000011580
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011581ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011582if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011583 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011584
Martin v. Löwis1142de32002-03-29 16:28:31 +000011585else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011587 *" dup2.$ac_objext "* ) ;;
11588 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011590esac
11591
Martin v. Löwis1142de32002-03-29 16:28:31 +000011592fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011593
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011594ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011595if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011596 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11597
11598else
11599 case " $LIBOBJS " in
11600 *" strdup.$ac_objext "* ) ;;
11601 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11602 ;;
11603esac
11604
11605fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011606
11607
11608for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011609do :
11610 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011611if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011612 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011616/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011618int
11619main ()
11620{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011621getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011622 ;
11623 return 0;
11624}
11625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011627
Matthias Kloseb9621712010-04-24 17:59:49 +000011628$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011629
Guido van Rossum627b2d71993-12-24 10:39:16 +000011630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011632
Guido van Rossum627b2d71993-12-24 10:39:16 +000011633fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011634done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011635
Jack Jansen150753c2003-03-29 22:07:47 +000011636for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011637do :
11638 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011639if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011640 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011645#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011646int
11647main ()
11648{
11649setpgrp(0,0);
11650 ;
11651 return 0;
11652}
11653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011657
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011660
11661fi
11662done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011663
Thomas Wouters3a584202000-08-05 23:28:51 +000011664for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011665do :
11666 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011667if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011668 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011669#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011672/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011674int
11675main ()
11676{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011677gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 ;
11679 return 0;
11680}
11681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011682if ac_fn_c_try_compile "$LINENO"; then :
11683
Guido van Rossum627b2d71993-12-24 10:39:16 +000011684else
Skip Montanaro6dead952003-09-25 14:50:04 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011687
Martin v. Löwis11437992002-04-12 09:54:03 +000011688
Guido van Rossum627b2d71993-12-24 10:39:16 +000011689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011691
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011692fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011693done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011694
Michael W. Hudson54241132001-12-07 15:38:26 +000011695
Victor Stinnere0be4232011-10-25 13:06:09 +020011696for ac_func in clock_gettime
11697do :
11698 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11699if test "x$ac_cv_func_clock_gettime" = xyes; then :
11700 cat >>confdefs.h <<_ACEOF
11701#define HAVE_CLOCK_GETTIME 1
11702_ACEOF
11703
11704else
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11707$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11708if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11709 $as_echo_n "(cached) " >&6
11710else
11711 ac_check_lib_save_LIBS=$LIBS
11712LIBS="-lrt $LIBS"
11713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11714/* end confdefs.h. */
11715
11716/* Override any GCC internal prototype to avoid an error.
11717 Use char because int might match the return type of a GCC
11718 builtin and then its argument prototype would still apply. */
11719#ifdef __cplusplus
11720extern "C"
11721#endif
11722char clock_gettime ();
11723int
11724main ()
11725{
11726return clock_gettime ();
11727 ;
11728 return 0;
11729}
11730_ACEOF
11731if ac_fn_c_try_link "$LINENO"; then :
11732 ac_cv_lib_rt_clock_gettime=yes
11733else
11734 ac_cv_lib_rt_clock_gettime=no
11735fi
11736rm -f core conftest.err conftest.$ac_objext \
11737 conftest$ac_exeext conftest.$ac_ext
11738LIBS=$ac_check_lib_save_LIBS
11739fi
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11741$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11742if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11743
11744 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11745
11746
11747$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11748
11749
11750fi
11751
11752
11753fi
11754done
11755
11756
11757for ac_func in clock_getres
11758do :
11759 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11760if test "x$ac_cv_func_clock_getres" = xyes; then :
11761 cat >>confdefs.h <<_ACEOF
11762#define HAVE_CLOCK_GETRES 1
11763_ACEOF
11764
11765else
11766
11767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11768$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11769if ${ac_cv_lib_rt_clock_getres+:} false; then :
11770 $as_echo_n "(cached) " >&6
11771else
11772 ac_check_lib_save_LIBS=$LIBS
11773LIBS="-lrt $LIBS"
11774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775/* end confdefs.h. */
11776
11777/* Override any GCC internal prototype to avoid an error.
11778 Use char because int might match the return type of a GCC
11779 builtin and then its argument prototype would still apply. */
11780#ifdef __cplusplus
11781extern "C"
11782#endif
11783char clock_getres ();
11784int
11785main ()
11786{
11787return clock_getres ();
11788 ;
11789 return 0;
11790}
11791_ACEOF
11792if ac_fn_c_try_link "$LINENO"; then :
11793 ac_cv_lib_rt_clock_getres=yes
11794else
11795 ac_cv_lib_rt_clock_getres=no
11796fi
11797rm -f core conftest.err conftest.$ac_objext \
11798 conftest$ac_exeext conftest.$ac_ext
11799LIBS=$ac_check_lib_save_LIBS
11800fi
11801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11802$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11803if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11804
11805 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11806
11807
11808fi
11809
11810
11811fi
11812done
11813
11814
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11816$as_echo_n "checking for major... " >&6; }
11817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011819
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011820#if defined(MAJOR_IN_MKDEV)
11821#include <sys/mkdev.h>
11822#elif defined(MAJOR_IN_SYSMACROS)
11823#include <sys/sysmacros.h>
11824#else
11825#include <sys/types.h>
11826#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011827
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011828int
11829main ()
11830{
11831
11832 makedev(major(0),minor(0));
11833
11834 ;
11835 return 0;
11836}
11837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011839
11840
Matthias Kloseb9621712010-04-24 17:59:49 +000011841$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11844$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011845
11846else
Skip Montanaro6dead952003-09-25 14:50:04 +000011847
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11849$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011850
11851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852rm -f core conftest.err conftest.$ac_objext \
11853 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011854
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011855# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011856# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11858$as_echo_n "checking for getaddrinfo... " >&6; }
11859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011860/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011861
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011862#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011863#include <sys/socket.h>
11864#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011865#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011866
Martin v. Löwis11437992002-04-12 09:54:03 +000011867int
11868main ()
11869{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011870getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 ;
11872 return 0;
11873}
11874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011875if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011876 have_getaddrinfo=yes
11877else
Matthias Kloseb9621712010-04-24 17:59:49 +000011878 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011880rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext conftest.$ac_ext
11882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11883$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011884if test $have_getaddrinfo = yes
11885then
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11887$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011888 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011892
11893if test "${enable_ipv6+set}" = set; then
11894 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11895else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011896 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011897fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011898else
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011900/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011901
Stefan Krah19c21392012-11-22 23:47:32 +010011902#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011903#include <sys/types.h>
11904#include <netdb.h>
11905#include <string.h>
11906#include <sys/socket.h>
11907#include <netinet/in.h>
11908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011909int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910{
11911 int passive, gaierr, inet4 = 0, inet6 = 0;
11912 struct addrinfo hints, *ai, *aitop;
11913 char straddr[INET6_ADDRSTRLEN], strport[16];
11914
11915 for (passive = 0; passive <= 1; passive++) {
11916 memset(&hints, 0, sizeof(hints));
11917 hints.ai_family = AF_UNSPEC;
11918 hints.ai_flags = passive ? AI_PASSIVE : 0;
11919 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011920 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011921 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11922 (void)gai_strerror(gaierr);
11923 goto bad;
11924 }
11925 for (ai = aitop; ai; ai = ai->ai_next) {
11926 if (ai->ai_addr == NULL ||
11927 ai->ai_addrlen == 0 ||
11928 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11929 straddr, sizeof(straddr), strport, sizeof(strport),
11930 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11931 goto bad;
11932 }
11933 switch (ai->ai_family) {
11934 case AF_INET:
11935 if (strcmp(strport, "54321") != 0) {
11936 goto bad;
11937 }
11938 if (passive) {
11939 if (strcmp(straddr, "0.0.0.0") != 0) {
11940 goto bad;
11941 }
11942 } else {
11943 if (strcmp(straddr, "127.0.0.1") != 0) {
11944 goto bad;
11945 }
11946 }
11947 inet4++;
11948 break;
11949 case AF_INET6:
11950 if (strcmp(strport, "54321") != 0) {
11951 goto bad;
11952 }
11953 if (passive) {
11954 if (strcmp(straddr, "::") != 0) {
11955 goto bad;
11956 }
11957 } else {
11958 if (strcmp(straddr, "::1") != 0) {
11959 goto bad;
11960 }
11961 }
11962 inet6++;
11963 break;
11964 case AF_UNSPEC:
11965 goto bad;
11966 break;
11967 default:
11968 /* another family support? */
11969 break;
11970 }
11971 }
11972 }
11973
11974 if (!(inet4 == 0 || inet4 == 2))
11975 goto bad;
11976 if (!(inet6 == 0 || inet6 == 2))
11977 goto bad;
11978
11979 if (aitop)
11980 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011982
11983 bad:
11984 if (aitop)
11985 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011986 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011987}
11988
Martin v. Löwis11437992002-04-12 09:54:03 +000011989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011990if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011991 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011992else
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011999fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012000
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012002
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12004$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12005
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012006if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012007then
12008 if test $ipv6 = yes
12009 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012010 echo 'Fatal: You must get working getaddrinfo() function.'
12011 echo ' or you can specify "--disable-ipv6"'.
12012 exit 1
12013 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012014else
Martin v. Löwis11437992002-04-12 09:54:03 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012017
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012018fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012019
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012020for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012021do :
12022 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012023if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012026_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012027
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012028fi
12029done
12030
Michael W. Hudson54241132001-12-07 15:38:26 +000012031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012032# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12034$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012035if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037else
Matthias Kloseb9621712010-04-24 17:59:49 +000012038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012040#include <sys/types.h>
12041#include <sys/time.h>
12042#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Martin v. Löwis11437992002-04-12 09:54:03 +000012044int
12045main ()
12046{
12047if ((struct tm *) 0)
12048return 0;
12049 ;
12050 return 0;
12051}
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012054 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12061$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012062if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065
12066fi
12067
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12069$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012071 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075#include <sys/types.h>
12076#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012077
Martin v. Löwis11437992002-04-12 09:54:03 +000012078int
12079main ()
12080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081struct tm tm;
12082 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ;
12085 return 0;
12086}
12087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089 ac_cv_struct_tm=time.h
12090else
Matthias Kloseb9621712010-04-24 17:59:49 +000012091 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12096$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012097if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012098
Matthias Kloseb9621712010-04-24 17:59:49 +000012099$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100
12101fi
12102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103ac_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 +000012104#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106"
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
12109cat >>confdefs.h <<_ACEOF
12110#define HAVE_STRUCT_TM_TM_ZONE 1
12111_ACEOF
12112
12113
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012114fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012115
Martin v. Löwis11437992002-04-12 09:54:03 +000012116if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012119
12120else
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12122"
Victor Stinnere0be4232011-10-25 13:06:09 +020012123if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125else
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012127fi
12128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012129cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012130#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131_ACEOF
12132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12134$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137else
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012140#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141#if !HAVE_DECL_TZNAME
12142extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012144
Martin v. Löwis11437992002-04-12 09:54:03 +000012145int
12146main ()
12147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012148return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 ;
12150 return 0;
12151}
12152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012153if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154 ac_cv_var_tzname=yes
12155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012158rm -f core conftest.err conftest.$ac_objext \
12159 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12162$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012163 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012166
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012167 fi
12168fi
12169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170ac_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 +020012171if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012172
12173cat >>confdefs.h <<_ACEOF
12174#define HAVE_STRUCT_STAT_ST_RDEV 1
12175_ACEOF
12176
12177
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012178fi
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180ac_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 +020012181if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012182
Martin v. Löwis11437992002-04-12 09:54:03 +000012183cat >>confdefs.h <<_ACEOF
12184#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12185_ACEOF
12186
12187
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012188fi
12189
Matthias Kloseb9621712010-04-24 17:59:49 +000012190ac_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 +020012191if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012192
12193cat >>confdefs.h <<_ACEOF
12194#define HAVE_STRUCT_STAT_ST_FLAGS 1
12195_ACEOF
12196
12197
12198fi
12199
Matthias Kloseb9621712010-04-24 17:59:49 +000012200ac_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 +020012201if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012202
12203cat >>confdefs.h <<_ACEOF
12204#define HAVE_STRUCT_STAT_ST_GEN 1
12205_ACEOF
12206
12207
12208fi
12209
Matthias Kloseb9621712010-04-24 17:59:49 +000012210ac_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 +020012211if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012212
12213cat >>confdefs.h <<_ACEOF
12214#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12215_ACEOF
12216
12217
12218fi
12219
Matthias Kloseb9621712010-04-24 17:59:49 +000012220ac_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 +020012221if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012222
Martin v. Löwis11437992002-04-12 09:54:03 +000012223cat >>confdefs.h <<_ACEOF
12224#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12225_ACEOF
12226
12227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012229
12230else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012232 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12234 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012235esac
12236
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012237fi
12238
Michael W. Hudson54241132001-12-07 15:38:26 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Matthias Kloseb9621712010-04-24 17:59:49 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12242$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012245else
Matthias Kloseb159a552010-04-25 21:00:44 +000012246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012249#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012250int
12251main ()
12252{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 ;
12255 return 0;
12256}
12257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012258if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259 ac_cv_header_time_altzone=yes
12260else
Matthias Kloseb9621712010-04-24 17:59:49 +000012261 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265fi
12266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12268$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012269if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012270
Matthias Kloseb9621712010-04-24 17:59:49 +000012271$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272
12273fi
12274
Guido van Rossumda88dad1995-01-26 00:46:29 +000012275was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12277$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012279/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012280
12281#include <sys/types.h>
12282#include <sys/select.h>
12283#include <sys/time.h>
12284
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288;
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
12295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012298 was_it_defined=yes
12299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12303$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12306$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012307if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012308 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012311/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012312#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012313int
12314main ()
12315{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012316struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 ;
12318 return 0;
12319}
12320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012322 ac_cv_struct_addrinfo=yes
12323else
Matthias Kloseb9621712010-04-24 17:59:49 +000012324 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12327fi
12328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12330$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012331if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334
12335fi
12336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12338$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012339if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012340 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344
12345# include <sys/types.h>
12346# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012347int
12348main ()
12349{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012350struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 ;
12352 return 0;
12353}
12354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012355if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012356 ac_cv_struct_sockaddr_storage=yes
12357else
Matthias Kloseb9621712010-04-24 17:59:49 +000012358 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12361fi
12362
Matthias Kloseb9621712010-04-24 17:59:49 +000012363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12364$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012365if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012366
Matthias Kloseb9621712010-04-24 17:59:49 +000012367$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368
12369fi
12370
Guido van Rossum627b2d71993-12-24 10:39:16 +000012371# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12374$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012375if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012376 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012377else
Matthias Kloseb9621712010-04-24 17:59:49 +000012378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012380$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012381int
12382main ()
12383{
12384static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012385test_array [0] = 0;
12386return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012387
12388 ;
12389 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012390}
Martin v. Löwis11437992002-04-12 09:54:03 +000012391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012393 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012396fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12400$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012401if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403
12404fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012405
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12407$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012408if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012410else
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012412/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012417
Martin v. Löwis11437992002-04-12 09:54:03 +000012418#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012419 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012421 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012423 char const *const *pcpcc;
12424 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 /* NEC SVR4.0.2 mips cc rejects this. */
12426 struct point {int x, y;};
12427 static struct point const zero = {0,0};
12428 /* AIX XL C 1.02.0.0 rejects this.
12429 It does not let you subtract one const X* pointer from another in
12430 an arm of an if-expression whose if-part is not a constant
12431 expression */
12432 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435 ++pcpcc;
12436 ppc = (char**) pcpcc;
12437 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012438 { /* SCO 3.2v4 cc rejects this sort of thing. */
12439 char tx;
12440 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012442
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 }
12446 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12447 int x[] = {25, 17};
12448 const int *foo = &x[0];
12449 ++foo;
12450 }
12451 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12452 typedef const int *iptr;
12453 iptr p = 0;
12454 ++p;
12455 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012456 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012458 struct s { int j; const int *ap[3]; } bx;
12459 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 }
12461 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12462 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012463 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012466#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012470}
Martin v. Löwis11437992002-04-12 09:54:03 +000012471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012473 ac_cv_c_const=yes
12474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12480$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484
12485fi
12486
Michael W. Hudson54241132001-12-07 15:38:26 +000012487
Guido van Rossumda88dad1995-01-26 00:46:29 +000012488works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12490$as_echo_n "checking for working volatile... " >&6; }
12491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012492/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494int
12495main ()
12496{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 ;
12499 return 0;
12500}
12501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012503 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504else
Skip Montanaro6dead952003-09-25 14:50:04 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012508
Guido van Rossum627b2d71993-12-24 10:39:16 +000012509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12512$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012513
Guido van Rossumda88dad1995-01-26 00:46:29 +000012514works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12516$as_echo_n "checking for working signed char... " >&6; }
12517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520int
12521main ()
12522{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012529 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012530else
Skip Montanaro6dead952003-09-25 14:50:04 +000012531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012533
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012534
Guido van Rossum7f43da71994-08-01 12:15:30 +000012535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12538$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012539
Guido van Rossumda88dad1995-01-26 00:46:29 +000012540have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12542$as_echo_n "checking for prototypes... " >&6; }
12543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012545int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012546int
12547main ()
12548{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012549return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 ;
12551 return 0;
12552}
12553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012554if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
Matthias Kloseb159a552010-04-25 21:00:44 +000012558 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12562$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012563
Guido van Rossumda88dad1995-01-26 00:46:29 +000012564works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12566$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012568/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012569
12570#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012571int foo(int x, ...) {
12572 va_list va;
12573 va_start(va, x);
12574 va_arg(va, int);
12575 va_arg(va, char *);
12576 va_arg(va, double);
12577 return 0;
12578}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012579
Martin v. Löwis11437992002-04-12 09:54:03 +000012580int
12581main ()
12582{
Guido van Rossum90eea071996-08-30 20:58:57 +000012583return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 ;
12585 return 0;
12586}
12587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012589
12590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012593 works=yes
12594
Guido van Rossum627b2d71993-12-24 10:39:16 +000012595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12598$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599
Martin v. Löwisd6320502004-08-12 13:45:08 +000012600# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12602$as_echo_n "checking for socketpair... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012604/* end confdefs.h. */
12605
12606#include <sys/types.h>
12607#include <sys/socket.h>
12608
12609int
12610main ()
12611{
12612void *x=socketpair
12613 ;
12614 return 0;
12615}
12616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012618
Matthias Kloseb9621712010-04-24 17:59:49 +000012619$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012620
Matthias Kloseb159a552010-04-25 21:00:44 +000012621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012622$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012623else
Matthias Kloseb9621712010-04-24 17:59:49 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12625$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012626
12627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012629
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12632$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012635#include <sys/types.h>
12636#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012637int
12638main ()
12639{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640struct sockaddr x;
12641x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012642 ;
12643 return 0;
12644}
12645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012646if ac_fn_c_try_compile "$LINENO"; then :
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12648$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Matthias Kloseb9621712010-04-24 17:59:49 +000012650$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012651
12652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12654$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012655
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658
Guido van Rossumda88dad1995-01-26 00:46:29 +000012659va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12661$as_echo_n "checking whether va_list is an array... " >&6; }
12662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012663/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012664
12665#ifdef HAVE_STDARG_PROTOTYPES
12666#include <stdarg.h>
12667#else
12668#include <varargs.h>
12669#endif
12670
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012674va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679if ac_fn_c_try_compile "$LINENO"; then :
12680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012681else
Skip Montanaro6dead952003-09-25 14:50:04 +000012682
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Guido van Rossumda88dad1995-01-26 00:46:29 +000012686 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12691$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012693# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
12695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012697if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012700
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12702$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012703 OLD_CFLAGS=$CFLAGS
12704 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012707
12708# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Martin v. Löwis11437992002-04-12 09:54:03 +000012710int
12711main ()
12712{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012713
12714 char *name;
12715 struct hostent *he, *res;
12716 char buffer[2048];
12717 int buflen = 2048;
12718 int h_errnop;
12719
12720 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
12722 ;
12723 return 0;
12724}
12725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012729
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12734$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012735
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012736else
Skip Montanaro6dead952003-09-25 14:50:04 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12739$as_echo "no" >&6; }
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12741$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012743/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Martin v. Löwis11437992002-04-12 09:54:03 +000012747int
12748main ()
12749{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750
12751 char *name;
12752 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012753 char buffer[2048];
12754 int buflen = 2048;
12755 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012756
Matthias Kloseb159a552010-04-25 21:00:44 +000012757 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012758
12759 ;
12760 return 0;
12761}
12762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Matthias Kloseb159a552010-04-25 21:00:44 +000012768$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12771$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773else
Skip Montanaro6dead952003-09-25 14:50:04 +000012774
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12776$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12778$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12780/* end confdefs.h. */
12781
12782# include <netdb.h>
12783
12784int
12785main ()
12786{
12787
12788 char *name;
12789 struct hostent *he;
12790 struct hostent_data data;
12791
12792 (void) gethostbyname_r(name, he, &data);
12793
12794 ;
12795 return 0;
12796}
12797_ACEOF
12798if ac_fn_c_try_compile "$LINENO"; then :
12799
12800 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12801
12802
12803$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12804
12805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12806$as_echo "yes" >&6; }
12807
12808else
12809
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12811$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821 CFLAGS=$OLD_CFLAGS
12822
12823else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012824
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 for ac_func in gethostbyname
12826do :
12827 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012828if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012830#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012832
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012833fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012834done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012835
Michael W. Hudson54241132001-12-07 15:38:26 +000012836
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012837fi
12838
Michael W. Hudson54241132001-12-07 15:38:26 +000012839
12840
12841
12842
12843
12844
Guido van Rossum627b2d71993-12-24 10:39:16 +000012845# checks for system services
12846# (none yet)
12847
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012848# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012849ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012850if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012851
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012852else
Matthias Kloseb9621712010-04-24 17:59:49 +000012853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12854$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012855if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857else
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012859LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012863/* Override any GCC internal prototype to avoid an error.
12864 Use char because int might match the return type of a GCC
12865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866#ifdef __cplusplus
12867extern "C"
12868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012869char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
12871main ()
12872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012873return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012874 ;
12875 return 0;
12876}
12877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883rm -f core conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012885LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12888$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012889if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012890 cat >>confdefs.h <<_ACEOF
12891#define HAVE_LIBIEEE 1
12892_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012893
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012894 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012895
Guido van Rossum627b2d71993-12-24 10:39:16 +000012896fi
12897
Michael W. Hudson54241132001-12-07 15:38:26 +000012898
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012899fi
12900
Michael W. Hudson54241132001-12-07 15:38:26 +000012901
Guido van Rossum7f253911997-05-09 02:42:48 +000012902# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12904$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012907if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012908 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012909if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012910then
12911
Matthias Kloseb9621712010-04-24 17:59:49 +000012912$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012913
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12915$as_echo "yes" >&6; }
12916else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12917$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012918fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012919else
Matthias Kloseb9621712010-04-24 17:59:49 +000012920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12921$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922fi
12923
Guido van Rossum7f253911997-05-09 02:42:48 +000012924
Guido van Rossum7f43da71994-08-01 12:15:30 +000012925# check for --with-libm=...
12926
Guido van Rossum563e7081996-09-10 18:20:48 +000012927case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012928Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012929*) LIBM=-lm
12930esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12932$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012934# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012935if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012937if test "$withval" = no
12938then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12940$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012941elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012942then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12944$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012945else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012946fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012947else
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12949$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950fi
12951
Guido van Rossum7f43da71994-08-01 12:15:30 +000012952
12953# check for --with-libc=...
12954
Matthias Kloseb9621712010-04-24 17:59:49 +000012955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12956$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012959if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012960 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012961if test "$withval" = no
12962then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12964$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012965elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012966then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12968$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012969else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012970fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012971else
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12973$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974fi
12975
Guido van Rossum7f43da71994-08-01 12:15:30 +000012976
Stefan Krah1919b7e2012-03-21 18:25:23 +010012977# **************************************
12978# * Check for gcc x64 inline assembler *
12979# **************************************
12980
12981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12982$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984/* end confdefs.h. */
12985
12986int
12987main ()
12988{
12989
12990 __asm__ __volatile__ ("movq %rcx, %rax");
12991
12992 ;
12993 return 0;
12994}
12995_ACEOF
12996if ac_fn_c_try_compile "$LINENO"; then :
12997 have_gcc_asm_for_x64=yes
12998else
12999 have_gcc_asm_for_x64=no
13000fi
13001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13003$as_echo "$have_gcc_asm_for_x64" >&6; }
13004if test "$have_gcc_asm_for_x64" = yes
13005then
13006
13007$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13008
13009fi
13010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013011# **************************************************
13012# * Check for various properties of floating point *
13013# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13016$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013017if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013018 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013019else
13020
Matthias Kloseb9621712010-04-24 17:59:49 +000013021if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013022 ac_cv_little_endian_double=no
13023else
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013025/* end confdefs.h. */
13026
13027#include <string.h>
13028int main() {
13029 double x = 9006104071832581.0;
13030 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13031 return 0;
13032 else
13033 return 1;
13034}
13035
13036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013037if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013038 ac_cv_little_endian_double=yes
13039else
Matthias Kloseb9621712010-04-24 17:59:49 +000013040 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013044fi
13045
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013046fi
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13049$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013050if test "$ac_cv_little_endian_double" = yes
13051then
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013054
13055fi
13056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13058$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013059if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013061else
13062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013064 ac_cv_big_endian_double=no
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013067/* end confdefs.h. */
13068
13069#include <string.h>
13070int main() {
13071 double x = 9006104071832581.0;
13072 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13073 return 0;
13074 else
13075 return 1;
13076}
13077
13078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013079if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013080 ac_cv_big_endian_double=yes
13081else
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13085 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013086fi
13087
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013088fi
13089
Matthias Kloseb9621712010-04-24 17:59:49 +000013090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13091$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013092if test "$ac_cv_big_endian_double" = yes
13093then
13094
Matthias Kloseb9621712010-04-24 17:59:49 +000013095$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013096
13097fi
13098
13099# Some ARM platforms use a mixed-endian representation for doubles.
13100# While Python doesn't currently have full support for these platforms
13101# (see e.g., issue 1762561), we can at least make sure that float <-> string
13102# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13104$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013105if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013106 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013107else
13108
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013110 ac_cv_mixed_endian_double=no
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013113/* end confdefs.h. */
13114
13115#include <string.h>
13116int main() {
13117 double x = 9006104071832581.0;
13118 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13119 return 0;
13120 else
13121 return 1;
13122}
13123
13124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013125if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013126 ac_cv_mixed_endian_double=yes
13127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13131 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013132fi
13133
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013134fi
13135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13137$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013138if test "$ac_cv_mixed_endian_double" = yes
13139then
13140
Matthias Kloseb9621712010-04-24 17:59:49 +000013141$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013142
13143fi
13144
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013145# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013146# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013147# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013148# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013149# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013150# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013151
13152# This inline assembler syntax may also work for suncc and icc,
13153# so we try it on all platforms.
13154
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13156$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013158/* end confdefs.h. */
13159
13160int
13161main ()
13162{
13163
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013164 unsigned short cw;
13165 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13166 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013167
13168 ;
13169 return 0;
13170}
13171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013172if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173 have_gcc_asm_for_x87=yes
13174else
Matthias Kloseb9621712010-04-24 17:59:49 +000013175 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013176fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13179$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013180if test "$have_gcc_asm_for_x87" = yes
13181then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013182
Matthias Kloseb9621712010-04-24 17:59:49 +000013183$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013184
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013185fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013186
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013187# Detect whether system arithmetic is subject to x87-style double
13188# rounding issues. The result of this test has little meaning on non
13189# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13190# mode is round-to-nearest and double rounding issues are present, and
13191# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13193$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013194# $BASECFLAGS may affect the result
13195ac_save_cc="$CC"
13196CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013198 ac_cv_x87_double_rounding=no
13199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013201/* end confdefs.h. */
13202
13203#include <stdlib.h>
13204#include <math.h>
13205int main() {
13206 volatile double x, y, z;
13207 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13208 x = 0.99999999999999989; /* 1-2**-53 */
13209 y = 1./x;
13210 if (y != 1.)
13211 exit(0);
13212 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13213 x = 1e16;
13214 y = 2.99999;
13215 z = x + y;
13216 if (z != 1e16+4.)
13217 exit(0);
13218 /* both tests show evidence of double rounding */
13219 exit(1);
13220}
13221
13222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013223if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013224 ac_cv_x87_double_rounding=no
13225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013230fi
13231
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013232CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13234$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013235if test "$ac_cv_x87_double_rounding" = yes
13236then
13237
Matthias Kloseb9621712010-04-24 17:59:49 +000013238$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013239
13240fi
13241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013242# ************************************
13243# * Check for mathematical functions *
13244# ************************************
13245
13246LIBS_SAVE=$LIBS
13247LIBS="$LIBS $LIBM"
13248
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013249for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13250do :
13251 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13252ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013253if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013254 cat >>confdefs.h <<_ACEOF
13255#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13256_ACEOF
13257
13258fi
13259done
13260
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013261for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013262do :
13263 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13264ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013265if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013266 cat >>confdefs.h <<_ACEOF
13267#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13268_ACEOF
13269
13270fi
13271done
13272
13273ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13274"
Victor Stinnere0be4232011-10-25 13:06:09 +020013275if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013276 ac_have_decl=1
13277else
13278 ac_have_decl=0
13279fi
13280
13281cat >>confdefs.h <<_ACEOF
13282#define HAVE_DECL_ISINF $ac_have_decl
13283_ACEOF
13284ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13285"
Victor Stinnere0be4232011-10-25 13:06:09 +020013286if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013287 ac_have_decl=1
13288else
13289 ac_have_decl=0
13290fi
13291
13292cat >>confdefs.h <<_ACEOF
13293#define HAVE_DECL_ISNAN $ac_have_decl
13294_ACEOF
13295ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13296"
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013298 ac_have_decl=1
13299else
13300 ac_have_decl=0
13301fi
13302
13303cat >>confdefs.h <<_ACEOF
13304#define HAVE_DECL_ISFINITE $ac_have_decl
13305_ACEOF
13306
13307
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013308# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13309# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13311$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013312if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013314else
13315
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013317 ac_cv_tanh_preserves_zero_sign=no
13318else
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013320/* end confdefs.h. */
13321
13322#include <math.h>
13323#include <stdlib.h>
13324int main() {
13325 /* return 0 if either negative zeros don't exist
13326 on this platform or if negative zeros exist
13327 and tanh(-0.) == -0. */
13328 if (atan2(0., -1.) == atan2(-0., -1.) ||
13329 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13330 else exit(1);
13331}
13332
13333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013335 ac_cv_tanh_preserves_zero_sign=yes
13336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013339rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13340 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013341fi
13342
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013343fi
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13346$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013347if test "$ac_cv_tanh_preserves_zero_sign" = yes
13348then
13349
Matthias Kloseb9621712010-04-24 17:59:49 +000013350$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013351
13352fi
13353
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013354if test "$ac_cv_func_log1p" = yes
13355then
13356 # On some versions of AIX, log1p(-0.) returns 0. instead of
13357 # -0. See issue #9920.
13358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13359$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013360 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013361 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013362else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013363
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013364 if test "$cross_compiling" = yes; then :
13365 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013366else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13368/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013369
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013370 #include <math.h>
13371 #include <stdlib.h>
13372 int main() {
13373 /* Fail if the signs of log1p(-0.) and -0. can be
13374 distinguished. */
13375 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13376 return 0;
13377 else
13378 return 1;
13379 }
13380
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013381_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013382if ac_fn_c_try_run "$LINENO"; then :
13383 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013384else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013385 ac_cv_log1p_drops_zero_sign=yes
13386fi
13387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13388 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013389fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013390
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013391fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013392
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13394$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13395fi
13396if test "$ac_cv_log1p_drops_zero_sign" = yes
13397then
13398
13399$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13400
13401fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013402
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013403LIBS=$LIBS_SAVE
13404
Mark Dickinsona614f042009-11-28 12:48:43 +000013405# For multiprocessing module, check that sem_open
13406# actually works. For FreeBSD versions <= 7.2,
13407# the kernel module that provides POSIX semaphores
13408# isn't loaded by default, so an attempt to call
13409# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13411$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013412if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013414else
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013416 ac_cv_posix_semaphores_enabled=yes
13417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013419/* end confdefs.h. */
13420
13421#include <unistd.h>
13422#include <fcntl.h>
13423#include <stdio.h>
13424#include <semaphore.h>
13425#include <sys/stat.h>
13426
13427int main(void) {
13428 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13429 if (a == SEM_FAILED) {
13430 perror("sem_open");
13431 return 1;
13432 }
13433 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013434 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013435 return 0;
13436}
13437
13438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013439if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013440 ac_cv_posix_semaphores_enabled=yes
13441else
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013446fi
13447
13448
Mark Dickinsona614f042009-11-28 12:48:43 +000013449fi
13450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13452$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013453if test $ac_cv_posix_semaphores_enabled = no
13454then
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013457
13458fi
13459
Mark Dickinson10683072009-04-18 21:18:19 +000013460# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13462$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013463if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013464 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465else
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013467 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013470/* end confdefs.h. */
13471
13472#include <unistd.h>
13473#include <fcntl.h>
13474#include <stdio.h>
13475#include <semaphore.h>
13476#include <sys/stat.h>
13477
13478int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013479 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013480 int count;
13481 int res;
13482 if(a==SEM_FAILED){
13483 perror("sem_open");
13484 return 1;
13485
13486 }
13487 res = sem_getvalue(a, &count);
13488 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013489 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013490 return res==-1 ? 1 : 0;
13491}
13492
Mark Dickinson10683072009-04-18 21:18:19 +000013493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013501fi
13502
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013504fi
13505
Matthias Kloseb9621712010-04-24 17:59:49 +000013506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13507$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013508if test $ac_cv_broken_sem_getvalue = yes
13509then
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013512
13513fi
13514
Mark Dickinsonbd792642009-03-18 20:06:12 +000013515# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13517$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013518# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013519if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013520 enableval=$enable_big_digits; case $enable_big_digits in
13521yes)
13522 enable_big_digits=30 ;;
13523no)
13524 enable_big_digits=15 ;;
1352515|30)
13526 ;;
13527*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013528 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 +000013529esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13531$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013532
13533cat >>confdefs.h <<_ACEOF
13534#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13535_ACEOF
13536
13537
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13540$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013541fi
13542
13543
Guido van Rossumef2255b2000-03-10 22:30:29 +000013544# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013545ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
13548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013551 wchar_h="yes"
13552
Guido van Rossumef2255b2000-03-10 22:30:29 +000013553else
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013555
13556fi
13557
Michael W. Hudson54241132001-12-07 15:38:26 +000013558
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013560# determine wchar_t size
13561if test "$wchar_h" = yes
13562then
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13565# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13566# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13568$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013569if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013570 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13573"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
Martin v. Löwis11437992002-04-12 09:54:03 +000013575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 if test "$ac_cv_type_wchar_t" = yes; then
13577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013579as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013580See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013581 else
13582 ac_cv_sizeof_wchar_t=0
13583 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013585
Martin v. Löwis11437992002-04-12 09:54:03 +000013586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13588$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589
13590
13591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013593#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013594_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595
Michael W. Hudson54241132001-12-07 15:38:26 +000013596
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013597fi
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13600$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013601have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013603/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013604
13605#include <tcl.h>
13606#if TCL_UTF_MAX != 6
13607# error "NOT UCS4_TCL"
13608#endif
13609int
13610main ()
13611{
13612
13613 ;
13614 return 0;
13615}
13616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013618
13619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013621
13622 have_ucs4_tcl=yes
13623
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13627$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013628
Skip Montanaro6dead952003-09-25 14:50:04 +000013629# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013630if test "$wchar_h" = yes
13631then
13632 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13634$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013635 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013637else
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013640 ac_cv_wchar_t_signed=yes
13641else
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013643/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013644
13645 #include <wchar.h>
13646 int main()
13647 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013648 /* Success: exit code 0 */
13649 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013650 }
13651
13652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013654 ac_cv_wchar_t_signed=yes
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013660fi
13661
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013662fi
13663
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13665$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666fi
13667
Georg Brandl52d168a2008-01-07 18:10:24 +000013668# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013669if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013670 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013671then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013672 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Georg Brandl52d168a2008-01-07 18:10:24 +000013676else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013677 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013678fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13680$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013681
13682# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13684$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013685if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013687else
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 ac_cv_c_bigendian=unknown
13689 # See if we're dealing with a universal compiler.
13690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13691/* end confdefs.h. */
13692#ifndef __APPLE_CC__
13693 not a universal capable compiler
13694 #endif
13695 typedef int dummy;
13696
Skip Montanaro6dead952003-09-25 14:50:04 +000013697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013698if ac_fn_c_try_compile "$LINENO"; then :
13699
13700 # Check for potential -arch flags. It is not universal unless
13701 # there are at least two -arch flags with different values.
13702 ac_arch=
13703 ac_prev=
13704 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13705 if test -n "$ac_prev"; then
13706 case $ac_word in
13707 i?86 | x86_64 | ppc | ppc64)
13708 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13709 ac_arch=$ac_word
13710 else
13711 ac_cv_c_bigendian=universal
13712 break
13713 fi
13714 ;;
13715 esac
13716 ac_prev=
13717 elif test "x$ac_word" = "x-arch"; then
13718 ac_prev=arch
13719 fi
13720 done
13721fi
13722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723 if test $ac_cv_c_bigendian = unknown; then
13724 # See if sys/param.h defines the BYTE_ORDER macro.
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013726/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013727#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013729
Martin v. Löwis11437992002-04-12 09:54:03 +000013730int
13731main ()
13732{
Matthias Kloseb9621712010-04-24 17:59:49 +000013733#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13734 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13735 && LITTLE_ENDIAN)
13736 bogus endian macros
13737 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
13739 ;
13740 return 0;
13741}
13742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013744 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013747#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013749
Martin v. Löwis11437992002-04-12 09:54:03 +000013750int
13751main ()
13752{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013753#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 not big endian
13755 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
13757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013762 ac_cv_c_bigendian=yes
13763else
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013767fi
13768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13769 fi
13770 if test $ac_cv_c_bigendian = unknown; then
13771 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013773/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013774#include <limits.h>
13775
Martin v. Löwis11437992002-04-12 09:54:03 +000013776int
13777main ()
13778{
Matthias Kloseb9621712010-04-24 17:59:49 +000013779#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13780 bogus endian macros
13781 #endif
13782
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
13785}
13786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
13788 # It does; now see whether it defined to _BIG_ENDIAN or not.
13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13790/* end confdefs.h. */
13791#include <limits.h>
13792
13793int
13794main ()
13795{
13796#ifndef _BIG_ENDIAN
13797 not big endian
13798 #endif
13799
13800 ;
13801 return 0;
13802}
13803_ACEOF
13804if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13810fi
13811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13812 fi
13813 if test $ac_cv_c_bigendian = unknown; then
13814 # Compile a test program.
13815 if test "$cross_compiling" = yes; then :
13816 # Try to guess by grepping values from an object file.
13817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13818/* end confdefs.h. */
13819short int ascii_mm[] =
13820 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13821 short int ascii_ii[] =
13822 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13823 int use_ascii (int i) {
13824 return ascii_mm[i] + ascii_ii[i];
13825 }
13826 short int ebcdic_ii[] =
13827 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13828 short int ebcdic_mm[] =
13829 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13830 int use_ebcdic (int i) {
13831 return ebcdic_mm[i] + ebcdic_ii[i];
13832 }
13833 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834
Matthias Kloseb9621712010-04-24 17:59:49 +000013835int
13836main ()
13837{
13838return use_ascii (foo) == use_ebcdic (foo);
13839 ;
13840 return 0;
13841}
13842_ACEOF
13843if ac_fn_c_try_compile "$LINENO"; then :
13844 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13845 ac_cv_c_bigendian=yes
13846 fi
13847 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13848 if test "$ac_cv_c_bigendian" = unknown; then
13849 ac_cv_c_bigendian=no
13850 else
13851 # finding both strings is unlikely to happen, but who knows?
13852 ac_cv_c_bigendian=unknown
13853 fi
13854 fi
13855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013857else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013859/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013860$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013861int
13862main ()
13863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865 /* Are we little or big endian? From Harbison&Steele. */
13866 union
13867 {
13868 long int l;
13869 char c[sizeof (long int)];
13870 } u;
13871 u.l = 1;
13872 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873
13874 ;
13875 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013876}
Martin v. Löwis11437992002-04-12 09:54:03 +000013877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013878if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013879 ac_cv_c_bigendian=no
13880else
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13890$as_echo "$ac_cv_c_bigendian" >&6; }
13891 case $ac_cv_c_bigendian in #(
13892 yes)
13893 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13894;; #(
13895 no)
13896 ;; #(
13897 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013900
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 ;; #(
13902 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013903 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013904 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013906
Michael W. Hudson54241132001-12-07 15:38:26 +000013907
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013908# ABI version string for Python extension modules. This appears between the
13909# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13910# from the following attributes which affect the ABI of this Python build (in
13911# this order):
13912#
13913# * The Python implementation (always 'cpython-' for us)
13914# * The major and minor version numbers
13915# * --with-pydebug (adds a 'd')
13916# * --with-pymalloc (adds a 'm')
13917# * --with-wide-unicode (adds a 'u')
13918#
13919# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013920# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13921# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013922
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13924$as_echo_n "checking ABIFLAGS... " >&6; }
13925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13926$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13928$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013929SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13931$as_echo "$SOABI" >&6; }
13932
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013933
13934case $ac_sys_system in
13935 Linux*|GNU*)
13936 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13937 *)
13938 EXT_SUFFIX=${SHLIB_SUFFIX};;
13939esac
13940
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13942$as_echo_n "checking LDVERSION... " >&6; }
13943LDVERSION='$(VERSION)$(ABIFLAGS)'
13944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13945$as_echo "$LDVERSION" >&6; }
13946
doko@python.org87421192013-01-26 11:39:31 +010013947
13948LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13949
13950
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013951# Check whether right shifting a negative integer extends the sign bit
13952# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13954$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013955if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013957else
Martin v. Löwis11437992002-04-12 09:54:03 +000013958
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013960 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013961else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013963/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013964
13965int main()
13966{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013967 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013968}
13969
Martin v. Löwis11437992002-04-12 09:54:03 +000013970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013971if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013972 ac_cv_rshift_extends_sign=yes
13973else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013978fi
13979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980fi
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13983$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013984if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013985then
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013988
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013989fi
13990
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013991# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13993$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013995 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013996else
Martin v. Löwis11437992002-04-12 09:54:03 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014000#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014001int
14002main ()
14003{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014004
14005 FILE *f = fopen("/dev/null", "r");
14006 flockfile(f);
14007 getc_unlocked(f);
14008 funlockfile(f);
14009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010 ;
14011 return 0;
14012}
14013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014014if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014015 ac_cv_have_getc_unlocked=yes
14016else
Matthias Kloseb9621712010-04-24 17:59:49 +000014017 ac_cv_have_getc_unlocked=no
14018fi
14019rm -f core conftest.err conftest.$ac_objext \
14020 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022
Matthias Kloseb9621712010-04-24 17:59:49 +000014023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14024$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014025if test "$ac_cv_have_getc_unlocked" = yes
14026then
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Matthias Kloseb9621712010-04-24 17:59:49 +000014028$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014029
14030fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014031
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014032# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014033# save the value of LIBS so we don't actually link Python with readline
14034LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014035
Gregory P. Smith18820942008-09-07 06:24:49 +000014036# On some systems we need to link readline to a termcap compatible
14037# library. NOTE: Keep the precedence of listed libraries synchronised
14038# with setup.py.
14039py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14041$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014042for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014043 if test -z "$py_libtermcap"; then
14044 READLINE_LIBS="-lreadline"
14045 else
14046 READLINE_LIBS="-lreadline -l$py_libtermcap"
14047 fi
14048 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014050/* end confdefs.h. */
14051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014052/* Override any GCC internal prototype to avoid an error.
14053 Use char because int might match the return type of a GCC
14054 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014055#ifdef __cplusplus
14056extern "C"
14057#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014058char readline ();
14059int
14060main ()
14061{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014063 ;
14064 return 0;
14065}
14066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014067if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014068 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014070rm -f core conftest.err conftest.$ac_objext \
14071 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014072 if test $py_cv_lib_readline = yes; then
14073 break
14074 fi
14075done
14076# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14077#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014078if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14080$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014081else
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14083$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014084
Matthias Kloseb9621712010-04-24 17:59:49 +000014085$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014086
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014087fi
14088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14091$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014092if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014093 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014094else
14095 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014096LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014098/* end confdefs.h. */
14099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014100/* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103#ifdef __cplusplus
14104extern "C"
14105#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106char rl_callback_handler_install ();
14107int
14108main ()
14109{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014111 ;
14112 return 0;
14113}
14114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014115if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014116 ac_cv_lib_readline_rl_callback_handler_install=yes
14117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014120rm -f core conftest.err conftest.$ac_objext \
14121 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014122LIBS=$ac_check_lib_save_LIBS
14123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14125$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014126if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014127
Matthias Kloseb9621712010-04-24 17:59:49 +000014128$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014129
14130fi
14131
14132
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014133# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014135/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014136#include <readline/readline.h>
14137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014138if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014139 have_readline=yes
14140else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014141 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014142
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014143fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014144rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014145if test $have_readline = yes
14146then
Matthias Kloseb9621712010-04-24 17:59:49 +000014147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014148/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014149#include <readline/readline.h>
14150
14151_ACEOF
14152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014153 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014154
Matthias Kloseb9621712010-04-24 17:59:49 +000014155$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014156
14157fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014158rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014161/* end confdefs.h. */
14162#include <readline/readline.h>
14163
14164_ACEOF
14165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014166 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014167
Matthias Kloseb9621712010-04-24 17:59:49 +000014168$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014169
14170fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014171rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014172
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014173fi
14174
Martin v. Löwis0daad592001-09-30 21:09:59 +000014175# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14177$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014178if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014180else
Martin v. Löwis11437992002-04-12 09:54:03 +000014181 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014182LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186/* Override any GCC internal prototype to avoid an error.
14187 Use char because int might match the return type of a GCC
14188 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014189#ifdef __cplusplus
14190extern "C"
14191#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014192char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014193int
14194main ()
14195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014197 ;
14198 return 0;
14199}
14200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014202 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014203else
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014206rm -f core conftest.err conftest.$ac_objext \
14207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014208LIBS=$ac_check_lib_save_LIBS
14209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14211$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014212if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014215
Martin v. Löwis0daad592001-09-30 21:09:59 +000014216fi
14217
Michael W. Hudson54241132001-12-07 15:38:26 +000014218
Thomas Wouters89d996e2007-09-08 17:39:28 +000014219# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14221$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014222if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014223 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014224else
14225 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014226LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014228/* end confdefs.h. */
14229
14230/* Override any GCC internal prototype to avoid an error.
14231 Use char because int might match the return type of a GCC
14232 builtin and then its argument prototype would still apply. */
14233#ifdef __cplusplus
14234extern "C"
14235#endif
14236char rl_completion_display_matches_hook ();
14237int
14238main ()
14239{
14240return rl_completion_display_matches_hook ();
14241 ;
14242 return 0;
14243}
14244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014245if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014246 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014250rm -f core conftest.err conftest.$ac_objext \
14251 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014252LIBS=$ac_check_lib_save_LIBS
14253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14255$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014256if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014257
Matthias Kloseb9621712010-04-24 17:59:49 +000014258$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014259
14260fi
14261
14262
Martin v. Löwis0daad592001-09-30 21:09:59 +000014263# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14265$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014266if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014268else
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014270LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014272/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014274/* Override any GCC internal prototype to avoid an error.
14275 Use char because int might match the return type of a GCC
14276 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014277#ifdef __cplusplus
14278extern "C"
14279#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014280char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014281int
14282main ()
14283{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 ;
14286 return 0;
14287}
14288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014289if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014290 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014294rm -f core conftest.err conftest.$ac_objext \
14295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014296LIBS=$ac_check_lib_save_LIBS
14297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14299$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014300if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014301
Matthias Kloseb9621712010-04-24 17:59:49 +000014302$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014303
Guido van Rossum353ae582001-07-10 16:45:32 +000014304fi
14305
Jack Jansendd19cf82001-12-06 22:36:17 +000014306
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014307# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014309/* end confdefs.h. */
14310#include <readline/readline.h>
14311_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014312if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014313 have_readline=yes
14314else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014315 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014316
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014317fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014318rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014319if test $have_readline = yes
14320then
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014322/* end confdefs.h. */
14323#include <readline/readline.h>
14324
14325_ACEOF
14326if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014328
Matthias Kloseb9621712010-04-24 17:59:49 +000014329$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014330
14331fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014332rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014333
14334fi
14335
Martin v. Löwis82bca632006-02-10 20:49:30 +000014336# End of readline checks: restore LIBS
14337LIBS=$LIBS_no_readline
14338
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14340$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014341if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014343else
Martin v. Löwis11437992002-04-12 09:54:03 +000014344
Matthias Kloseb9621712010-04-24 17:59:49 +000014345if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014346 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014347else
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014349/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014350
14351int main()
14352{
14353 int val1 = nice(1);
14354 if (val1 != -1 && val1 == nice(2))
14355 exit(0);
14356 exit(1);
14357}
14358
Martin v. Löwis11437992002-04-12 09:54:03 +000014359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014361 ac_cv_broken_nice=yes
14362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014367fi
14368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14372$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014373if test "$ac_cv_broken_nice" = yes
14374then
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014377
14378fi
14379
Matthias Kloseb9621712010-04-24 17:59:49 +000014380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14381$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014382if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014384else
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014386 ac_cv_broken_poll=no
14387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014389/* end confdefs.h. */
14390
14391#include <poll.h>
14392
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014393int main()
14394{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014395 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014396 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014397
14398 close (42);
14399
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014400 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014401 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014402 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014403 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014404 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014405 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014406 return 1;
14407}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014408
14409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014410if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014411 ac_cv_broken_poll=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14416 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014417fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014418
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014419fi
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14422$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014423if test "$ac_cv_broken_poll" = yes
14424then
14425
Matthias Kloseb9621712010-04-24 17:59:49 +000014426$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014427
14428fi
14429
Brett Cannon43802422005-02-10 20:48:03 +000014430# 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 +000014431# (which is not required by ISO C or UNIX spec) and/or if we support
14432# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014433ac_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 +000014434#include <$ac_cv_struct_tm>
14435
Matthias Kloseb9621712010-04-24 17:59:49 +000014436"
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014438
14439cat >>confdefs.h <<_ACEOF
14440#define HAVE_STRUCT_TM_TM_ZONE 1
14441_ACEOF
14442
14443
14444fi
14445
14446if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014449
14450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14452"
Victor Stinnere0be4232011-10-25 13:06:09 +020014453if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455else
Matthias Kloseb9621712010-04-24 17:59:49 +000014456 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014457fi
14458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014460#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461_ACEOF
14462
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14464$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014465if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014469/* end confdefs.h. */
14470#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471#if !HAVE_DECL_TZNAME
14472extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014473#endif
14474
14475int
14476main ()
14477{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014479 ;
14480 return 0;
14481}
14482_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014483if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014484 ac_cv_var_tzname=yes
14485else
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014487fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014488rm -f core conftest.err conftest.$ac_objext \
14489 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14492$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014493 if test $ac_cv_var_tzname = yes; then
14494
Matthias Kloseb9621712010-04-24 17:59:49 +000014495$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014496
14497 fi
14498fi
14499
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014500
Martin v. Löwis1d459062005-03-14 21:23:33 +000014501# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14503$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014504if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014506else
14507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014509 ac_cv_working_tzset=no
14510else
Matthias Kloseb9621712010-04-24 17:59:49 +000014511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014512/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014513
14514#include <stdlib.h>
14515#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014516#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014517
14518#if HAVE_TZNAME
14519extern char *tzname[];
14520#endif
14521
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014522int main()
14523{
Brett Cannon18367812003-09-19 00:59:16 +000014524 /* Note that we need to ensure that not only does tzset(3)
14525 do 'something' with localtime, but it works as documented
14526 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014527 This includes making sure that tzname is set properly if
14528 tm->tm_zone does not exist since it is the alternative way
14529 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014530
14531 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014532 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014533 */
14534
Martin v. Löwis1d459062005-03-14 21:23:33 +000014535 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014536 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14537
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014538 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014539 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014540 if (localtime(&groundhogday)->tm_hour != 0)
14541 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014542#if HAVE_TZNAME
14543 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14544 if (strcmp(tzname[0], "UTC") ||
14545 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14546 exit(1);
14547#endif
Brett Cannon18367812003-09-19 00:59:16 +000014548
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014549 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014550 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014551 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014552 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014553#if HAVE_TZNAME
14554 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14555 exit(1);
14556#endif
Brett Cannon18367812003-09-19 00:59:16 +000014557
14558 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14559 tzset();
14560 if (localtime(&groundhogday)->tm_hour != 11)
14561 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014562#if HAVE_TZNAME
14563 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14564 exit(1);
14565#endif
14566
14567#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014568 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14569 exit(1);
14570 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14571 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014572#endif
Brett Cannon18367812003-09-19 00:59:16 +000014573
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014574 exit(0);
14575}
14576
14577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014578if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014579 ac_cv_working_tzset=yes
14580else
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014583rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14584 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014585fi
14586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014587fi
14588
Matthias Kloseb9621712010-04-24 17:59:49 +000014589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14590$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014591if test "$ac_cv_working_tzset" = yes
14592then
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014595
14596fi
14597
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014598# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14600$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014601if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014605/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014606#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014607int
14608main ()
14609{
14610
14611struct stat st;
14612st.st_mtim.tv_nsec = 1;
14613
14614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014619 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014620else
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14624fi
14625
Matthias Kloseb9621712010-04-24 17:59:49 +000014626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14627$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014628if test "$ac_cv_stat_tv_nsec" = yes
14629then
14630
Matthias Kloseb9621712010-04-24 17:59:49 +000014631$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014632
14633fi
14634
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014635# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14637$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014638if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014640else
Matthias Kloseb9621712010-04-24 17:59:49 +000014641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014642/* end confdefs.h. */
14643#include <sys/stat.h>
14644int
14645main ()
14646{
14647
14648struct stat st;
14649st.st_mtimespec.tv_nsec = 1;
14650
14651 ;
14652 return 0;
14653}
14654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014656 ac_cv_stat_tv_nsec2=yes
14657else
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14661fi
14662
Matthias Kloseb9621712010-04-24 17:59:49 +000014663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14664$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014665if test "$ac_cv_stat_tv_nsec2" = yes
14666then
14667
Matthias Kloseb9621712010-04-24 17:59:49 +000014668$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014669
14670fi
14671
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014672# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014673ac_save_cppflags="$CPPFLAGS"
14674CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014675
14676for ac_header in curses.h ncurses.h
14677do :
14678 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14679ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14680if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14681 cat >>confdefs.h <<_ACEOF
14682#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14683_ACEOF
14684
14685fi
14686
14687done
14688
14689
14690# On Solaris, term.h requires curses.h
14691for ac_header in term.h
14692do :
14693 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14694#ifdef HAVE_CURSES_H
14695#include <curses.h>
14696#endif
14697
14698"
14699if test "x$ac_cv_header_term_h" = xyes; then :
14700 cat >>confdefs.h <<_ACEOF
14701#define HAVE_TERM_H 1
14702_ACEOF
14703
14704fi
14705
14706done
14707
14708
Jack Jansen666b1e72001-10-31 12:11:48 +000014709# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14711$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014712if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014714else
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014716/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014717#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014718int
14719main ()
14720{
Jack Jansen666b1e72001-10-31 12:11:48 +000014721
14722 int rtn;
14723 rtn = mvwdelch(0,0,0);
14724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 ;
14726 return 0;
14727}
14728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014729if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014730 ac_cv_mvwdelch_is_expression=yes
14731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14735fi
14736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14738$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014739
14740if test "$ac_cv_mvwdelch_is_expression" = yes
14741then
Martin v. Löwis11437992002-04-12 09:54:03 +000014742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014744
14745fi
14746
Matthias Kloseb9621712010-04-24 17:59:49 +000014747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14748$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014749if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014750 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014751else
Matthias Kloseb9621712010-04-24 17:59:49 +000014752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014753/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014754#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014755int
14756main ()
14757{
Jack Jansen666b1e72001-10-31 12:11:48 +000014758
14759 WINDOW *w;
14760 w->_flags = 0;
14761
Martin v. Löwis11437992002-04-12 09:54:03 +000014762 ;
14763 return 0;
14764}
14765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014766if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014767 ac_cv_window_has_flags=yes
14768else
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14772fi
14773
Matthias Kloseb9621712010-04-24 17:59:49 +000014774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14775$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014776
Jack Jansen666b1e72001-10-31 12:11:48 +000014777
14778if test "$ac_cv_window_has_flags" = yes
14779then
Martin v. Löwis11437992002-04-12 09:54:03 +000014780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014782
14783fi
14784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14786$as_echo_n "checking for is_term_resized... " >&6; }
14787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014788/* end confdefs.h. */
14789#include <curses.h>
14790int
14791main ()
14792{
14793void *x=is_term_resized
14794 ;
14795 return 0;
14796}
14797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014798if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014801
Matthias Kloseb159a552010-04-25 21:00:44 +000014802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14806$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014807
14808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14810
Matthias Kloseb9621712010-04-24 17:59:49 +000014811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14812$as_echo_n "checking for resize_term... " >&6; }
14813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014814/* end confdefs.h. */
14815#include <curses.h>
14816int
14817main ()
14818{
14819void *x=resize_term
14820 ;
14821 return 0;
14822}
14823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014824if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014827
Matthias Kloseb159a552010-04-25 21:00:44 +000014828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014829$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14832$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014833
14834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14838$as_echo_n "checking for resizeterm... " >&6; }
14839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014840/* end confdefs.h. */
14841#include <curses.h>
14842int
14843main ()
14844{
14845void *x=resizeterm
14846 ;
14847 return 0;
14848}
14849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014851
Matthias Kloseb9621712010-04-24 17:59:49 +000014852$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014853
Matthias Kloseb159a552010-04-25 21:00:44 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014856else
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14858$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014859
14860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014862# last curses configure check
14863CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14866$as_echo "$as_me: checking for device files" >&6;}
14867
14868if test "x$cross_compiling" = xyes; then
14869 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14871$as_echo_n "checking for /dev/ptmx... " >&6; }
14872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14873$as_echo "not set" >&6; }
14874 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14875 fi
14876 if test "${ac_cv_file__dev_ptc+set}" != set; then
14877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14878$as_echo_n "checking for /dev/ptc... " >&6; }
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14880$as_echo "not set" >&6; }
14881 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14882 fi
14883fi
14884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14886$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014887if ${ac_cv_file__dev_ptmx+:} false; then :
14888 $as_echo_n "(cached) " >&6
14889else
14890 test "$cross_compiling" = yes &&
14891 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14892if test -r "/dev/ptmx"; then
14893 ac_cv_file__dev_ptmx=yes
14894else
14895 ac_cv_file__dev_ptmx=no
14896fi
14897fi
14898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14899$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14900if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014901
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014902fi
14903
14904if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014907
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14910$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014911if ${ac_cv_file__dev_ptc+:} false; then :
14912 $as_echo_n "(cached) " >&6
14913else
14914 test "$cross_compiling" = yes &&
14915 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14916if test -r "/dev/ptc"; then
14917 ac_cv_file__dev_ptc=yes
14918else
14919 ac_cv_file__dev_ptc=no
14920fi
14921fi
14922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14923$as_echo "$ac_cv_file__dev_ptc" >&6; }
14924if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014925
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014926fi
14927
14928if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014931
Neal Norwitz865400f2003-03-21 01:42:58 +000014932fi
14933
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014934if test "$have_long_long" = yes
14935then
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14937$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014938 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014940else
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014942 ac_cv_have_long_long_format="cross -- assuming no"
14943 if test x$GCC = xyes; then
14944 save_CFLAGS=$CFLAGS
14945 CFLAGS="$CFLAGS -Werror -Wformat"
14946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14947/* end confdefs.h. */
14948
14949 #include <stdio.h>
14950 #include <stddef.h>
14951
14952int
14953main ()
14954{
14955
14956 char *buffer;
14957 sprintf(buffer, "%lld", (long long)123);
14958 sprintf(buffer, "%lld", (long long)-123);
14959 sprintf(buffer, "%llu", (unsigned long long)123);
14960
14961 ;
14962 return 0;
14963}
14964_ACEOF
14965if ac_fn_c_try_compile "$LINENO"; then :
14966 ac_cv_have_long_long_format=yes
14967
14968fi
14969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14970 CFLAGS=$save_CFLAGS
14971 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014972else
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014974/* end confdefs.h. */
14975
14976 #include <stdio.h>
14977 #include <stddef.h>
14978 #include <string.h>
14979
14980 #ifdef HAVE_SYS_TYPES_H
14981 #include <sys/types.h>
14982 #endif
14983
14984 int main()
14985 {
14986 char buffer[256];
14987
14988 if (sprintf(buffer, "%lld", (long long)123) < 0)
14989 return 1;
14990 if (strcmp(buffer, "123"))
14991 return 1;
14992
14993 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14994 return 1;
14995 if (strcmp(buffer, "-123"))
14996 return 1;
14997
14998 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14999 return 1;
15000 if (strcmp(buffer, "123"))
15001 return 1;
15002
15003 return 0;
15004 }
15005
15006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015007if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015008 ac_cv_have_long_long_format=yes
15009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015011fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15013 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015014fi
15015
15016
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015017fi
15018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15020$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015021fi
15022
Mark Dickinson89d7d412009-12-31 20:50:59 +000015023if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015024then
15025
Matthias Kloseb9621712010-04-24 17:59:49 +000015026$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015027
15028fi
15029
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015030if test $ac_sys_system = Darwin
15031then
15032 LIBS="$LIBS -framework CoreFoundation"
15033fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015034
Matthias Kloseb9621712010-04-24 17:59:49 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15036$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015037if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015038 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015039else
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015041 ac_cv_have_size_t_format="cross -- assuming yes"
15042
Thomas Wouters477c8d52006-05-27 19:21:47 +000015043else
Matthias Kloseb9621712010-04-24 17:59:49 +000015044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015045/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015046
Thomas Wouters477c8d52006-05-27 19:21:47 +000015047#include <stdio.h>
15048#include <stddef.h>
15049#include <string.h>
15050
Christian Heimes2c181612007-12-17 20:04:13 +000015051#ifdef HAVE_SYS_TYPES_H
15052#include <sys/types.h>
15053#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015054
15055#ifdef HAVE_SSIZE_T
15056typedef ssize_t Py_ssize_t;
15057#elif SIZEOF_VOID_P == SIZEOF_LONG
15058typedef long Py_ssize_t;
15059#else
15060typedef int Py_ssize_t;
15061#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015062
Christian Heimes2c181612007-12-17 20:04:13 +000015063int main()
15064{
15065 char buffer[256];
15066
Thomas Wouters477c8d52006-05-27 19:21:47 +000015067 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15068 return 1;
15069
Thomas Wouters89f507f2006-12-13 04:49:30 +000015070 if (strcmp(buffer, "123"))
15071 return 1;
15072
15073 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15074 return 1;
15075
15076 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015077 return 1;
15078
15079 return 0;
15080}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015081
Thomas Wouters477c8d52006-05-27 19:21:47 +000015082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015083if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015084 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015085else
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015090fi
15091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15094$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015095if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015096
Matthias Kloseb9621712010-04-24 17:59:49 +000015097$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015098
15099fi
15100
Matthias Kloseb9621712010-04-24 17:59:49 +000015101ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015102#ifdef HAVE_SYS_TYPES_H
15103#include <sys/types.h>
15104#endif
15105#ifdef HAVE_SYS_SOCKET_H
15106#include <sys/socket.h>
15107#endif
15108
Matthias Kloseb9621712010-04-24 17:59:49 +000015109"
Victor Stinnere0be4232011-10-25 13:06:09 +020015110if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015111
Martin v. Löwis11437992002-04-12 09:54:03 +000015112else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015113
Matthias Kloseb9621712010-04-24 17:59:49 +000015114$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015115
15116fi
15117
Michael W. Hudson54241132001-12-07 15:38:26 +000015118
Matthias Kloseb9621712010-04-24 17:59:49 +000015119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15120$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015121if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015125 ac_cv_broken_mbstowcs=no
15126else
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015128/* end confdefs.h. */
15129
Stefan Krah19c21392012-11-22 23:47:32 +010015130#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015131#include<stdlib.h>
15132int main() {
15133 size_t len = -1;
15134 const char *str = "text";
15135 len = mbstowcs(NULL, str, 0);
15136 return (len != 4);
15137}
15138
15139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015140if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015141 ac_cv_broken_mbstowcs=no
15142else
Matthias Kloseb9621712010-04-24 17:59:49 +000015143 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015147fi
15148
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015149fi
15150
Matthias Kloseb9621712010-04-24 17:59:49 +000015151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15152$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015153if test "$ac_cv_broken_mbstowcs" = yes
15154then
15155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015157
15158fi
15159
Antoine Pitroub52ec782009-01-25 16:34:23 +000015160# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15162$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015163
15164# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015165if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015166 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015167if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015168then
15169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15173$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015174fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015175if test "$withval" = no
15176then
15177
15178$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15179
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15181$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015182fi
15183
Antoine Pitrou042b1282010-08-13 21:15:58 +000015184else
15185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15186$as_echo "no value specified" >&6; }
15187fi
15188
Antoine Pitroub52ec782009-01-25 16:34:23 +000015189
Matthias Kloseb17289e2012-03-15 19:51:34 +010015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15191$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15192if ${ac_cv_computed_gotos+:} false; then :
15193 $as_echo_n "(cached) " >&6
15194else
15195 if test "$cross_compiling" = yes; then :
15196 if test "${with_computed_gotos+set}" = set; then
15197 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15198 else
15199 ac_cv_computed_gotos=no
15200 fi
15201else
15202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15203/* end confdefs.h. */
15204
15205int main(int argc, char **argv)
15206{
15207 static void *targets[1] = { &&LABEL1 };
15208 goto LABEL2;
15209LABEL1:
15210 return 0;
15211LABEL2:
15212 goto *targets[0];
15213 return 1;
15214}
15215
15216_ACEOF
15217if ac_fn_c_try_run "$LINENO"; then :
15218 ac_cv_computed_gotos=yes
15219else
15220 ac_cv_computed_gotos=no
15221fi
15222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15223 conftest.$ac_objext conftest.beam conftest.$ac_ext
15224fi
15225
15226fi
15227
15228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15229$as_echo "$ac_cv_computed_gotos" >&6; }
15230case "$ac_cv_computed_gotos" in yes*)
15231
15232$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15233
15234esac
15235
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015236case $ac_sys_system in
15237AIX*)
15238
15239$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15240 ;;
15241esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015242
Michael W. Hudson54241132001-12-07 15:38:26 +000015243
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015244
15245
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015246for h in `(cd $srcdir;echo Python/thread_*.h)`
15247do
15248 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15249done
15250
Michael W. Hudson54241132001-12-07 15:38:26 +000015251
Neal Norwitzd24499d2005-12-18 21:36:39 +000015252SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15254$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015255for dir in $SRCDIRS; do
15256 if test ! -d $dir; then
15257 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015258 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015259done
Matthias Kloseb9621712010-04-24 17:59:49 +000015260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15261$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015262
Stefan Krah1919b7e2012-03-21 18:25:23 +010015263# Availability of -O2:
15264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15265$as_echo_n "checking for -O2... " >&6; }
15266saved_cflags="$CFLAGS"
15267CFLAGS="-O2"
15268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15269/* end confdefs.h. */
15270
15271int
15272main ()
15273{
15274
15275
15276 ;
15277 return 0;
15278}
15279_ACEOF
15280if ac_fn_c_try_compile "$LINENO"; then :
15281 have_O2=yes
15282else
15283 have_O2=no
15284fi
15285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15287$as_echo "$have_O2" >&6; }
15288CFLAGS="$saved_cflags"
15289
15290# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15291# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15293$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15294saved_cflags="$CFLAGS"
15295CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15296if test "$have_O2" = no; then
15297 CFLAGS=""
15298fi
15299if test "$cross_compiling" = yes; then :
15300 have_glibc_memmove_bug=undefined
15301else
15302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15303/* end confdefs.h. */
15304
15305#include <stdio.h>
15306#include <stdlib.h>
15307#include <string.h>
15308void foo(void *p, void *q) { memmove(p, q, 19); }
15309int main() {
15310 char a[32] = "123456789000000000";
15311 foo(&a[9], a);
15312 if (strcmp(a, "123456789123456789000000000") != 0)
15313 return 1;
15314 foo(a, &a[9]);
15315 if (strcmp(a, "123456789000000000") != 0)
15316 return 1;
15317 return 0;
15318}
15319
15320_ACEOF
15321if ac_fn_c_try_run "$LINENO"; then :
15322 have_glibc_memmove_bug=no
15323else
15324 have_glibc_memmove_bug=yes
15325fi
15326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15327 conftest.$ac_objext conftest.beam conftest.$ac_ext
15328fi
15329
15330CFLAGS="$saved_cflags"
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15332$as_echo "$have_glibc_memmove_bug" >&6; }
15333if test "$have_glibc_memmove_bug" = yes; then
15334
15335$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15336
15337fi
15338
15339if test "$have_gcc_asm_for_x87" = yes; then
15340 # Some versions of gcc miscompile inline asm:
15341 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15342 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15343 case $CC in
15344 *gcc*)
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15346$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15347 saved_cflags="$CFLAGS"
15348 CFLAGS="-O2"
15349 if test "$cross_compiling" = yes; then :
15350 have_ipa_pure_const_bug=undefined
15351else
15352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15353/* end confdefs.h. */
15354
15355 __attribute__((noinline)) int
15356 foo(int *p) {
15357 int r;
15358 asm ( "movl \$6, (%1)\n\t"
15359 "xorl %0, %0\n\t"
15360 : "=r" (r) : "r" (p) : "memory"
15361 );
15362 return r;
15363 }
15364 int main() {
15365 int p = 8;
15366 if ((foo(&p) ? : p) != 6)
15367 return 1;
15368 return 0;
15369 }
15370
15371_ACEOF
15372if ac_fn_c_try_run "$LINENO"; then :
15373 have_ipa_pure_const_bug=no
15374else
15375 have_ipa_pure_const_bug=yes
15376fi
15377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15378 conftest.$ac_objext conftest.beam conftest.$ac_ext
15379fi
15380
15381 CFLAGS="$saved_cflags"
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15383$as_echo "$have_ipa_pure_const_bug" >&6; }
15384 if test "$have_ipa_pure_const_bug" = yes; then
15385
15386$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15387
15388 fi
15389 ;;
15390 esac
15391fi
15392
Ned Deily322f5ba2013-11-21 23:01:59 -080015393# ensurepip option
15394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15395$as_echo_n "checking for ensurepip... " >&6; }
15396
15397# Check whether --with-ensurepip was given.
15398if test "${with_ensurepip+set}" = set; then :
15399 withval=$with_ensurepip;
15400else
15401 with_ensurepip=upgrade
15402fi
15403
15404case $with_ensurepip in #(
15405 yes|upgrade) :
15406 ENSUREPIP=upgrade ;; #(
15407 install) :
15408 ENSUREPIP=install ;; #(
15409 no) :
15410 ENSUREPIP=no ;; #(
15411 *) :
15412 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15413esac
15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15415$as_echo "$ENSUREPIP" >&6; }
15416
15417
Guido van Rossum627b2d71993-12-24 10:39:16 +000015418# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015419ac_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 +000015420
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015421ac_config_files="$ac_config_files Modules/ld_so_aix"
15422
Martin v. Löwis11437992002-04-12 09:54:03 +000015423cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015424# This file is a shell script that caches the results of configure
15425# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015426# scripts and configure runs, see configure's option --config-cache.
15427# It is not useful on other systems. If it contains results you don't
15428# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015429#
Martin v. Löwis11437992002-04-12 09:54:03 +000015430# config.status only pays attention to the cache file if you give it
15431# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432#
Skip Montanaro6dead952003-09-25 14:50:04 +000015433# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015434# loading this file, other *unset* `ac_cv_foo' will be assigned the
15435# following values.
15436
15437_ACEOF
15438
Guido van Rossumf78abae1997-01-21 22:02:36 +000015439# The following way of writing the cache mishandles newlines in values,
15440# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015442# Ultrix sh set writes to stderr and can't be redirected directly,
15443# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444(
15445 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15446 eval ac_val=\$$ac_var
15447 case $ac_val in #(
15448 *${as_nl}*)
15449 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15451$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452 esac
15453 case $ac_var in #(
15454 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15456 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457 esac ;;
15458 esac
15459 done
15460
Martin v. Löwis11437992002-04-12 09:54:03 +000015461 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15463 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 # `set' does not quote correctly, so add quotes: double-quote
15465 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015467 "s/'/'\\\\''/g;
15468 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 *)
15471 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474 esac |
15475 sort
15476) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015479 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015481 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15482 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15484 :end' >>confcache
15485if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15486 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015487 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015488 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15489$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015490 if test ! -f "$cache_file" || test -h "$cache_file"; then
15491 cat confcache >"$cache_file"
15492 else
15493 case $cache_file in #(
15494 */* | ?:*)
15495 mv -f confcache "$cache_file"$$ &&
15496 mv -f "$cache_file"$$ "$cache_file" ;; #(
15497 *)
15498 mv -f confcache "$cache_file" ;;
15499 esac
15500 fi
15501 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015502 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15504$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015505 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015506fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015507rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015509test "x$prefix" = xNONE && prefix=$ac_default_prefix
15510# Let make expand exec_prefix.
15511test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015512
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015513DEFS=-DHAVE_CONFIG_H
15514
Skip Montanaro6dead952003-09-25 14:50:04 +000015515ac_libobjs=
15516ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015517U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015518for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15519 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15523 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15525 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015526done
15527LIBOBJS=$ac_libobjs
15528
15529LTLIBOBJS=$ac_ltlibobjs
15530
15531
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533
Victor Stinnere0be4232011-10-25 13:06:09 +020015534: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015535ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015536ac_clean_files_save=$ac_clean_files
15537ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15539$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15540as_write_fail=0
15541cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015542#! $SHELL
15543# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015544# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015545# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015546# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015547
Martin v. Löwis11437992002-04-12 09:54:03 +000015548debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015549ac_cs_recheck=false
15550ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015551
Matthias Kloseb9621712010-04-24 17:59:49 +000015552SHELL=\${CONFIG_SHELL-$SHELL}
15553export SHELL
15554_ASEOF
15555cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15556## -------------------- ##
15557## M4sh Initialization. ##
15558## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560# Be more Bourne compatible
15561DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015562if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015563 emulate sh
15564 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015565 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015566 # is contrary to our usage. Disable this feature.
15567 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015569else
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 case `(set -o) 2>/dev/null` in #(
15571 *posix*) :
15572 set -o posix ;; #(
15573 *) :
15574 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015576fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015577
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579as_nl='
15580'
15581export as_nl
15582# Printing a long string crashes Solaris 7 /usr/bin/printf.
15583as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15584as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15585as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15586# Prefer a ksh shell builtin over an external printf program on Solaris,
15587# but without wasting forks for bash or zsh.
15588if test -z "$BASH_VERSION$ZSH_VERSION" \
15589 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15590 as_echo='print -r --'
15591 as_echo_n='print -rn --'
15592elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15593 as_echo='printf %s\n'
15594 as_echo_n='printf %s'
15595else
15596 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15597 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15598 as_echo_n='/usr/ucb/echo -n'
15599 else
15600 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15601 as_echo_n_body='eval
15602 arg=$1;
15603 case $arg in #(
15604 *"$as_nl"*)
15605 expr "X$arg" : "X\\(.*\\)$as_nl";
15606 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15607 esac;
15608 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15609 '
15610 export as_echo_n_body
15611 as_echo_n='sh -c $as_echo_n_body as_echo'
15612 fi
15613 export as_echo_body
15614 as_echo='sh -c $as_echo_body as_echo'
15615fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
15617# The user is always right.
15618if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 PATH_SEPARATOR=:
15620 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15621 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15622 PATH_SEPARATOR=';'
15623 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626
15627# IFS
15628# We need space, tab and new line, in precisely that order. Quoting is
15629# there to prevent editors from complaining about space-tab.
15630# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15631# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015632IFS=" "" $as_nl"
15633
15634# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015635as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015636case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637 *[\\/]* ) as_myself=$0 ;;
15638 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015639for as_dir in $PATH
15640do
15641 IFS=$as_save_IFS
15642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15644 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015647 ;;
15648esac
15649# We did not find ourselves, most probably we were run as `sh COMMAND'
15650# in which case we are not to be found in the path.
15651if test "x$as_myself" = x; then
15652 as_myself=$0
15653fi
15654if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15656 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015657fi
15658
Matthias Kloseb9621712010-04-24 17:59:49 +000015659# Unset variables that we do not need and which cause bugs (e.g. in
15660# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15661# suppresses any "Segmentation fault" message there. '((' could
15662# trigger a bug in pdksh 5.2.14.
15663for as_var in BASH_ENV ENV MAIL MAILPATH
15664do eval test x\${$as_var+set} = xset \
15665 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666done
15667PS1='$ '
15668PS2='> '
15669PS4='+ '
15670
15671# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015672LC_ALL=C
15673export LC_ALL
15674LANGUAGE=C
15675export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677# CDPATH.
15678(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15679
15680
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015681# as_fn_error STATUS ERROR [LINENO LOG_FD]
15682# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015683# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15684# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015685# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015686as_fn_error ()
15687{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015688 as_status=$1; test $as_status -eq 0 && as_status=1
15689 if test "$4"; then
15690 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15691 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015693 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015694 as_fn_exit $as_status
15695} # as_fn_error
15696
15697
15698# as_fn_set_status STATUS
15699# -----------------------
15700# Set $? to STATUS, without forking.
15701as_fn_set_status ()
15702{
15703 return $1
15704} # as_fn_set_status
15705
15706# as_fn_exit STATUS
15707# -----------------
15708# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15709as_fn_exit ()
15710{
15711 set +e
15712 as_fn_set_status $1
15713 exit $1
15714} # as_fn_exit
15715
15716# as_fn_unset VAR
15717# ---------------
15718# Portably unset VAR.
15719as_fn_unset ()
15720{
15721 { eval $1=; unset $1;}
15722}
15723as_unset=as_fn_unset
15724# as_fn_append VAR VALUE
15725# ----------------------
15726# Append the text in VALUE to the end of the definition contained in VAR. Take
15727# advantage of any shell optimizations that allow amortized linear growth over
15728# repeated appends, instead of the typical quadratic growth present in naive
15729# implementations.
15730if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15731 eval 'as_fn_append ()
15732 {
15733 eval $1+=\$2
15734 }'
15735else
15736 as_fn_append ()
15737 {
15738 eval $1=\$$1\$2
15739 }
15740fi # as_fn_append
15741
15742# as_fn_arith ARG...
15743# ------------------
15744# Perform arithmetic evaluation on the ARGs, and store the result in the
15745# global $as_val. Take advantage of shells that can avoid forks. The arguments
15746# must be portable across $(()) and expr.
15747if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15748 eval 'as_fn_arith ()
15749 {
15750 as_val=$(( $* ))
15751 }'
15752else
15753 as_fn_arith ()
15754 {
15755 as_val=`expr "$@" || test $? -eq 1`
15756 }
15757fi # as_fn_arith
15758
15759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760if expr a : '\(a\)' >/dev/null 2>&1 &&
15761 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15762 as_expr=expr
15763else
15764 as_expr=false
15765fi
15766
15767if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15768 as_basename=basename
15769else
15770 as_basename=false
15771fi
15772
Matthias Kloseb9621712010-04-24 17:59:49 +000015773if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15774 as_dirname=dirname
15775else
15776 as_dirname=false
15777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779as_me=`$as_basename -- "$0" ||
15780$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15781 X"$0" : 'X\(//\)$' \| \
15782 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015783$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784 sed '/^.*\/\([^/][^/]*\)\/*$/{
15785 s//\1/
15786 q
15787 }
15788 /^X\/\(\/\/\)$/{
15789 s//\1/
15790 q
15791 }
15792 /^X\/\(\/\).*/{
15793 s//\1/
15794 q
15795 }
15796 s/.*/./; q'`
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798# Avoid depending upon Character Ranges.
15799as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15800as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15801as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15802as_cr_digits='0123456789'
15803as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804
15805ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015806case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015809 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 xy) ECHO_C='\c';;
15811 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15812 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015813 esac;;
15814*)
15815 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015816esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015817
Martin v. Löwis11437992002-04-12 09:54:03 +000015818rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819if test -d conf$$.dir; then
15820 rm -f conf$$.dir/conf$$.file
15821else
15822 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015825if (echo >conf$$.file) 2>/dev/null; then
15826 if ln -s conf$$.file conf$$ 2>/dev/null; then
15827 as_ln_s='ln -s'
15828 # ... but there are two gotchas:
15829 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15830 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015831 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015832 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015833 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 elif ln conf$$.file conf$$ 2>/dev/null; then
15835 as_ln_s=ln
15836 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015837 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015839else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015840 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15843rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845
15846# as_fn_mkdir_p
15847# -------------
15848# Create "$as_dir" as a directory, including parents if necessary.
15849as_fn_mkdir_p ()
15850{
15851
15852 case $as_dir in #(
15853 -*) as_dir=./$as_dir;;
15854 esac
15855 test -d "$as_dir" || eval $as_mkdir_p || {
15856 as_dirs=
15857 while :; do
15858 case $as_dir in #(
15859 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15860 *) as_qdir=$as_dir;;
15861 esac
15862 as_dirs="'$as_qdir' $as_dirs"
15863 as_dir=`$as_dirname -- "$as_dir" ||
15864$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15865 X"$as_dir" : 'X\(//\)[^/]' \| \
15866 X"$as_dir" : 'X\(//\)$' \| \
15867 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15868$as_echo X"$as_dir" |
15869 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15870 s//\1/
15871 q
15872 }
15873 /^X\(\/\/\)[^/].*/{
15874 s//\1/
15875 q
15876 }
15877 /^X\(\/\/\)$/{
15878 s//\1/
15879 q
15880 }
15881 /^X\(\/\).*/{
15882 s//\1/
15883 q
15884 }
15885 s/.*/./; q'`
15886 test -d "$as_dir" && break
15887 done
15888 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015889 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015890
15891
15892} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015893if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015894 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015895else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015896 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015897 as_mkdir_p=false
15898fi
15899
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015900
15901# as_fn_executable_p FILE
15902# -----------------------
15903# Test if FILE is an executable regular file.
15904as_fn_executable_p ()
15905{
15906 test -f "$1" && test -x "$1"
15907} # as_fn_executable_p
15908as_test_x='test -x'
15909as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015910
15911# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015912as_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 +000015913
15914# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015915as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015916
15917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015919## ----------------------------------- ##
15920## Main body of $CONFIG_STATUS script. ##
15921## ----------------------------------- ##
15922_ASEOF
15923test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15926# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015927# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928# values after options handling.
15929ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015930This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015931generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
15933 CONFIG_FILES = $CONFIG_FILES
15934 CONFIG_HEADERS = $CONFIG_HEADERS
15935 CONFIG_LINKS = $CONFIG_LINKS
15936 CONFIG_COMMANDS = $CONFIG_COMMANDS
15937 $ $0 $@
15938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939on `(hostname || uname -n) 2>/dev/null | sed 1q`
15940"
15941
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
15943
Matthias Kloseb9621712010-04-24 17:59:49 +000015944case $ac_config_files in *"
15945"*) set x $ac_config_files; shift; ac_config_files=$*;;
15946esac
15947
15948case $ac_config_headers in *"
15949"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15950esac
15951
15952
15953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015954# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015955config_files="$ac_config_files"
15956config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015957
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015961ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015962\`$as_me' instantiates files and other configuration actions
15963from templates according to the current configuration. Unless the files
15964and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015967
15968 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015969 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015970 --config print configuration, then exit
15971 -q, --quiet, --silent
15972 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015973 -d, --debug don't remove temporary files
15974 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015975 --file=FILE[:TEMPLATE]
15976 instantiate the configuration file FILE
15977 --header=FILE[:TEMPLATE]
15978 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015979
15980Configuration files:
15981$config_files
15982
15983Configuration headers:
15984$config_headers
15985
Matthias Kloseb9621712010-04-24 17:59:49 +000015986Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15990ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015991ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015992python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015993configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015994 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015995
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015996Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015997This config.status script is free software; the Free Software Foundation
15998gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999
16000ac_pwd='$ac_pwd'
16001srcdir='$srcdir'
16002INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016003MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016004test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016005_ACEOF
16006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16008# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016009ac_need_defaults=:
16010while test $# != 0
16011do
16012 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016013 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16015 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016016 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016018 --*=)
16019 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16020 ac_optarg=
16021 ac_shift=:
16022 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016024 ac_option=$1
16025 ac_optarg=$2
16026 ac_shift=shift
16027 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 esac
16029
Skip Montanaro6dead952003-09-25 14:50:04 +000016030 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016032 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16033 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016035 $as_echo "$ac_cs_version"; exit ;;
16036 --config | --confi | --conf | --con | --co | --c )
16037 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 debug=: ;;
16040 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016041 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 case $ac_optarg in
16043 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016044 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 esac
16046 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 ac_need_defaults=false;;
16048 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016049 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016050 case $ac_optarg in
16051 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16052 esac
16053 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016055 --he | --h)
16056 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016057 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016058Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016059 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016060 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016061 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16062 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16063 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016064
16065 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016066 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016067Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016068
Matthias Kloseb9621712010-04-24 17:59:49 +000016069 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016071
16072 esac
16073 shift
16074done
16075
Skip Montanaro6dead952003-09-25 14:50:04 +000016076ac_configure_extra_args=
16077
16078if $ac_cs_silent; then
16079 exec 6>/dev/null
16080 ac_configure_extra_args="$ac_configure_extra_args --silent"
16081fi
16082
16083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016084cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016085if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016086 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016087 shift
16088 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16089 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016090 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016092fi
16093
Martin v. Löwis11437992002-04-12 09:54:03 +000016094_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016096exec 5>>config.log
16097{
16098 echo
16099 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16100## Running $as_me. ##
16101_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016102 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016103} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016104
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016106cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016107_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110
16111# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016112for ac_config_target in $ac_config_targets
16113do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016114 case $ac_config_target in
16115 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16116 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16117 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016118 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16119 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016120 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16121 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016122 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016123 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016124 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125
Victor Stinnere0be4232011-10-25 13:06:09 +020016126 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 esac
16128done
16129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016130
Martin v. Löwis11437992002-04-12 09:54:03 +000016131# If the user did not use the arguments to specify the items to instantiate,
16132# then the envvar interface is used. Set only those that are not.
16133# We use the long form for the default assignment because of an extremely
16134# bizarre bug on SunOS 4.1.3.
16135if $ac_need_defaults; then
16136 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16137 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16138fi
16139
Skip Montanaro6dead952003-09-25 14:50:04 +000016140# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016142# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016143# Hook for its removal unless debugging.
16144# Note that there is a small window in which the directory will not be cleaned:
16145# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016146$debug ||
16147{
Victor Stinnere0be4232011-10-25 13:06:09 +020016148 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016149 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016150 : "${ac_tmp:=$tmp}"
16151 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016153 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016154}
Martin v. Löwis11437992002-04-12 09:54:03 +000016155# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016156
Martin v. Löwis11437992002-04-12 09:54:03 +000016157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016159 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016160} ||
16161{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016162 tmp=./conf$$-$RANDOM
16163 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016164} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016165ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016166
Matthias Kloseb9621712010-04-24 17:59:49 +000016167# Set up the scripts for CONFIG_FILES section.
16168# No need to generate them if there are no CONFIG_FILES.
16169# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016170if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172
16173ac_cr=`echo X | tr X '\015'`
16174# On cygwin, bash can eat \r inside `` if the user requested igncr.
16175# But we know of no other shell where ac_cr would be empty at this
16176# point, so we can use a bashism as a fallback.
16177if test "x$ac_cr" = x; then
16178 eval ac_cr=\$\'\\r\'
16179fi
16180ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16181if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016182 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016183else
16184 ac_cs_awk_cr=$ac_cr
16185fi
16186
Victor Stinnere0be4232011-10-25 13:06:09 +020016187echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016188_ACEOF
16189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190
Matthias Kloseb9621712010-04-24 17:59:49 +000016191{
16192 echo "cat >conf$$subs.awk <<_ACEOF" &&
16193 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16194 echo "_ACEOF"
16195} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016196 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16197ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198ac_delim='%!_!# '
16199for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016200 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016201 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16204 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205 break
16206 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016207 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 else
16209 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211done
Matthias Kloseb9621712010-04-24 17:59:49 +000016212rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213
Matthias Kloseb9621712010-04-24 17:59:49 +000016214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016215cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016217sed -n '
16218h
16219s/^/S["/; s/!.*/"]=/
16220p
16221g
16222s/^[^!]*!//
16223:repl
16224t repl
16225s/'"$ac_delim"'$//
16226t delim
16227:nl
16228h
16229s/\(.\{148\}\)..*/\1/
16230t more1
16231s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16232p
16233n
16234b repl
16235:more1
16236s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16237p
16238g
16239s/.\{148\}//
16240t nl
16241:delim
16242h
16243s/\(.\{148\}\)..*/\1/
16244t more2
16245s/["\\]/\\&/g; s/^/"/; s/$/"/
16246p
16247b
16248:more2
16249s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16250p
16251g
16252s/.\{148\}//
16253t delim
16254' <conf$$subs.awk | sed '
16255/^[^""]/{
16256 N
16257 s/\n//
16258}
16259' >>$CONFIG_STATUS || ac_write_fail=1
16260rm -f conf$$subs.awk
16261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16262_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016263cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 for (key in S) S_is_set[key] = 1
16265 FS = ""
16266
16267}
16268{
16269 line = $ 0
16270 nfields = split(line, field, "@")
16271 substed = 0
16272 len = length(field[1])
16273 for (i = 2; i < nfields; i++) {
16274 key = field[i]
16275 keylen = length(key)
16276 if (S_is_set[key]) {
16277 value = S[key]
16278 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16279 len += length(value) + length(field[++i])
16280 substed = 1
16281 } else
16282 len += 1 + keylen
16283 }
16284
16285 print line
16286}
16287
16288_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16291if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16292 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16293else
16294 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016295fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016296 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016297_ACEOF
16298
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016299# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16300# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301# trailing colons and then remove the whole line if VPATH becomes empty
16302# (actually we leave an empty line to preserve line numbers).
16303if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016304 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16305h
16306s///
16307s/^/:/
16308s/[ ]*$/:/
16309s/:\$(srcdir):/:/g
16310s/:\${srcdir}:/:/g
16311s/:@srcdir@:/:/g
16312s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016314x
16315s/\(=[ ]*\).*/\1/
16316G
16317s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318s/^[^=]*=[ ]*$//
16319}'
16320fi
16321
Matthias Kloseb9621712010-04-24 17:59:49 +000016322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016323fi # test -n "$CONFIG_FILES"
16324
Matthias Kloseb9621712010-04-24 17:59:49 +000016325# Set up the scripts for CONFIG_HEADERS section.
16326# No need to generate them if there are no CONFIG_HEADERS.
16327# This happens for instance with `./config.status Makefile'.
16328if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016329cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016330BEGIN {
16331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016332
Matthias Kloseb9621712010-04-24 17:59:49 +000016333# Transform confdefs.h into an awk script `defines.awk', embedded as
16334# here-document in config.status, that substitutes the proper values into
16335# config.h.in to produce config.h.
16336
16337# Create a delimiter string that does not exist in confdefs.h, to ease
16338# handling of long lines.
16339ac_delim='%!_!# '
16340for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016341 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16342 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016343 break
16344 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016345 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016346 else
16347 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16348 fi
16349done
16350
16351# For the awk script, D is an array of macro values keyed by name,
16352# likewise P contains macro parameters if any. Preserve backslash
16353# newline sequences.
16354
16355ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16356sed -n '
16357s/.\{148\}/&'"$ac_delim"'/g
16358t rset
16359:rset
16360s/^[ ]*#[ ]*define[ ][ ]*/ /
16361t def
16362d
16363:def
16364s/\\$//
16365t bsnl
16366s/["\\]/\\&/g
16367s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16368D["\1"]=" \3"/p
16369s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16370d
16371:bsnl
16372s/["\\]/\\&/g
16373s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16374D["\1"]=" \3\\\\\\n"\\/p
16375t cont
16376s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16377t cont
16378d
16379:cont
16380n
16381s/.\{148\}/&'"$ac_delim"'/g
16382t clear
16383:clear
16384s/\\$//
16385t bsnlc
16386s/["\\]/\\&/g; s/^/"/; s/$/"/p
16387d
16388:bsnlc
16389s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16390b cont
16391' <confdefs.h | sed '
16392s/'"$ac_delim"'/"\\\
16393"/g' >>$CONFIG_STATUS || ac_write_fail=1
16394
16395cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16396 for (key in D) D_is_set[key] = 1
16397 FS = ""
16398}
16399/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16400 line = \$ 0
16401 split(line, arg, " ")
16402 if (arg[1] == "#") {
16403 defundef = arg[2]
16404 mac1 = arg[3]
16405 } else {
16406 defundef = substr(arg[1], 2)
16407 mac1 = arg[2]
16408 }
16409 split(mac1, mac2, "(") #)
16410 macro = mac2[1]
16411 prefix = substr(line, 1, index(line, defundef) - 1)
16412 if (D_is_set[macro]) {
16413 # Preserve the white space surrounding the "#".
16414 print prefix "define", macro P[macro] D[macro]
16415 next
16416 } else {
16417 # Replace #undef with comments. This is necessary, for example,
16418 # in the case of _POSIX_SOURCE, which is predefined and required
16419 # on some systems where configure will not decide to define it.
16420 if (defundef == "undef") {
16421 print "/*", prefix defundef, macro, "*/"
16422 next
16423 }
16424 }
16425}
16426{ print }
16427_ACAWK
16428_ACEOF
16429cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016430 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016431fi # test -n "$CONFIG_HEADERS"
16432
16433
16434eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16435shift
16436for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437do
16438 case $ac_tag in
16439 :[FHLC]) ac_mode=$ac_tag; continue;;
16440 esac
16441 case $ac_mode$ac_tag in
16442 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016443 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016444 :[FH]-) ac_tag=-:-;;
16445 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16446 esac
16447 ac_save_IFS=$IFS
16448 IFS=:
16449 set x $ac_tag
16450 IFS=$ac_save_IFS
16451 shift
16452 ac_file=$1
16453 shift
16454
16455 case $ac_mode in
16456 :L) ac_source=$1;;
16457 :[FH])
16458 ac_file_inputs=
16459 for ac_f
16460 do
16461 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016462 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016463 *) # Look for the file first in the build tree, then in the source tree
16464 # (if the path is not absolute). The absolute path cannot be DOS-style,
16465 # because $ac_f cannot contain `:'.
16466 test -f "$ac_f" ||
16467 case $ac_f in
16468 [\\/$]*) false;;
16469 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16470 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016471 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016473 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16474 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475 done
16476
16477 # Let's still pretend it is `configure' which instantiates (i.e., don't
16478 # use $as_me), people would be surprised to read:
16479 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016480 configure_input='Generated from '`
16481 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16482 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483 if test x"$ac_file" != x-; then
16484 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016485 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16486$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016488 # Neutralize special characters interpreted by sed in replacement strings.
16489 case $configure_input in #(
16490 *\&* | *\|* | *\\* )
16491 ac_sed_conf_input=`$as_echo "$configure_input" |
16492 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16493 *) ac_sed_conf_input=$configure_input;;
16494 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016495
16496 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016497 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16498 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499 esac
16500 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016501 esac
16502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016504$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016505 X"$ac_file" : 'X\(//\)[^/]' \| \
16506 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016508$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16510 s//\1/
16511 q
16512 }
16513 /^X\(\/\/\)[^/].*/{
16514 s//\1/
16515 q
16516 }
16517 /^X\(\/\/\)$/{
16518 s//\1/
16519 q
16520 }
16521 /^X\(\/\).*/{
16522 s//\1/
16523 q
16524 }
16525 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016526 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 ac_builddir=.
16528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529case "$ac_dir" in
16530.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16531*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016535 case $ac_top_builddir_sub in
16536 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16537 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16538 esac ;;
16539esac
16540ac_abs_top_builddir=$ac_pwd
16541ac_abs_builddir=$ac_pwd$ac_dir_suffix
16542# for backward compatibility:
16543ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016544
16545case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016546 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 ac_top_srcdir=$ac_top_builddir_sub
16549 ac_abs_top_srcdir=$ac_pwd ;;
16550 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552 ac_top_srcdir=$srcdir
16553 ac_abs_top_srcdir=$srcdir ;;
16554 *) # Relative name.
16555 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16556 ac_top_srcdir=$ac_top_build_prefix$srcdir
16557 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016558esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016559ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016560
Martin v. Löwis11437992002-04-12 09:54:03 +000016561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562 case $ac_mode in
16563 :F)
16564 #
16565 # CONFIG_FILE
16566 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016567
16568 case $INSTALL in
16569 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016570 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016571 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016572 ac_MKDIR_P=$MKDIR_P
16573 case $MKDIR_P in
16574 [\\/$]* | ?:[\\/]* ) ;;
16575 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16576 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016577_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578
Matthias Kloseb9621712010-04-24 17:59:49 +000016579cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580# If the template does not know about datarootdir, expand it.
16581# FIXME: This hack should be removed a few years after 2.60.
16582ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016583ac_sed_dataroot='
16584/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585 p
16586 q
16587}
16588/@datadir@/p
16589/@docdir@/p
16590/@infodir@/p
16591/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016592/@mandir@/p'
16593case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594*datarootdir*) ac_datarootdir_seen=yes;;
16595*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16597$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600 ac_datarootdir_hack='
16601 s&@datadir@&$datadir&g
16602 s&@docdir@&$docdir&g
16603 s&@infodir@&$infodir&g
16604 s&@localedir@&$localedir&g
16605 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016606 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016607esac
16608_ACEOF
16609
16610# Neutralize VPATH when `$srcdir' = `.'.
16611# Shell code in configure.ac might set extrasub.
16612# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16614ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016615$extrasub
16616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016618:t
16619/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016620s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016622s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016623s&@srcdir@&$ac_srcdir&;t t
16624s&@abs_srcdir@&$ac_abs_srcdir&;t t
16625s&@top_srcdir@&$ac_top_srcdir&;t t
16626s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16627s&@builddir@&$ac_builddir&;t t
16628s&@abs_builddir@&$ac_abs_builddir&;t t
16629s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16630s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016631s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016632$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016633"
Victor Stinnere0be4232011-10-25 13:06:09 +020016634eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16635 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016638 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16639 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16640 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016641 { $as_echo "$as_me:${as_lineno-$LINENO}: 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" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016643$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016644which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016645
Victor Stinnere0be4232011-10-25 13:06:09 +020016646 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016648 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16649 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016650 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016651 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016652 ;;
16653 :H)
16654 #
16655 # CONFIG_HEADER
16656 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016658 {
16659 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016660 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16661 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016662 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016663 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016664 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16665$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016668 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016669 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016670 fi
16671 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016672 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016673 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016674 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678
16679 esac
16680
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016681
16682 case $ac_file$ac_mode in
16683 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16684
16685 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686done # for ac_tag
16687
Guido van Rossum627b2d71993-12-24 10:39:16 +000016688
Matthias Kloseb9621712010-04-24 17:59:49 +000016689as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016690_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016691ac_clean_files=$ac_clean_files_save
16692
Matthias Kloseb9621712010-04-24 17:59:49 +000016693test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016694 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696
16697# configure is writing to config.log, and then calls config.status.
16698# config.status does its own redirection, appending to config.log.
16699# Unfortunately, on DOS this fails, as config.log is still kept open
16700# by configure, so config.status won't be able to write to it; its
16701# output is simply discarded. So we exec the FD to /dev/null,
16702# effectively closing config.log, so it can be properly (re)opened and
16703# appended to by config.status. When coming back to configure, we
16704# need to make the FD available again.
16705if test "$no_create" != yes; then
16706 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016707 ac_config_status_args=
16708 test "$silent" = yes &&
16709 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016711 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016712 exec 5>>config.log
16713 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16714 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016715 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016716fi
16717if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16719$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016720fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016721
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016722
Christian Heimes75ed8902013-11-20 01:11:18 +010016723echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016724if test ! -f Modules/Setup
16725then
16726 cp $srcdir/Modules/Setup.dist Modules/Setup
16727fi
16728
Christian Heimes75ed8902013-11-20 01:11:18 +010016729echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016730if test ! -f Modules/Setup.local
16731then
16732 echo "# Edit this file for local setup changes" >Modules/Setup.local
16733fi
16734
Christian Heimes75ed8902013-11-20 01:11:18 +010016735echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016736$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16737 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016738 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016739mv config.c Modules