blob: 139d391d0c61f124158725809ec5f13fc01fb83d [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
Ned Deilyfcbc2462014-08-22 13:32:49 -07002953# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2954rm -f pybuilddir.txt
2955
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002956if test "$cross_compiling" = yes; then
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2958$as_echo_n "checking for python interpreter for cross build... " >&6; }
2959 if test -z "$PYTHON_FOR_BUILD"; then
2960 for interp in python$PACKAGE_VERSION python3 python; do
2961 which $interp >/dev/null 2>&1 || continue
2962 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2963 break
2964 fi
2965 interp=
2966 done
2967 if test x$interp = x; then
2968 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2969 fi
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2971$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002972 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002973 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002974elif test "$cross_compiling" = maybe; then
2975 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002976else
2977 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Petersond23f8222009-04-05 19:13:16 +00002982if test "$prefix" != "/"; then
2983 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2984fi
2985
2986
Martin v. Löwis11437992002-04-12 09:54:03 +00002987
2988
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002989# We don't use PACKAGE_ variables, and they cause conflicts
2990# with other autoconf-based packages that include Python.h
2991grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2992rm confdefs.h
2993mv confdefs.h.new confdefs.h
2994
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002995
Georg Brandl08a90122012-09-29 09:34:13 +02002996VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002997
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002998# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002999
3000SOVERSION=1.0
3001
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002# The later defininition of _XOPEN_SOURCE disables certain features
3003# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
3007
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3010# them.
3011
Matthias Kloseb9621712010-04-24 17:59:49 +00003012$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003013
3014
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3017# them.
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003020
3021
Martin v. Löwisd6320502004-08-12 13:45:08 +00003022# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3023# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3024
Matthias Kloseb9621712010-04-24 17:59:49 +00003025$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003026
3027
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3030# them.
3031
Matthias Kloseb9621712010-04-24 17:59:49 +00003032$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003033
3034
3035
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003036define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003037
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003038# Arguments passed to configure.
3039
3040CONFIG_ARGS="$ac_configure_args"
3041
Matthias Kloseb9621712010-04-24 17:59:49 +00003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3043$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003045if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003047 case $enableval in
3048 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003049 # Locate the best usable SDK, see Mac/README.txt for more
3050 # information
3051 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003052 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3055 if test ! -d "${enableval}"
3056 then
3057 enableval=/
3058 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060 ;;
3061 esac
3062 case $enableval in
3063 no)
3064 UNIVERSALSDK=
3065 enable_universalsdk=
3066 ;;
3067 *)
3068 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069 if test ! -d "${UNIVERSALSDK}"
3070 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003071 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003073 ;;
3074 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003075
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076
Thomas Wouters477c8d52006-05-27 19:21:47 +00003077else
3078
3079 UNIVERSALSDK=
3080 enable_universalsdk=
3081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003082fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003083
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003084if test -n "${UNIVERSALSDK}"
3085then
Matthias Kloseb9621712010-04-24 17:59:49 +00003086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3087$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003088else
Matthias Kloseb9621712010-04-24 17:59:49 +00003089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003091fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003094
Ned Deily87adb6e2013-10-18 21:09:56 -07003095ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003096
Ned Deilycbfb9a52012-06-23 16:02:19 -07003097# For backward compatibility reasons we prefer to select '32-bit' if available,
3098# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100if test "`uname -s`" = "Darwin"
3101then
3102 if test -n "${UNIVERSALSDK}"
3103 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003104 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003105 then
3106 UNIVERSAL_ARCHS="intel"
3107 fi
3108 fi
3109fi
3110
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3113$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003116if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003117 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118 UNIVERSAL_ARCHS="$withval"
3119
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003120fi
3121
Ned Deily87adb6e2013-10-18 21:09:56 -07003122if test -n "${UNIVERSALSDK}"
3123then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3125$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3126else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128$as_echo "no" >&6; }
3129fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003130
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003131
3132# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003133if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003134 withval=$with_framework_name;
3135 PYTHONFRAMEWORK=${withval}
3136 PYTHONFRAMEWORKDIR=${withval}.framework
3137 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3138
3139else
3140
3141 PYTHONFRAMEWORK=Python
3142 PYTHONFRAMEWORKDIR=Python.framework
3143 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3144
3145fi
3146
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003147# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003148if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003149 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003150 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003151 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003152 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003153 esac
3154 case $enableval in
3155 no)
3156 PYTHONFRAMEWORK=
3157 PYTHONFRAMEWORKDIR=no-framework
3158 PYTHONFRAMEWORKPREFIX=
3159 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST=
3161 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003162 FRAMEWORKALTINSTALLFIRST=
3163 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003164 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003165 if test "x${prefix}" = "xNONE"; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3167 else
3168 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3169 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003170 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003171 ;;
3172 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003173 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003174 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003176 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003177 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3178 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003179 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003182 if test "x${prefix}" = "xNONE" ; then
3183 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003185 else
3186 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3187 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003188
3189 case "${enableval}" in
3190 /System*)
3191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3192 if test "${prefix}" = "NONE" ; then
3193 # See below
3194 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3195 fi
3196 ;;
3197
3198 /Library*)
3199 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3200 ;;
3201
3202 */Library/Frameworks)
3203 MDIR="`dirname "${enableval}"`"
3204 MDIR="`dirname "${MDIR}"`"
3205 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3206
3207 if test "${prefix}" = "NONE"; then
3208 # User hasn't specified the
3209 # --prefix option, but wants to install
3210 # the framework in a non-default location,
3211 # ensure that the compatibility links get
3212 # installed relative to that prefix as well
3213 # instead of in /usr/local.
3214 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3215 fi
3216 ;;
3217
3218 *)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 ;;
3221 esac
3222
Jack Jansen127e56e2001-09-11 14:41:54 +00003223 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003226 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3232
3233 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3234
Jack Jansene578a632001-08-15 01:27:14 +00003235 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003236
Guido van Rossum563e7081996-09-10 18:20:48 +00003237else
Martin v. Löwis11437992002-04-12 09:54:03 +00003238
Jack Jansene578a632001-08-15 01:27:14 +00003239 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003240 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE" ; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansene578a632001-08-15 01:27:14 +00003253 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003256fi
3257
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
3259
Michael W. Hudson54241132001-12-07 15:38:26 +00003260
3261
3262
3263
Jack Jansene578a632001-08-15 01:27:14 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265
3266
3267
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003268
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
Ned Deilyb8f944f2013-11-21 22:42:25 -08003270
Jack Jansene578a632001-08-15 01:27:14 +00003271##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003272## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003273## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003274##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275# Set name for machine-dependent library files
3276
Matthias Kloseb9621712010-04-24 17:59:49 +00003277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3278$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279if test -z "$MACHDEP"
3280then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 # avoid using uname for cross builds
3282 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003283 # ac_sys_system and ac_sys_release are used for setting
3284 # a lot of different things including 'define_xopen_source'
3285 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case "$host" in
3287 *-*-linux*)
3288 ac_sys_system=Linux
3289 ;;
3290 *-*-cygwin*)
3291 ac_sys_system=Cygwin
3292 ;;
3293 *)
3294 # for now, limit cross builds to known configurations
3295 MACHDEP="unknown"
3296 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3297 esac
3298 ac_sys_release=
3299 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003300 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003301 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003302 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003303 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003304 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003305 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003306 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003307 fi
3308 ac_md_system=`echo $ac_sys_system |
3309 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3310 ac_md_release=`echo $ac_sys_release |
3311 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3312 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003313
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003315 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003316 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003317 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003318 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003319 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003320 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003321fi
Guido van Rossum91922671997-10-09 20:24:13 +00003322
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003323
3324if test "$cross_compiling" = yes; then
3325 case "$host" in
3326 *-*-linux*)
3327 case "$host_cpu" in
3328 arm*)
3329 _host_cpu=arm
3330 ;;
3331 *)
3332 _host_cpu=$host_cpu
3333 esac
3334 ;;
3335 *-*-cygwin*)
3336 _host_cpu=
3337 ;;
3338 *)
3339 # for now, limit cross builds to known configurations
3340 MACHDEP="unknown"
3341 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3342 esac
3343 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3344fi
3345
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003346# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3347# disable features if it is defined, without any means to access these
3348# features as extensions. For these systems, we skip the definition of
3349# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3350# some feature, make sure there is no alternative way to access this
3351# feature. Also, when using wildcards, make sure you have verified the
3352# need for not defining _XOPEN_SOURCE on all systems matching the
3353# wildcard, and that the wildcard does not include future systems
3354# (which may remove their limitations).
3355case $ac_sys_system/$ac_sys_release in
3356 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3357 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003358 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003359 # In addition, Stefan Krah confirms that issue #1244610 exists through
3360 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003361 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003362 define_xopen_source=no
3363 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3364 # also defined. This can be overridden by defining _BSD_SOURCE
3365 # As this has a different meaning on Linux, only define it on OpenBSD
3366
Matthias Kloseb9621712010-04-24 17:59:49 +00003367$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003368
3369 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003370 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003371 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3372 # also defined. This can be overridden by defining _BSD_SOURCE
3373 # As this has a different meaning on Linux, only define it on OpenBSD
3374
Matthias Kloseb9621712010-04-24 17:59:49 +00003375$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003376
3377 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003378 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3379 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3380 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003381 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003382 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003383 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3384 # request to enable features supported by the standard as a request
3385 # to disable features not supported by the standard. The best way
3386 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3387 # entirely and define __EXTENSIONS__ instead.
3388 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003389 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003390 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3391 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003392 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003393 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003394 define_xopen_source=no;;
3395 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003396 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003397 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003398 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003399 # On FreeBSD 4, the math functions C89 does not cover are never defined
3400 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3401 FreeBSD/4.*)
3402 define_xopen_source=no;;
3403 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3404 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3405 # identifies itself as Darwin/7.*
3406 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3407 # disables platform specific features beyond repair.
3408 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3409 # has no effect, don't bother defining them
3410 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003411 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003412 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003413 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003414 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3415 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3416 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003417 AIX/4)
3418 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003419 AIX/5)
3420 if test `uname -r` -eq 1; then
3421 define_xopen_source=no
3422 fi
3423 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003424 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3425 # defining NI_NUMERICHOST.
3426 QNX/6.3.2)
3427 define_xopen_source=no
3428 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003430esac
3431
3432if test $define_xopen_source = yes
3433then
Victor Stinner14d098d2011-09-07 22:29:43 +02003434 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003435
Victor Stinner14d098d2011-09-07 22:29:43 +02003436$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003437
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003438
3439 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3440 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3441 # several APIs are not declared. Since this is also needed in some
3442 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003443
Matthias Kloseb9621712010-04-24 17:59:49 +00003444$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003445
3446
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003447
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003448$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003450fi
3451
Christian Heimes647cd872013-12-07 23:39:33 +01003452# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3453case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003454 hp*|HP*)
3455 define_stdc_a1=yes;;
3456 *)
3457 define_stdc_a1=no;;
3458esac
3459
3460if test $define_stdc_a1 = yes
3461then
Christian Heimes647cd872013-12-07 23:39:33 +01003462
3463$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3464
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465fi
Christian Heimes647cd872013-12-07 23:39:33 +01003466
Guido van Rossum91922671997-10-09 20:24:13 +00003467#
3468# SGI compilers allow the specification of the both the ABI and the
3469# ISA on the command line. Depending on the values of these switches,
3470# different and often incompatable code will be generated.
3471#
3472# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3473# thus supply support for various ABI/ISA combinations. The MACHDEP
3474# variable is also adjusted.
3475#
3476
3477if test ! -z "$SGI_ABI"
3478then
3479 CC="cc $SGI_ABI"
3480 LDFLAGS="$SGI_ABI $LDFLAGS"
3481 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3484$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485
Jack Jansen6b08a402004-06-03 12:41:45 +00003486# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3487# it may influence the way we can build extensions, so distutils
3488# needs to check it
3489
Thomas Wouters477c8d52006-05-27 19:21:47 +00003490
Jack Jansen6b08a402004-06-03 12:41:45 +00003491CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003492EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003493
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003495
3496# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3497# for debug/optimization stuff. BASECFLAGS is for flags that are required
3498# just to get things to compile and link. Users are free to override OPT
3499# when running configure or make. The build should not break if they do.
3500# BASECFLAGS should generally not be messed with, however.
3501
3502# XXX shouldn't some/most/all of this code be merged with the stuff later
3503# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3505$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003507# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003508if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003509 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003511 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003512 without_gcc=yes;;
3513 yes) CC=gcc
3514 without_gcc=no;;
3515 *) CC=$withval
3516 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003517 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003518else
Martin v. Löwis11437992002-04-12 09:54:03 +00003519
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003520 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003521 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003522 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003523 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003524 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003525fi
3526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3528$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003537# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3538# when the compiler supports them, but we don't always want -O2, and
3539# we set -g later.
3540if test -z "$CFLAGS"; then
3541 CFLAGS=
3542fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003543
3544if test "$ac_sys_system" = "Darwin"
3545then
3546 # Compiler selection on MacOSX is more complicated than
3547 # AC_PROG_CC can handle, see Mac/README.txt for more
3548 # information
3549 if test -z "${CC}"
3550 then
3551 found_gcc=
3552 found_clang=
3553 as_save_IFS=$IFS; IFS=:
3554 for as_dir in $PATH
3555 do
3556 IFS=$as_save_IFS
3557 if test -x $as_dir/gcc; then
3558 if test -z "${found_gcc}"; then
3559 found_gcc=$as_dir/gcc
3560 fi
3561 fi
3562 if test -x $as_dir/clang; then
3563 if test -z "${found_clang}"; then
3564 found_clang=$as_dir/clang
3565 fi
3566 fi
3567 done
3568 IFS=$as_save_IFS
3569
3570 if test -n "$found_gcc" -a -n "$found_clang"
3571 then
3572 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3573 then
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3575$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3576 CC="$found_clang"
3577 CXX="$found_clang++"
3578 fi
3579
3580
3581 elif test -z "$found_gcc" -a -n "$found_clang"
3582 then
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3584$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3585 CC="$found_clang"
3586 CXX="$found_clang++"
3587
3588 elif test -z "$found_gcc" -a -z "$found_clang"
3589 then
3590 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3591 if test -n "${found_clang}"
3592 then
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3594$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3595 CC="${found_clang}"
3596 CXX="`/usr/bin/xcrun -find clang++`"
3597
3598 # else: use default behaviour
3599 fi
3600 fi
3601 fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
3608if test -n "$ac_tool_prefix"; then
3609 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3610set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3612$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003613if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003614 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003615else
3616 if test -n "$CC"; then
3617 ac_cv_prog_CC="$CC" # Let the user override the test.
3618else
Martin v. Löwis11437992002-04-12 09:54:03 +00003619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3620for as_dir in $PATH
3621do
3622 IFS=$as_save_IFS
3623 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003624 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 break 2
3629 fi
3630done
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003632IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634fi
3635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003636CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3639$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003640else
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3642$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003643fi
3644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645
Martin v. Löwis11437992002-04-12 09:54:03 +00003646fi
3647if test -z "$ac_cv_prog_CC"; then
3648 ac_ct_CC=$CC
3649 # Extract the first word of "gcc", so it can be a program name with args.
3650set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003653if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 if test -n "$ac_ct_CC"; then
3657 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3658else
3659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3660for as_dir in $PATH
3661do
3662 IFS=$as_save_IFS
3663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 break 2
3669 fi
3670done
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003673
3674fi
3675fi
3676ac_ct_CC=$ac_cv_prog_ac_ct_CC
3677if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3679$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003680else
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3682$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003683fi
3684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003685 if test "x$ac_ct_CC" = x; then
3686 CC=""
3687 else
3688 case $cross_compiling:$ac_tool_warned in
3689yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003690{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3691$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692ac_tool_warned=yes ;;
3693esac
3694 CC=$ac_ct_CC
3695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696else
3697 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003698fi
3699
Jack Jansendd19cf82001-12-06 22:36:17 +00003700if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 if test -n "$ac_tool_prefix"; then
3702 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003703set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003706if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003708else
3709 if test -n "$CC"; then
3710 ac_cv_prog_CC="$CC" # Let the user override the test.
3711else
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 break 2
3722 fi
3723done
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003726
3727fi
3728fi
3729CC=$ac_cv_prog_CC
3730if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3732$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003733else
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3735$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736fi
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740fi
3741if test -z "$CC"; then
3742 # Extract the first word of "cc", so it can be a program name with args.
3743set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3745$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003746if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003748else
3749 if test -n "$CC"; then
3750 ac_cv_prog_CC="$CC" # Let the user override the test.
3751else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3754for as_dir in $PATH
3755do
3756 IFS=$as_save_IFS
3757 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003759 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003760 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3761 ac_prog_rejected=yes
3762 continue
3763 fi
3764 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 break 2
3767 fi
3768done
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003770IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003771
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772if test $ac_prog_rejected = yes; then
3773 # We found a bogon in the path, so make sure we never use it.
3774 set dummy $ac_cv_prog_CC
3775 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003777 # We chose a different compiler from the bogus one.
3778 # However, it has the same basename, so the bogon will be chosen
3779 # first if we set CC to just the basename; use the full file name.
3780 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003781 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782 fi
3783fi
3784fi
3785fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003786CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797if test -z "$CC"; then
3798 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 do
3801 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3802set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003807else
3808 if test -n "$CC"; then
3809 ac_cv_prog_CC="$CC" # Let the user override the test.
3810else
Martin v. Löwis11437992002-04-12 09:54:03 +00003811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826fi
3827fi
3828CC=$ac_cv_prog_CC
3829if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3831$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003835fi
3836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$CC" && break
3839 done
3840fi
3841if test -z "$CC"; then
3842 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003844do
3845 # Extract the first word of "$ac_prog", so it can be a program name with args.
3846set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3848$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003849if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003851else
3852 if test -n "$ac_ct_CC"; then
3853 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3854else
3855as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856for as_dir in $PATH
3857do
3858 IFS=$as_save_IFS
3859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 break 2
3865 fi
3866done
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003869
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871fi
3872ac_ct_CC=$ac_cv_prog_ac_ct_CC
3873if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3875$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003876else
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3878$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003880
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 test -n "$ac_ct_CC" && break
3883done
Michael W. Hudson54241132001-12-07 15:38:26 +00003884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 if test "x$ac_ct_CC" = x; then
3886 CC=""
3887 else
3888 case $cross_compiling:$ac_tool_warned in
3889yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003890{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3891$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892ac_tool_warned=yes ;;
3893esac
3894 CC=$ac_ct_CC
3895 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003896fi
3897
3898fi
3899
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003903as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003904See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003905
3906# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003907$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3908set X $ac_compile
3909ac_compiler=$2
3910for ac_option in --version -v -V -qversion; do
3911 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912case "(($ac_try" in
3913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3914 *) ac_try_echo=$ac_try;;
3915esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003916eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3917$as_echo "$ac_try_echo"; } >&5
3918 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test -s conftest.err; then
3921 sed '10a\
3922... rest of stderr output deleted ...
3923 10q' conftest.err >conftest.er1
3924 cat conftest.er1 >&5
3925 fi
3926 rm -f conftest.er1 conftest.err
3927 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3928 test $ac_status = 0; }
3929done
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003932/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003933
Martin v. Löwis11437992002-04-12 09:54:03 +00003934int
3935main ()
3936{
3937
3938 ;
3939 return 0;
3940}
3941_ACEOF
3942ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003943ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003944# Try to create an executable without -o first, disregard a.out.
3945# It will help us diagnose broken compilers, and finding out an intuition
3946# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3948$as_echo_n "checking whether the C compiler works... " >&6; }
3949ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3950
3951# The possible output files:
3952ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954ac_rmfiles=
3955for ac_file in $ac_files
3956do
3957 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3960 esac
3961done
3962rm -f $ac_rmfiles
3963
Matthias Kloseb9621712010-04-24 17:59:49 +00003964if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3976# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3977# in a Makefile. We should not override ac_cv_exeext if it was cached,
3978# so that the user can short-circuit this test for compilers unknown to
3979# Autoconf.
3980for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003981do
3982 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985 ;;
3986 [ab].out )
3987 # We found the default executable, but exeext='' is most
3988 # certainly right.
3989 break;;
3990 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003992 then :; else
3993 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3994 fi
3995 # We set ac_cv_exeext here because the later test for it is not
3996 # safe: cross compilers may not add the suffix if given an `-o'
3997 # argument, so we may need to know it at that point already.
3998 # Even if this section looks crufty: it has the advantage of
3999 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000 break;;
4001 * )
4002 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004003 esac
4004done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005test "$ac_cv_exeext" = no && ac_cv_exeext=
4006
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004007else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 ac_file=''
4009fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004010if test -z "$ac_file"; then :
4011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4012$as_echo "no" >&6; }
4013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004014sed 's/^/| /' conftest.$ac_ext >&5
4015
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004018as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004019See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004020else
4021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4022$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4025$as_echo_n "checking for C compiler default output file name... " >&6; }
4026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4027$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004028ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004031ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4033$as_echo_n "checking for suffix of executables... " >&6; }
4034if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004035case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004039eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4040$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4046# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4047# work properly (i.e., refer to `conftest.exe'), while it won't with
4048# `rm'.
4049for ac_file in conftest.exe conftest conftest.*; do
4050 test -f "$ac_file" || continue
4051 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004053 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4054 break;;
4055 * ) break;;
4056 esac
4057done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004058else
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004061as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004062See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004064rm -f conftest conftest$ac_cv_exeext
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4066$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067
4068rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004069EXEEXT=$ac_cv_exeext
4070ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#include <stdio.h>
4074int
4075main ()
4076{
4077FILE *f = fopen ("conftest.out", "w");
4078 return ferror (f) || fclose (f) != 0;
4079
4080 ;
4081 return 0;
4082}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004084ac_clean_files="$ac_clean_files conftest.out"
4085# Check that the compiler produces executables we can run. If not, either
4086# the compiler is broken, or we cross compile.
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4088$as_echo_n "checking whether we are cross compiling... " >&6; }
4089if test "$cross_compiling" != yes; then
4090 { { ac_try="$ac_link"
4091case "(($ac_try" in
4092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4093 *) ac_try_echo=$ac_try;;
4094esac
4095eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4096$as_echo "$ac_try_echo"; } >&5
4097 (eval "$ac_link") 2>&5
4098 ac_status=$?
4099 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4100 test $ac_status = 0; }
4101 if { ac_try='./conftest$ac_cv_exeext'
4102 { { case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4107$as_echo "$ac_try_echo"; } >&5
4108 (eval "$ac_try") 2>&5
4109 ac_status=$?
4110 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4111 test $ac_status = 0; }; }; then
4112 cross_compiling=no
4113 else
4114 if test "$cross_compiling" = maybe; then
4115 cross_compiling=yes
4116 else
4117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004120If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004121See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 fi
4123 fi
4124fi
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4126$as_echo "$cross_compiling" >&6; }
4127
4128rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4129ac_clean_files=$ac_clean_files_save
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4131$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004132if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 $as_echo_n "(cached) " >&6
4134else
4135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136/* end confdefs.h. */
4137
4138int
4139main ()
4140{
4141
4142 ;
4143 return 0;
4144}
4145_ACEOF
4146rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004147if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148case "(($ac_try" in
4149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4150 *) ac_try_echo=$ac_try;;
4151esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004152eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4153$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004154 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004155 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4157 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 for ac_file in conftest.o conftest.obj conftest.*; do
4159 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4163 break;;
4164 esac
4165done
4166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004168sed 's/^/| /' conftest.$ac_ext >&5
4169
Matthias Kloseb9621712010-04-24 17:59:49 +00004170{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4171$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004172as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004173See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004175rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4178$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004179OBJEXT=$ac_cv_objext
4180ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4182$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004185else
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192#ifndef __GNUC__
4193 choke me
4194#endif
4195
4196 ;
4197 return 0;
4198}
4199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 ac_compiler_gnu=yes
4202else
Matthias Kloseb9621712010-04-24 17:59:49 +00004203 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004206ac_cv_c_compiler_gnu=$ac_compiler_gnu
4207
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4210$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4211if test $ac_compiler_gnu = yes; then
4212 GCC=yes
4213else
4214 GCC=
4215fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004216ac_test_CFLAGS=${CFLAGS+set}
4217ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4219$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004220if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004222else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223 ac_save_c_werror_flag=$ac_c_werror_flag
4224 ac_c_werror_flag=yes
4225 ac_cv_prog_cc_g=no
4226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004229
Martin v. Löwis11437992002-04-12 09:54:03 +00004230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240else
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 CFLAGS=""
4242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243/* end confdefs.h. */
4244
4245int
4246main ()
4247{
4248
4249 ;
4250 return 0;
4251}
4252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254
Matthias Kloseb9621712010-04-24 17:59:49 +00004255else
4256 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259/* end confdefs.h. */
4260
4261int
4262main ()
4263{
4264
4265 ;
4266 return 0;
4267}
4268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004269if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4277 ac_c_werror_flag=$ac_save_c_werror_flag
4278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4280$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004281if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004282 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004283elif test $ac_cv_prog_cc_g = yes; then
4284 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285 CFLAGS="-g -O2"
4286 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004287 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288 fi
4289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290 if test "$GCC" = yes; then
4291 CFLAGS="-O2"
4292 else
4293 CFLAGS=
4294 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4297$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004298if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004300else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004301 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004302ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
4305#include <stdarg.h>
4306#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004307struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4309struct buf { int x; };
4310FILE * (*rcsopen) (struct buf *, struct stat *, int);
4311static char *e (p, i)
4312 char **p;
4313 int i;
4314{
4315 return p[i];
4316}
4317static char *f (char * (*g) (char **, int), char **p, ...)
4318{
4319 char *s;
4320 va_list v;
4321 va_start (v,p);
4322 s = g (p, va_arg (v,int));
4323 va_end (v);
4324 return s;
4325}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326
4327/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4328 function prototypes and stuff, but not '\xHH' hex character constants.
4329 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004331 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4332 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004334int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4337 inside strings and character constants. */
4338#define FOO(x) 'x'
4339int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4340
Skip Montanaro6dead952003-09-25 14:50:04 +00004341int test (int i, double x);
4342struct s1 {int (*f) (int a);};
4343struct s2 {int (*f) (double a);};
4344int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4345int argc;
4346char **argv;
4347int
4348main ()
4349{
4350return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4351 ;
4352 return 0;
4353}
4354_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4356 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004357do
4358 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362rm -f core conftest.err conftest.$ac_objext
4363 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004364done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004366CC=$ac_save_CC
4367
4368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369# AC_CACHE_VAL
4370case "x$ac_cv_prog_cc_c89" in
4371 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4373$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4376$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004377 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4380$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004381esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004382if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004383
Matthias Kloseb9621712010-04-24 17:59:49 +00004384fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386ac_ext=c
4387ac_cpp='$CPP $CPPFLAGS'
4388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4390ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004391
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004393
4394
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4396$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004398# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004399if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004400 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004401
4402 case $withval in
4403 no) with_cxx_main=no
4404 MAINCC='$(CC)';;
4405 yes) with_cxx_main=yes
4406 MAINCC='$(CXX)';;
4407 *) with_cxx_main=yes
4408 MAINCC=$withval
4409 if test -z "$CXX"
4410 then
4411 CXX=$withval
4412 fi;;
4413 esac
4414else
4415
4416 with_cxx_main=no
4417 MAINCC='$(CC)'
4418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004419fi
4420
Matthias Kloseb9621712010-04-24 17:59:49 +00004421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4422$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004423
4424preset_cxx="$CXX"
4425if test -z "$CXX"
4426then
4427 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004428 gcc) if test -n "$ac_tool_prefix"; then
4429 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4430set dummy ${ac_tool_prefix}g++; ac_word=$2
4431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432$as_echo_n "checking for $ac_word... " >&6; }
4433if ${ac_cv_path_CXX+:} false; then :
4434 $as_echo_n "(cached) " >&6
4435else
4436 case $CXX in
4437 [\\/]* | ?:[\\/]*)
4438 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4439 ;;
4440 *)
4441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4442for as_dir in notfound
4443do
4444 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004447 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004448 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4449 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2
4451 fi
4452done
4453 done
4454IFS=$as_save_IFS
4455
4456 ;;
4457esac
4458fi
4459CXX=$ac_cv_path_CXX
4460if test -n "$CXX"; then
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4462$as_echo "$CXX" >&6; }
4463else
4464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465$as_echo "no" >&6; }
4466fi
4467
4468
4469fi
4470if test -z "$ac_cv_path_CXX"; then
4471 ac_pt_CXX=$CXX
4472 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004473set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004476if ${ac_cv_path_ac_pt_CXX+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478else
4479 case $ac_pt_CXX in
4480 [\\/]* | ?:[\\/]*)
4481 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4482 ;;
4483 *)
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485for as_dir in notfound
4486do
4487 IFS=$as_save_IFS
4488 test -z "$as_dir" && as_dir=.
4489 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004490 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004491 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4492 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493 break 2
4494 fi
4495done
4496 done
4497IFS=$as_save_IFS
4498
4499 ;;
4500esac
4501fi
4502ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4503if test -n "$ac_pt_CXX"; then
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4505$as_echo "$ac_pt_CXX" >&6; }
4506else
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4508$as_echo "no" >&6; }
4509fi
4510
4511 if test "x$ac_pt_CXX" = x; then
4512 CXX="g++"
4513 else
4514 case $cross_compiling:$ac_tool_warned in
4515yes:)
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4518ac_tool_warned=yes ;;
4519esac
4520 CXX=$ac_pt_CXX
4521 fi
4522else
4523 CXX="$ac_cv_path_CXX"
4524fi
4525 ;;
4526 cc) if test -n "$ac_tool_prefix"; then
4527 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4528set dummy ${ac_tool_prefix}c++; ac_word=$2
4529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4530$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004531if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004532 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004533else
4534 case $CXX in
4535 [\\/]* | ?:[\\/]*)
4536 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4537 ;;
4538 *)
4539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4540for as_dir in notfound
4541do
4542 IFS=$as_save_IFS
4543 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004546 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004548 break 2
4549 fi
4550done
Matthias Kloseb9621712010-04-24 17:59:49 +00004551 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004552IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554 ;;
4555esac
4556fi
4557CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004558if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4560$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004561else
Matthias Kloseb9621712010-04-24 17:59:49 +00004562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4563$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004565
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004566
4567fi
4568if test -z "$ac_cv_path_CXX"; then
4569 ac_pt_CXX=$CXX
4570 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004571set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4573$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004574if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004575 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004576else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004577 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004578 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004579 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580 ;;
4581 *)
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in notfound
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004589 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591 break 2
4592 fi
4593done
Matthias Kloseb9621712010-04-24 17:59:49 +00004594 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004597 ;;
4598esac
4599fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004600ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4601if test -n "$ac_pt_CXX"; then
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4603$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004604else
Matthias Kloseb9621712010-04-24 17:59:49 +00004605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4606$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004608
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004609 if test "x$ac_pt_CXX" = x; then
4610 CXX="c++"
4611 else
4612 case $cross_compiling:$ac_tool_warned in
4613yes:)
4614{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4615$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4616ac_tool_warned=yes ;;
4617esac
4618 CXX=$ac_pt_CXX
4619 fi
4620else
4621 CXX="$ac_cv_path_CXX"
4622fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004623 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004624 clang|*/clang) if test -n "$ac_tool_prefix"; then
4625 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4626set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_CXX+:} false; then :
4630 $as_echo_n "(cached) " >&6
4631else
4632 case $CXX in
4633 [\\/]* | ?:[\\/]*)
4634 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4635 ;;
4636 *)
4637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in notfound
4639do
4640 IFS=$as_save_IFS
4641 test -z "$as_dir" && as_dir=.
4642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004644 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646 break 2
4647 fi
4648done
4649 done
4650IFS=$as_save_IFS
4651
Ned Deilycbfb9a52012-06-23 16:02:19 -07004652 ;;
4653esac
4654fi
4655CXX=$ac_cv_path_CXX
4656if test -n "$CXX"; then
4657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4658$as_echo "$CXX" >&6; }
4659else
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664
4665fi
4666if test -z "$ac_cv_path_CXX"; then
4667 ac_pt_CXX=$CXX
4668 # Extract the first word of "clang++", so it can be a program name with args.
4669set dummy clang++; ac_word=$2
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4671$as_echo_n "checking for $ac_word... " >&6; }
4672if ${ac_cv_path_ac_pt_CXX+:} false; then :
4673 $as_echo_n "(cached) " >&6
4674else
4675 case $ac_pt_CXX in
4676 [\\/]* | ?:[\\/]*)
4677 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4678 ;;
4679 *)
4680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4681for as_dir in notfound
4682do
4683 IFS=$as_save_IFS
4684 test -z "$as_dir" && as_dir=.
4685 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004687 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4689 break 2
4690 fi
4691done
4692 done
4693IFS=$as_save_IFS
4694
4695 ;;
4696esac
4697fi
4698ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4699if test -n "$ac_pt_CXX"; then
4700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4701$as_echo "$ac_pt_CXX" >&6; }
4702else
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4704$as_echo "no" >&6; }
4705fi
4706
4707 if test "x$ac_pt_CXX" = x; then
4708 CXX="clang++"
4709 else
4710 case $cross_compiling:$ac_tool_warned in
4711yes:)
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4713$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4714ac_tool_warned=yes ;;
4715esac
4716 CXX=$ac_pt_CXX
4717 fi
4718else
4719 CXX="$ac_cv_path_CXX"
4720fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004721 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722 esac
4723 if test "$CXX" = "notfound"
4724 then
4725 CXX=""
4726 fi
4727fi
4728if test -z "$CXX"
4729then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004730 if test -n "$ac_tool_prefix"; then
4731 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4732 do
4733 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004737if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739else
4740 if test -n "$CXX"; then
4741 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4742else
4743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 break 2
4753 fi
4754done
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004756IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757
4758fi
4759fi
4760CXX=$ac_cv_prog_CXX
4761if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4763$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767fi
4768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004769
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004770 test -n "$CXX" && break
4771 done
4772fi
4773if test -z "$CXX"; then
4774 ac_ct_CXX=$CXX
4775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4776do
4777 # Extract the first word of "$ac_prog", so it can be a program name with args.
4778set dummy $ac_prog; ac_word=$2
4779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
4781if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 if test -n "$ac_ct_CXX"; then
4785 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4786else
4787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4788for as_dir in $PATH
4789do
4790 IFS=$as_save_IFS
4791 test -z "$as_dir" && as_dir=.
4792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794 ac_cv_prog_ac_ct_CXX="$ac_prog"
4795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4796 break 2
4797 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799 done
4800IFS=$as_save_IFS
4801
4802fi
4803fi
4804ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4805if test -n "$ac_ct_CXX"; then
4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4807$as_echo "$ac_ct_CXX" >&6; }
4808else
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4810$as_echo "no" >&6; }
4811fi
4812
4813
4814 test -n "$ac_ct_CXX" && break
4815done
4816
4817 if test "x$ac_ct_CXX" = x; then
4818 CXX="notfound"
4819 else
4820 case $cross_compiling:$ac_tool_warned in
4821yes:)
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4824ac_tool_warned=yes ;;
4825esac
4826 CXX=$ac_ct_CXX
4827 fi
4828fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829
4830 if test "$CXX" = "notfound"
4831 then
4832 CXX=""
4833 fi
4834fi
4835if test "$preset_cxx" != "$CXX"
4836then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004837 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838
4839 By default, distutils will build C++ extension modules with \"$CXX\".
4840 If this is not intended, then set CXX on the configure command line.
4841 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004842$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 By default, distutils will build C++ extension modules with \"$CXX\".
4845 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004846 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847fi
4848
4849
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4851$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4852save_LDFLAGS="$LDFLAGS"
4853LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004854
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4856/* end confdefs.h. */
4857
4858int
4859main ()
4860{
4861
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866if ac_fn_c_try_link "$LINENO"; then :
4867 NO_AS_NEEDED="-Wl,--no-as-needed"
4868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4869$as_echo "yes" >&6; }
4870else
4871 NO_AS_NEEDED=""
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875rm -f core conftest.err conftest.$ac_objext \
4876 conftest$ac_exeext conftest.$ac_ext
4877LDFLAGS="$save_LDFLAGS"
4878
4879
4880
4881# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004882ac_ext=c
4883ac_cpp='$CPP $CPPFLAGS'
4884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4888$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004889# On Suns, sometimes $CPP names a directory.
4890if test -n "$CPP" && test -d "$CPP"; then
4891 CPP=
4892fi
4893if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004894 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004896else
Martin v. Löwis11437992002-04-12 09:54:03 +00004897 # Double quotes because CPP needs to be expanded
4898 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4899 do
4900 ac_preproc_ok=false
4901for ac_c_preproc_warn_flag in '' yes
4902do
4903 # Use a header file that comes with gcc, so configuring glibc
4904 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004905 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4906 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004907 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004908 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004910/* end confdefs.h. */
4911#ifdef __STDC__
4912# include <limits.h>
4913#else
4914# include <assert.h>
4915#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004916 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004918if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004919
Matthias Kloseb9621712010-04-24 17:59:49 +00004920else
Martin v. Löwis11437992002-04-12 09:54:03 +00004921 # Broken: fails on valid input.
4922continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004923fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004924rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004925
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004926 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004927 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004930#include <ac_nonexistent.h>
4931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # Broken: success on invalid input.
4934continue
4935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Passes both tests.
4937ac_preproc_ok=:
4938break
4939fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004940rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004941
4942done
4943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004944rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004945if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 break
4947fi
4948
4949 done
4950 ac_cv_prog_CPP=$CPP
4951
4952fi
4953 CPP=$ac_cv_prog_CPP
4954else
4955 ac_cv_prog_CPP=$CPP
4956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4958$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004959ac_preproc_ok=false
4960for ac_c_preproc_warn_flag in '' yes
4961do
4962 # Use a header file that comes with gcc, so configuring glibc
4963 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004964 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4965 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004966 # On the NeXT, cc -E runs the code through the compiler's parser,
4967 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004969/* end confdefs.h. */
4970#ifdef __STDC__
4971# include <limits.h>
4972#else
4973# include <assert.h>
4974#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004975 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004977if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979else
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # Broken: fails on valid input.
4981continue
4982fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004983rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004986 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004989#include <ac_nonexistent.h>
4990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004992 # Broken: success on invalid input.
4993continue
4994else
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 # Passes both tests.
4996ac_preproc_ok=:
4997break
4998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004999rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005000
5001done
5002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005003rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005004if $ac_preproc_ok; then :
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006else
Matthias Kloseb9621712010-04-24 17:59:49 +00005007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005009as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005010See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005011fi
5012
5013ac_ext=c
5014ac_cpp='$CPP $CPPFLAGS'
5015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5017ac_compiler_gnu=$ac_cv_c_compiler_gnu
5018
5019
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5021$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005024else
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 # Loop through the user's path and test for each of PROGNAME-LIST
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_prog in grep ggrep; do
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005036 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005037# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 # Check for GNU $ac_path_GREP
5039case `"$ac_path_GREP" --version 2>&1` in
5040*GNU*)
5041 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5042*)
5043 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045 while :
5046 do
5047 cat "conftest.in" "conftest.in" >"conftest.tmp"
5048 mv "conftest.tmp" "conftest.in"
5049 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5052 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5055 # Best one so far, save it but keep looking for a better one
5056 ac_cv_path_GREP="$ac_path_GREP"
5057 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005058 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 # 10*(2^10) chars as input seems more than enough
5060 test $ac_count -gt 10 && break
5061 done
5062 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5063esac
5064
Matthias Kloseb9621712010-04-24 17:59:49 +00005065 $ac_path_GREP_found && break 3
5066 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005070 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005071 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073else
5074 ac_cv_path_GREP=$GREP
5075fi
5076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5079$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 GREP="$ac_cv_path_GREP"
5081
5082
Matthias Kloseb9621712010-04-24 17:59:49 +00005083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5084$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005085if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5089 then ac_cv_path_EGREP="$GREP -E"
5090 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005091 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 # Loop through the user's path and test for each of PROGNAME-LIST
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005099 for ac_prog in egrep; do
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005102 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005103# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104 # Check for GNU $ac_path_EGREP
5105case `"$ac_path_EGREP" --version 2>&1` in
5106*GNU*)
5107 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5108*)
5109 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005110 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005111 while :
5112 do
5113 cat "conftest.in" "conftest.in" >"conftest.tmp"
5114 mv "conftest.tmp" "conftest.in"
5115 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005117 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5118 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005120 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5121 # Best one so far, save it but keep looking for a better one
5122 ac_cv_path_EGREP="$ac_path_EGREP"
5123 ac_path_EGREP_max=$ac_count
5124 fi
5125 # 10*(2^10) chars as input seems more than enough
5126 test $ac_count -gt 10 && break
5127 done
5128 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5129esac
5130
Matthias Kloseb9621712010-04-24 17:59:49 +00005131 $ac_path_EGREP_found && break 3
5132 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005133 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005134 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005135IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005136 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005137 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005138 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005139else
5140 ac_cv_path_EGREP=$EGREP
5141fi
5142
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005143 fi
5144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5146$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005148
5149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5151$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
5154else
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005156/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005157#include <stdlib.h>
5158#include <stdarg.h>
5159#include <string.h>
5160#include <float.h>
5161
5162int
5163main ()
5164{
5165
5166 ;
5167 return 0;
5168}
5169_ACEOF
5170if ac_fn_c_try_compile "$LINENO"; then :
5171 ac_cv_header_stdc=yes
5172else
5173 ac_cv_header_stdc=no
5174fi
5175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5176
5177if test $ac_cv_header_stdc = yes; then
5178 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5180/* end confdefs.h. */
5181#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005182
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005183_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005185 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005186
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005187else
Matthias Kloseb9621712010-04-24 17:59:49 +00005188 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005189fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005190rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191
Matthias Kloseb9621712010-04-24 17:59:49 +00005192fi
5193
5194if test $ac_cv_header_stdc = yes; then
5195 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197/* end confdefs.h. */
5198#include <stdlib.h>
5199
5200_ACEOF
5201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5202 $EGREP "free" >/dev/null 2>&1; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f conftest*
5208
5209fi
5210
5211if test $ac_cv_header_stdc = yes; then
5212 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5213 if test "$cross_compiling" = yes; then :
5214 :
5215else
5216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5217/* end confdefs.h. */
5218#include <ctype.h>
5219#include <stdlib.h>
5220#if ((' ' & 0x0FF) == 0x020)
5221# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5222# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5223#else
5224# define ISLOWER(c) \
5225 (('a' <= (c) && (c) <= 'i') \
5226 || ('j' <= (c) && (c) <= 'r') \
5227 || ('s' <= (c) && (c) <= 'z'))
5228# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5229#endif
5230
5231#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5232int
5233main ()
5234{
5235 int i;
5236 for (i = 0; i < 256; i++)
5237 if (XOR (islower (i), ISLOWER (i))
5238 || toupper (i) != TOUPPER (i))
5239 return 2;
5240 return 0;
5241}
5242_ACEOF
5243if ac_fn_c_try_run "$LINENO"; then :
5244
5245else
5246 ac_cv_header_stdc=no
5247fi
5248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5249 conftest.$ac_objext conftest.beam conftest.$ac_ext
5250fi
5251
5252fi
5253fi
5254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5255$as_echo "$ac_cv_header_stdc" >&6; }
5256if test $ac_cv_header_stdc = yes; then
5257
5258$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5259
5260fi
5261
5262# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5263for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5264 inttypes.h stdint.h unistd.h
5265do :
5266 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5267ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5268"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005269if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005270 cat >>confdefs.h <<_ACEOF
5271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5272_ACEOF
5273
5274fi
5275
5276done
5277
5278
5279
5280 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005281if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005282 MINIX=yes
5283else
5284 MINIX=
5285fi
5286
5287
5288 if test "$MINIX" = yes; then
5289
5290$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5291
5292
5293$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5294
5295
5296$as_echo "#define _MINIX 1" >>confdefs.h
5297
5298 fi
5299
5300
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5302$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005303if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005304 $as_echo_n "(cached) " >&6
5305else
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307/* end confdefs.h. */
5308
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005309# define __EXTENSIONS__ 1
5310 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005311int
5312main ()
5313{
5314
5315 ;
5316 return 0;
5317}
5318_ACEOF
5319if ac_fn_c_try_compile "$LINENO"; then :
5320 ac_cv_safe_to_define___extensions__=yes
5321else
5322 ac_cv_safe_to_define___extensions__=no
5323fi
5324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5325fi
5326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5327$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5328 test $ac_cv_safe_to_define___extensions__ = yes &&
5329 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5330
5331 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5332
5333 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5334
5335 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5336
5337 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5338
5339
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341# Check for unsupported systems
5342case $ac_sys_system/$ac_sys_release in
5343atheos*|Linux*/1*)
5344 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5345 echo See README for details.
5346 exit 1;;
5347esac
5348
5349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5351$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352
5353# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005354if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355 withval=$with_suffix;
5356 case $withval in
5357 no) EXEEXT=;;
5358 yes) EXEEXT=.exe;;
5359 *) EXEEXT=$withval;;
5360 esac
5361fi
5362
Matthias Kloseb9621712010-04-24 17:59:49 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5364$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005365
5366# Test whether we're running on a non-case-sensitive system, in which
5367# case we give a warning if no ext is given
5368
Matthias Kloseb9621712010-04-24 17:59:49 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5370$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371if test ! -d CaseSensitiveTestDir; then
5372mkdir CaseSensitiveTestDir
5373fi
5374
5375if test -d casesensitivetestdir
5376then
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5378$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379 BUILDEXEEXT=.exe
5380else
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383 BUILDEXEEXT=$EXEEXT
5384fi
5385rmdir CaseSensitiveTestDir
5386
5387case $MACHDEP in
5388bsdos*)
5389 case $CC in
5390 gcc) CC="$CC -D_HAVE_BSDI";;
5391 esac;;
5392esac
5393
5394case $ac_sys_system in
5395hp*|HP*)
5396 case $CC in
5397 cc|*/cc) CC="$CC -Ae";;
5398 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399esac
5400
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005401MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5402
5403
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405
Matthias Kloseb9621712010-04-24 17:59:49 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5407$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408if test -z "$LIBRARY"
5409then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005410 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5413$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414
5415# LDLIBRARY is the name of the library to link against (as opposed to the
5416# name of the library into which to insert object files). BLDLIBRARY is also
5417# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5418# is blank as the main program is not linked directly against LDLIBRARY.
5419# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5420# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5421# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5422# DLLLIBRARY is the shared (i.e., DLL) library.
5423#
5424# RUNSHARED is used to run shared python without installed libraries
5425#
5426# INSTSONAME is the name of the shared library that will be use to install
5427# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005428#
5429# LDVERSION is the shared library version number, normally the Python version
5430# with the ABI build flags appended.
5431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432
5433
5434
5435
5436
5437
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439LDLIBRARY="$LIBRARY"
5440BLDLIBRARY='$(LDLIBRARY)'
5441INSTSONAME='$(LDLIBRARY)'
5442DLLLIBRARY=''
5443LDLIBRARYDIR=''
5444RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005445LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447# LINKCC is the command that links the python executable -- default is $(CC).
5448# If CXX is set, and if it is needed to link a main function that was
5449# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5450# python might then depend on the C++ runtime
5451# This is altered for AIX in order to build the export list before
5452# linking.
5453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5455$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456if test -z "$LINKCC"
5457then
5458 LINKCC='$(PURIFY) $(MAINCC)'
5459 case $ac_sys_system in
5460 AIX*)
5461 exp_extra="\"\""
5462 if test $ac_sys_release -ge 5 -o \
5463 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5464 exp_extra="."
5465 fi
5466 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005467 QNX*)
5468 # qcc must be used because the other compilers do not
5469 # support -N.
5470 LINKCC=qcc;;
5471 esac
5472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5474$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005475
5476# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5477# make sure we default having it set to "no": this is used by
5478# distutils.unixccompiler to know if it should add --enable-new-dtags
5479# to linker command lines, and failing to detect GNU ld simply results
5480# in the same bahaviour as before.
5481
Matthias Kloseb9621712010-04-24 17:59:49 +00005482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5483$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005484ac_prog=ld
5485if test "$GCC" = yes; then
5486 ac_prog=`$CC -print-prog-name=ld`
5487fi
5488case `"$ac_prog" -V 2>&1 < /dev/null` in
5489 *GNU*)
5490 GNULD=yes;;
5491 *)
5492 GNULD=no;;
5493esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5495$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005496
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5498$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005499if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500 $as_echo_n "(cached) " >&6
5501else
5502 ac_cv_c_inline=no
5503for ac_kw in inline __inline__ __inline; do
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#ifndef __cplusplus
5507typedef int foo_t;
5508static $ac_kw foo_t static_foo () {return 0; }
5509$ac_kw foo_t foo () {return 0; }
5510#endif
5511
5512_ACEOF
5513if ac_fn_c_try_compile "$LINENO"; then :
5514 ac_cv_c_inline=$ac_kw
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 test "$ac_cv_c_inline" != no && break
5518done
5519
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5522$as_echo "$ac_cv_c_inline" >&6; }
5523
5524case $ac_cv_c_inline in
5525 inline | yes) ;;
5526 *)
5527 case $ac_cv_c_inline in
5528 no) ac_val=;;
5529 *) ac_val=$ac_cv_c_inline;;
5530 esac
5531 cat >>confdefs.h <<_ACEOF
5532#ifndef __cplusplus
5533#define inline $ac_val
5534#endif
5535_ACEOF
5536 ;;
5537esac
5538
5539if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005540
5541$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005542
5543
5544fi
5545
5546
Matthias Kloseb9621712010-04-24 17:59:49 +00005547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5548$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005550if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005551 enableval=$enable_shared;
5552fi
5553
5554
5555if test -z "$enable_shared"
5556then
5557 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005558 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005559 enable_shared="yes";;
5560 *)
5561 enable_shared="no";;
5562 esac
5563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5565$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5568$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005570if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005571 enableval=$enable_profiling;
5572fi
5573
5574if test "x$enable_profiling" = xyes; then
5575 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005576 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578/* end confdefs.h. */
5579int main() { return 0; }
5580_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005581if ac_fn_c_try_link "$LINENO"; then :
5582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005584 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005586rm -f core conftest.err conftest.$ac_objext \
5587 conftest$ac_exeext conftest.$ac_ext
5588 CC="$ac_save_cc"
5589else
5590 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005591fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5593$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if test "x$enable_profiling" = xyes; then
5596 BASECFLAGS="-pg $BASECFLAGS"
5597 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598fi
5599
Matthias Kloseb9621712010-04-24 17:59:49 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5601$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
5603# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5604# library that we build, but we do not want to link against it (we
5605# will find it with a -framework option). For this reason there is an
5606# extra variable BLDLIBRARY against which Python and the extension
5607# modules are linked, BLDLIBRARY. This is normally the same as
5608# LDLIBRARY, but empty for MacOSX framework builds.
5609if test "$enable_framework"
5610then
5611 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005612 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 BLDLIBRARY=''
5614else
5615 BLDLIBRARY='$(LDLIBRARY)'
5616fi
5617
5618# Other platforms follow
5619if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005620 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621
Matthias Kloseb9621712010-04-24 17:59:49 +00005622$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623
5624 case $ac_sys_system in
5625 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).dll.a'
5627 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628 ;;
5629 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
5631 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005632 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005634 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005635 then
5636 PY3LIBRARY=libpython3.so
5637 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005639 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).so'
5641 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005642 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 case $ac_sys_system in
5644 FreeBSD*)
5645 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5646 ;;
5647 esac
5648 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005649 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005650 then
5651 PY3LIBRARY=libpython3.so
5652 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 ;;
5654 hp*|HP*)
5655 case `uname -m` in
5656 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005657 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658 ;;
5659 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005660 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 ;;
5662 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005663 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005664 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005667 LDLIBRARY='libpython$(LDVERSION).dylib'
5668 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005669 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005671 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005672 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005673 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005674 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676 esac
5677else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005678 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 case $ac_sys_system in
5680 CYGWIN*)
5681 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005682 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 ;;
5684 esac
5685fi
5686
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005687if test "$cross_compiling" = yes; then
5688 RUNSHARED=
5689fi
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5692$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694if test -n "$ac_tool_prefix"; then
5695 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5696set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005699if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701else
5702 if test -n "$RANLIB"; then
5703 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714 break 2
5715 fi
5716done
Matthias Kloseb9621712010-04-24 17:59:49 +00005717 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718IFS=$as_save_IFS
5719
5720fi
5721fi
5722RANLIB=$ac_cv_prog_RANLIB
5723if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5725$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726else
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005729fi
5730
5731
5732fi
5733if test -z "$ac_cv_prog_RANLIB"; then
5734 ac_ct_RANLIB=$RANLIB
5735 # Extract the first word of "ranlib", so it can be a program name with args.
5736set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5738$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005739if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005740 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741else
5742 if test -n "$ac_ct_RANLIB"; then
5743 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5744else
5745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5746for as_dir in $PATH
5747do
5748 IFS=$as_save_IFS
5749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 break 2
5755 fi
5756done
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758IFS=$as_save_IFS
5759
5760fi
5761fi
5762ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5763if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5765$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766else
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
5770
5771 if test "x$ac_ct_RANLIB" = x; then
5772 RANLIB=":"
5773 else
5774 case $cross_compiling:$ac_tool_warned in
5775yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_tool_warned=yes ;;
5779esac
5780 RANLIB=$ac_ct_RANLIB
5781 fi
5782else
5783 RANLIB="$ac_cv_prog_RANLIB"
5784fi
5785
5786
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005787if test -n "$ac_tool_prefix"; then
5788 for ac_prog in ar aal
5789 do
5790 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5791set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005794if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005795 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796else
5797 if test -n "$AR"; then
5798 ac_cv_prog_AR="$AR" # Let the user override the test.
5799else
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 break 2
5810 fi
5811done
Matthias Kloseb9621712010-04-24 17:59:49 +00005812 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813IFS=$as_save_IFS
5814
5815fi
5816fi
5817AR=$ac_cv_prog_AR
5818if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5820$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824fi
5825
5826
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005827 test -n "$AR" && break
5828 done
5829fi
5830if test -z "$AR"; then
5831 ac_ct_AR=$AR
5832 for ac_prog in ar aal
5833do
5834 # Extract the first word of "$ac_prog", so it can be a program name with args.
5835set dummy $ac_prog; ac_word=$2
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5837$as_echo_n "checking for $ac_word... " >&6; }
5838if ${ac_cv_prog_ac_ct_AR+:} false; then :
5839 $as_echo_n "(cached) " >&6
5840else
5841 if test -n "$ac_ct_AR"; then
5842 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5843else
5844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
5849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005851 ac_cv_prog_ac_ct_AR="$ac_prog"
5852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5853 break 2
5854 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005856 done
5857IFS=$as_save_IFS
5858
5859fi
5860fi
5861ac_ct_AR=$ac_cv_prog_ac_ct_AR
5862if test -n "$ac_ct_AR"; then
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5864$as_echo "$ac_ct_AR" >&6; }
5865else
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871 test -n "$ac_ct_AR" && break
5872done
5873
5874 if test "x$ac_ct_AR" = x; then
5875 AR="ar"
5876 else
5877 case $cross_compiling:$ac_tool_warned in
5878yes:)
5879{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5880$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5881ac_tool_warned=yes ;;
5882esac
5883 AR=$ac_ct_AR
5884 fi
5885fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887
5888# tweak ARFLAGS only if the user didn't set it on the command line
5889
5890if test -z "$ARFLAGS"
5891then
5892 ARFLAGS="rc"
5893fi
5894
doko@ubuntu.com58844492012-06-30 18:25:32 +02005895if test -n "$ac_tool_prefix"; then
5896 for ac_prog in readelf
5897 do
5898 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5899set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_prog_READELF+:} false; then :
5903 $as_echo_n "(cached) " >&6
5904else
5905 if test -n "$READELF"; then
5906 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5907else
5908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005915 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917 break 2
5918 fi
5919done
5920 done
5921IFS=$as_save_IFS
5922
5923fi
5924fi
5925READELF=$ac_cv_prog_READELF
5926if test -n "$READELF"; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5928$as_echo "$READELF" >&6; }
5929else
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935 test -n "$READELF" && break
5936 done
5937fi
5938if test -z "$READELF"; then
5939 ac_ct_READELF=$READELF
5940 for ac_prog in readelf
5941do
5942 # Extract the first word of "$ac_prog", so it can be a program name with args.
5943set dummy $ac_prog; ac_word=$2
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
5946if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5947 $as_echo_n "(cached) " >&6
5948else
5949 if test -n "$ac_ct_READELF"; then
5950 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
5957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005959 ac_cv_prog_ac_ct_READELF="$ac_prog"
5960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5961 break 2
5962 fi
5963done
5964 done
5965IFS=$as_save_IFS
5966
5967fi
5968fi
5969ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5970if test -n "$ac_ct_READELF"; then
5971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5972$as_echo "$ac_ct_READELF" >&6; }
5973else
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
5976fi
5977
5978
5979 test -n "$ac_ct_READELF" && break
5980done
5981
5982 if test "x$ac_ct_READELF" = x; then
5983 READELF=":"
5984 else
5985 case $cross_compiling:$ac_tool_warned in
5986yes:)
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5988$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5989ac_tool_warned=yes ;;
5990esac
5991 READELF=$ac_ct_READELF
5992 fi
5993fi
5994
5995if test "$cross_compiling" = yes; then
5996 case "$READELF" in
5997 readelf|:)
5998 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5999 ;;
6000 esac
6001fi
6002
6003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
Matthias Klosec4c48422012-10-21 23:05:35 +02006005for ac_prog in python$PACKAGE_VERSION python3 python
6006do
6007 # Extract the first word of "$ac_prog", so it can be a program name with args.
6008set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6010$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006011if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006012 $as_echo_n "(cached) " >&6
6013else
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 if test -n "$PYTHON"; then
6015 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006016else
6017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6018for as_dir in $PATH
6019do
6020 IFS=$as_save_IFS
6021 test -z "$as_dir" && as_dir=.
6022 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006024 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6026 break 2
6027 fi
6028done
6029 done
6030IFS=$as_save_IFS
6031
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006032fi
6033fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006034PYTHON=$ac_cv_prog_PYTHON
6035if test -n "$PYTHON"; then
6036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6037$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006038else
6039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
6041fi
6042
6043
Matthias Klosec4c48422012-10-21 23:05:35 +02006044 test -n "$PYTHON" && break
6045done
6046test -n "$PYTHON" || PYTHON="not-found"
6047
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006048if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006049 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6050else
6051 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052fi
6053
6054
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055case $MACHDEP in
6056bsdos*|hp*|HP*)
6057 # install -d does not work on BSDI or HP-UX
6058 if test -z "$INSTALL"
6059 then
6060 INSTALL="${srcdir}/install-sh -c"
6061 fi
6062esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063# Find a good install program. We prefer a C program (faster),
6064# so one script is as good as another. But avoid the broken or
6065# incompatible versions:
6066# SysV /etc/install, /usr/sbin/install
6067# SunOS /usr/etc/install
6068# IRIX /sbin/install
6069# AIX /bin/install
6070# AmigaOS /C/install, which installs bootblocks on floppy discs
6071# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6072# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6073# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6074# OS/2's system install, which has a completely different semantic
6075# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006076# Reject install programs that cannot install multiple files.
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6078$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006080if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006081 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006082else
6083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH
6085do
6086 IFS=$as_save_IFS
6087 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 # Account for people who put trailing slashes in PATH elements.
6089case $as_dir/ in #((
6090 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006092 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093 /usr/ucb/* ) ;;
6094 *)
6095 # OSF1 and SCO ODT 3.0 have their own names for install.
6096 # Don't use installbsd from OSF since it installs stuff as root
6097 # by default.
6098 for ac_prog in ginstall scoinst install; do
6099 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006100 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101 if test $ac_prog = install &&
6102 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6103 # AIX install. It has an incompatible calling convention.
6104 :
6105 elif test $ac_prog = install &&
6106 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6107 # program-specific install script used by HP pwplus--don't use.
6108 :
6109 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006110 rm -rf conftest.one conftest.two conftest.dir
6111 echo one > conftest.one
6112 echo two > conftest.two
6113 mkdir conftest.dir
6114 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6115 test -s conftest.one && test -s conftest.two &&
6116 test -s conftest.dir/conftest.one &&
6117 test -s conftest.dir/conftest.two
6118 then
6119 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6120 break 3
6121 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122 fi
6123 fi
6124 done
6125 done
6126 ;;
6127esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006128
6129 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130IFS=$as_save_IFS
6131
Matthias Kloseb9621712010-04-24 17:59:49 +00006132rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133
6134fi
6135 if test "${ac_cv_path_install+set}" = set; then
6136 INSTALL=$ac_cv_path_install
6137 else
6138 # As a last resort, use the slow shell script. Don't cache a
6139 # value for INSTALL within a source directory, because that will
6140 # break other packages using the cache if that directory is
6141 # removed, or if the value is a relative name.
6142 INSTALL=$ac_install_sh
6143 fi
6144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6146$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147
6148# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6149# It thinks the first close brace ends the variable substitution.
6150test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6151
6152test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6153
6154test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6155
Matthias Klose93a0ef12012-03-15 18:08:34 +01006156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6157$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6158if test -z "$MKDIR_P"; then
6159 if ${ac_cv_path_mkdir+:} false; then :
6160 $as_echo_n "(cached) " >&6
6161else
6162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6163for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6164do
6165 IFS=$as_save_IFS
6166 test -z "$as_dir" && as_dir=.
6167 for ac_prog in mkdir gmkdir; do
6168 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006169 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006170 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6171 'mkdir (GNU coreutils) '* | \
6172 'mkdir (coreutils) '* | \
6173 'mkdir (fileutils) '4.1*)
6174 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6175 break 3;;
6176 esac
6177 done
6178 done
6179 done
6180IFS=$as_save_IFS
6181
6182fi
6183
6184 test -d ./--version && rmdir ./--version
6185 if test "${ac_cv_path_mkdir+set}" = set; then
6186 MKDIR_P="$ac_cv_path_mkdir -p"
6187 else
6188 # As a last resort, use the slow shell script. Don't cache a
6189 # value for MKDIR_P within a source directory, because that will
6190 # break other packages using the cache if that directory is
6191 # removed, or if the value is a relative name.
6192 MKDIR_P="$ac_install_sh -d"
6193 fi
6194fi
6195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6196$as_echo "$MKDIR_P" >&6; }
6197
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198
6199# Not every filesystem supports hard links
6200
6201if test -z "$LN" ; then
6202 case $ac_sys_system in
6203 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 *) LN=ln;;
6205 esac
6206fi
6207
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006208# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006209
6210ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6214$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215
6216# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006217if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 withval=$with_pydebug;
6219if test "$withval" != no
6220then
6221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223
Matthias Kloseb9621712010-04-24 17:59:49 +00006224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6225$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006227 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006228else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230fi
6231else
Matthias Kloseb9621712010-04-24 17:59:49 +00006232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6233$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234fi
6235
6236
6237# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6238# merged with this chunk of code?
6239
6240# Optimizer/debugger flags
6241# ------------------------
6242# (The following bit of code is complicated enough - please keep things
6243# indented properly. Just pretend you're editing Python code. ;-)
6244
6245# There are two parallel sets of case statements below, one that checks to
6246# see if OPT was set and one that does BASECFLAGS setting based upon
6247# compiler and platform. BASECFLAGS tweaks need to be made even if the
6248# user set OPT.
6249
6250# tweak OPT based on compiler and platform, only if the user didn't set
6251# it on the command line
6252
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006253if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254then
6255 case $GCC in
6256 yes)
6257 if test "$CC" != 'g++' ; then
6258 STRICT_PROTO="-Wstrict-prototypes"
6259 fi
6260 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6261 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6262 WRAP="-fwrapv"
6263 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006264
6265 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006266 case $CC in
6267 *clang*) WRAP="-fwrapv"
6268 ;;
6269 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006270
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271 case $ac_cv_prog_cc_g in
6272 yes)
6273 if test "$Py_DEBUG" = 'true' ; then
6274 # Optimization messes up debuggers, so turn it off for
6275 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006276 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 else
6278 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6279 fi
6280 ;;
6281 *)
6282 OPT="-O3 -Wall $STRICT_PROTO"
6283 ;;
6284 esac
6285 case $ac_sys_system in
6286 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6287 ;;
6288 esac
6289 ;;
6290
6291 *)
6292 OPT="-O"
6293 ;;
6294 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295fi
6296
6297
6298
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300# The -arch flags for universal builds on OSX
6301UNIVERSAL_ARCH_FLAGS=
6302
6303
6304# tweak BASECFLAGS based on compiler and platform
6305case $GCC in
6306yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006307 # Python doesn't violate C99 aliasing rules, but older versions of
6308 # GCC produce warnings for legal Python code. Enable
6309 # -fno-strict-aliasing on versions of GCC that support but produce
6310 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6312$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313 ac_save_cc="$CC"
6314 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006316 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006318else
Matthias Kloseb9621712010-04-24 17:59:49 +00006319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006321
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006323int
6324main ()
6325{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006326
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006327 ;
6328 return 0;
6329}
Matthias Kloseb159a552010-04-25 21:00:44 +00006330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006332if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006333
6334 CC="$ac_save_cc -fstrict-aliasing"
6335 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006337/* end confdefs.h. */
6338
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006339 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006340int
6341main ()
6342{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006343double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006344 ;
6345 return 0;
6346}
Matthias Kloseb159a552010-04-25 21:00:44 +00006347
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006349if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006350
6351 ac_cv_no_strict_aliasing=no
6352
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006353else
Matthias Kloseb159a552010-04-25 21:00:44 +00006354
6355 ac_cv_no_strict_aliasing=yes
6356
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006357fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006359
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006360else
Matthias Kloseb159a552010-04-25 21:00:44 +00006361
6362 ac_cv_no_strict_aliasing=no
6363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006366fi
6367
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006368 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006369 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6371$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006372 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373 then
6374 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6375 fi
6376
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6378$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6379 ac_save_cc="$CC"
6380 CC="$CC -Wunused-result -Werror"
6381 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006382 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006383 $as_echo_n "(cached) " >&6
6384else
6385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6386/* end confdefs.h. */
6387
6388
6389int
6390main ()
6391{
6392
6393 ;
6394 return 0;
6395}
6396
6397_ACEOF
6398if ac_fn_c_try_compile "$LINENO"; then :
6399
6400 ac_cv_disable_unused_result_warning=yes
6401
6402else
6403
6404 ac_cv_disable_unused_result_warning=no
6405
6406fi
6407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6408fi
6409
6410 CFLAGS="$save_CFLAGS"
6411 CC="$ac_save_cc"
6412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6413$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6414
6415 if test $ac_cv_disable_unused_result_warning = yes
6416 then
6417 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6418 fi
6419
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6421$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6422 ac_save_cc="$CC"
6423 CC="$CC -Werror=declaration-after-statement"
6424 save_CFLAGS="$CFLAGS"
6425 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6426 $as_echo_n "(cached) " >&6
6427else
6428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6429/* end confdefs.h. */
6430
6431
6432int
6433main ()
6434{
6435
6436 ;
6437 return 0;
6438}
6439
6440_ACEOF
6441if ac_fn_c_try_compile "$LINENO"; then :
6442
6443 ac_cv_declaration_after_statement_warning=yes
6444
6445else
6446
6447 ac_cv_declaration_after_statement_warning=no
6448
6449fi
6450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6451fi
6452
6453 CFLAGS="$save_CFLAGS"
6454 CC="$ac_save_cc"
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6456$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6457
6458 if test $ac_cv_declaration_after_statement_warning = yes
6459 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006460 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006461 fi
6462
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6464 # support. Without this, treatment of subnormals doesn't follow
6465 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006466 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006467 alpha*)
6468 BASECFLAGS="$BASECFLAGS -mieee"
6469 ;;
6470 esac
6471
6472 case $ac_sys_system in
6473 SCO_SV*)
6474 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6475 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006476
6477 # is there any other compiler on Darwin besides gcc?
6478 Darwin*)
6479 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6480 # used to be here, but non-Apple gcc doesn't accept them.
6481 if test "${CC}" = gcc
6482 then
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006484$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006485 case "${UNIVERSALSDK}" in
6486 */MacOSX10.4u.sdk)
6487 # Build using 10.4 SDK, force usage of gcc when the
6488 # compiler is gcc, otherwise the user will get very
6489 # confusing error messages when building on OSX 10.6
6490 CC=gcc-4.0
6491 CPP=cpp-4.0
6492 ;;
6493 esac
6494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006495$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006496 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497
Ned Deily87adb6e2013-10-18 21:09:56 -07006498 if test "${enable_universalsdk}"
6499 then
6500 case "$UNIVERSAL_ARCHS" in
6501 32-bit)
6502 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6503 LIPO_32BIT_FLAGS=""
6504 ARCH_RUN_32BIT=""
6505 ;;
6506 64-bit)
6507 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6508 LIPO_32BIT_FLAGS=""
6509 ARCH_RUN_32BIT="true"
6510 ;;
6511 all)
6512 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6513 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6514 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6515 ;;
6516 intel)
6517 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6518 LIPO_32BIT_FLAGS="-extract i386"
6519 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6520 ;;
6521 intel-32)
6522 UNIVERSAL_ARCH_FLAGS="-arch i386"
6523 LIPO_32BIT_FLAGS=""
6524 ARCH_RUN_32BIT=""
6525 ;;
6526 3-way)
6527 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6528 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6529 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6530 ;;
6531 *)
6532 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6533 ;;
6534 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535
Ned Deily87adb6e2013-10-18 21:09:56 -07006536 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6537 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6538 if test "${UNIVERSALSDK}" != "/"
6539 then
6540 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6541 fi
6542 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
Ned Deily87adb6e2013-10-18 21:09:56 -07006544 # Calculate an appropriate deployment target for this build:
6545 # The deployment target value is used explicitly to enable certain
6546 # features are enabled (such as builtin libedit support for readline)
6547 # through the use of Apple's Availabiliy Macros and is used as a
6548 # component of the string returned by distutils.get_platform().
6549 #
6550 # Use the value from:
6551 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6552 # 2. the operating system version of the build machine if >= 10.6
6553 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6554 # below to pick either 10.3, 10.4, or 10.5 as the target.
6555 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556
Ned Deily87adb6e2013-10-18 21:09:56 -07006557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6558$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006559 cur_target_major=`sw_vers -productVersion | \
6560 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6561 cur_target_minor=`sw_vers -productVersion | \
6562 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6563 cur_target="${cur_target_major}.${cur_target_minor}"
6564 if test ${cur_target_major} -eq 10 && \
6565 test ${cur_target_minor} -ge 3 && \
6566 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006567 then
Ned Deily36820b62014-06-25 13:44:22 -07006568 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006569 cur_target=10.3
6570 if test ${enable_universalsdk}
6571 then
6572 case "$UNIVERSAL_ARCHS" in
6573 all|3-way|intel|64-bit)
6574 # These configurations were first supported in 10.5
6575 cur_target='10.5'
6576 ;;
6577 esac
6578 else
6579 if test `/usr/bin/arch` = "i386"
6580 then
6581 # 10.4 was the first release to support Intel archs
6582 cur_target="10.4"
6583 fi
6584 fi
6585 fi
6586 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006587
Ned Deily87adb6e2013-10-18 21:09:56 -07006588 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6589 # environment with a value that is the same as what we'll use
6590 # in the Makefile to ensure that we'll get the same compiler
6591 # environment during configure and build time.
6592 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6593 export MACOSX_DEPLOYMENT_TARGET
6594 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6596$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006597
Ned Deily87adb6e2013-10-18 21:09:56 -07006598 # end of Darwin* tests
6599 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006600 esac
6601 ;;
6602
6603*)
6604 case $ac_sys_system in
6605 OpenUNIX*|UnixWare*)
6606 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6607 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608 SCO_SV*)
6609 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6610 ;;
6611 esac
6612 ;;
6613esac
6614
6615if test "$Py_DEBUG" = 'true'; then
6616 :
6617else
6618 OPT="-DNDEBUG $OPT"
6619fi
6620
6621if test "$ac_arch_flags"
6622then
6623 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6624fi
6625
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626# On some compilers, pthreads are available without further options
6627# (e.g. MacOS X). On some of these systems, the compiler will not
6628# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6629# So we have to see first whether pthreads are available without
6630# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6632$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006633if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006634 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635else
Matthias Kloseb9621712010-04-24 17:59:49 +00006636 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637 ac_cv_pthread_is_default=no
6638else
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640/* end confdefs.h. */
6641
Stefan Krah7dba5942012-11-22 22:49:11 +01006642#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006643#include <pthread.h>
6644
6645void* routine(void* p){return NULL;}
6646
6647int main(){
6648 pthread_t p;
6649 if(pthread_create(&p,NULL,routine,NULL)!=0)
6650 return 1;
6651 (void)pthread_detach(p);
6652 return 0;
6653}
6654
6655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006656if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006657
6658 ac_cv_pthread_is_default=yes
6659 ac_cv_kthread=no
6660 ac_cv_pthread=no
6661
6662else
Matthias Kloseb9621712010-04-24 17:59:49 +00006663 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667fi
6668
6669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006670fi
6671
Matthias Kloseb9621712010-04-24 17:59:49 +00006672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6673$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674
6675
6676if test $ac_cv_pthread_is_default = yes
6677then
6678 ac_cv_kpthread=no
6679else
6680# -Kpthread, if available, provides the right #defines
6681# and linker options to make pthread_create available
6682# Some compilers won't report that they do not support -Kpthread,
6683# so we need to run a program to see whether it really made the
6684# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6686$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006687if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006688 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006689else
6690 ac_save_cc="$CC"
6691CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006692if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693 ac_cv_kpthread=no
6694else
Matthias Kloseb9621712010-04-24 17:59:49 +00006695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696/* end confdefs.h. */
6697
Stefan Krah7dba5942012-11-22 22:49:11 +01006698#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699#include <pthread.h>
6700
6701void* routine(void* p){return NULL;}
6702
6703int main(){
6704 pthread_t p;
6705 if(pthread_create(&p,NULL,routine,NULL)!=0)
6706 return 1;
6707 (void)pthread_detach(p);
6708 return 0;
6709}
6710
6711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006712if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713 ac_cv_kpthread=yes
6714else
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006719fi
6720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721CC="$ac_save_cc"
6722fi
6723
Matthias Kloseb9621712010-04-24 17:59:49 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6725$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726fi
6727
6728if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6729then
6730# -Kthread, if available, provides the right #defines
6731# and linker options to make pthread_create available
6732# Some compilers won't report that they do not support -Kthread,
6733# so we need to run a program to see whether it really made the
6734# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6736$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006737if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006738 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739else
6740 ac_save_cc="$CC"
6741CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006742if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006743 ac_cv_kthread=no
6744else
Matthias Kloseb9621712010-04-24 17:59:49 +00006745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746/* end confdefs.h. */
6747
Stefan Krah7dba5942012-11-22 22:49:11 +01006748#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749#include <pthread.h>
6750
6751void* routine(void* p){return NULL;}
6752
6753int main(){
6754 pthread_t p;
6755 if(pthread_create(&p,NULL,routine,NULL)!=0)
6756 return 1;
6757 (void)pthread_detach(p);
6758 return 0;
6759}
6760
6761_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006762if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763 ac_cv_kthread=yes
6764else
Matthias Kloseb9621712010-04-24 17:59:49 +00006765 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6768 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769fi
6770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006771CC="$ac_save_cc"
6772fi
6773
Matthias Kloseb9621712010-04-24 17:59:49 +00006774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6775$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006776fi
6777
6778if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6779then
6780# -pthread, if available, provides the right #defines
6781# and linker options to make pthread_create available
6782# Some compilers won't report that they do not support -pthread,
6783# so we need to run a program to see whether it really made the
6784# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6786$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006787if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006788 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789else
6790 ac_save_cc="$CC"
6791CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006792if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793 ac_cv_pthread=no
6794else
Matthias Kloseb9621712010-04-24 17:59:49 +00006795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006796/* end confdefs.h. */
6797
Stefan Krah7dba5942012-11-22 22:49:11 +01006798#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799#include <pthread.h>
6800
6801void* routine(void* p){return NULL;}
6802
6803int main(){
6804 pthread_t p;
6805 if(pthread_create(&p,NULL,routine,NULL)!=0)
6806 return 1;
6807 (void)pthread_detach(p);
6808 return 0;
6809}
6810
6811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006812if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813 ac_cv_pthread=yes
6814else
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819fi
6820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006821CC="$ac_save_cc"
6822fi
6823
Matthias Kloseb9621712010-04-24 17:59:49 +00006824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6825$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
6827
6828# If we have set a CC compiler flag for thread support then
6829# check if it works for CXX, too.
6830ac_cv_cxx_thread=no
6831if test ! -z "$CXX"
6832then
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6834$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835ac_save_cxx="$CXX"
6836
6837if test "$ac_cv_kpthread" = "yes"
6838then
6839 CXX="$CXX -Kpthread"
6840 ac_cv_cxx_thread=yes
6841elif test "$ac_cv_kthread" = "yes"
6842then
6843 CXX="$CXX -Kthread"
6844 ac_cv_cxx_thread=yes
6845elif test "$ac_cv_pthread" = "yes"
6846then
6847 CXX="$CXX -pthread"
6848 ac_cv_cxx_thread=yes
6849fi
6850
6851if test $ac_cv_cxx_thread = yes
6852then
6853 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6854 $CXX -c conftest.$ac_ext 2>&5
6855 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6856 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6857 then
6858 ac_cv_cxx_thread=yes
6859 else
6860 ac_cv_cxx_thread=no
6861 fi
6862 rm -fr conftest*
6863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6865$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866fi
6867CXX="$ac_save_cxx"
6868
6869
6870# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6872$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006873if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875else
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877/* end confdefs.h. */
6878#include <stdlib.h>
6879#include <stdarg.h>
6880#include <string.h>
6881#include <float.h>
6882
6883int
6884main ()
6885{
6886
6887 ;
6888 return 0;
6889}
6890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006891if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892 ac_cv_header_stdc=yes
6893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6897
6898if test $ac_cv_header_stdc = yes; then
6899 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901/* end confdefs.h. */
6902#include <string.h>
6903
6904_ACEOF
6905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006906 $EGREP "memchr" >/dev/null 2>&1; then :
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908else
6909 ac_cv_header_stdc=no
6910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006911rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912
6913fi
6914
6915if test $ac_cv_header_stdc = yes; then
6916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006918/* end confdefs.h. */
6919#include <stdlib.h>
6920
6921_ACEOF
6922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006923 $EGREP "free" >/dev/null 2>&1; then :
6924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006925else
6926 ac_cv_header_stdc=no
6927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006928rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929
6930fi
6931
6932if test $ac_cv_header_stdc = yes; then
6933 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935 :
6936else
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006938/* end confdefs.h. */
6939#include <ctype.h>
6940#include <stdlib.h>
6941#if ((' ' & 0x0FF) == 0x020)
6942# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6943# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6944#else
6945# define ISLOWER(c) \
6946 (('a' <= (c) && (c) <= 'i') \
6947 || ('j' <= (c) && (c) <= 'r') \
6948 || ('s' <= (c) && (c) <= 'z'))
6949# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6950#endif
6951
6952#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6953int
6954main ()
6955{
6956 int i;
6957 for (i = 0; i < 256; i++)
6958 if (XOR (islower (i), ISLOWER (i))
6959 || toupper (i) != TOUPPER (i))
6960 return 2;
6961 return 0;
6962}
6963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964if ac_fn_c_try_run "$LINENO"; then :
6965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6970 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971fi
6972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973fi
6974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6976$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977if test $ac_cv_header_stdc = yes; then
6978
Matthias Kloseb9621712010-04-24 17:59:49 +00006979$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980
6981fi
6982
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006983for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006984fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02006985ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006986sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006987unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006988poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006989sys/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 +01006990sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006991sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006992sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006993sys/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 -07006994libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01006995bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
6996sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006997do :
6998 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6999ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007000if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007001 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007002#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007003_ACEOF
7004
7005fi
7006
Guido van Rossum627b2d71993-12-24 10:39:16 +00007007done
7008
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007010for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007011 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7013$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007014if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007015 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007016else
Matthias Kloseb9621712010-04-24 17:59:49 +00007017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007019#include <sys/types.h>
7020#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007021
Martin v. Löwis11437992002-04-12 09:54:03 +00007022int
7023main ()
7024{
7025if ((DIR *) 0)
7026return 0;
7027 ;
7028 return 0;
7029}
7030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007031if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007032 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007033else
Matthias Kloseb9621712010-04-24 17:59:49 +00007034 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007038eval ac_res=\$$as_ac_Header
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7040$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007041if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007042 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007043#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007044_ACEOF
7045
7046ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007047fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007049done
7050# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7051if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7053$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007054if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007055 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007056else
Martin v. Löwis11437992002-04-12 09:54:03 +00007057 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061/* Override any GCC internal prototype to avoid an error.
7062 Use char because int might match the return type of a GCC
7063 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007064#ifdef __cplusplus
7065extern "C"
7066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007067char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007068int
7069main ()
7070{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007072 ;
7073 return 0;
7074}
7075_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076for ac_lib in '' dir; do
7077 if test -z "$ac_lib"; then
7078 ac_res="none required"
7079 else
7080 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007081 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007083 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007085fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007086rm -f core conftest.err conftest.$ac_objext \
7087 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007088 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007091done
Victor Stinnere0be4232011-10-25 13:06:09 +02007092if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007093
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094else
7095 ac_cv_search_opendir=no
7096fi
7097rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007098LIBS=$ac_func_search_save_LIBS
7099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7101$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007103if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007104 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007105
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007106fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007107
Michael W. Hudson54241132001-12-07 15:38:26 +00007108else
Matthias Kloseb9621712010-04-24 17:59:49 +00007109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7110$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007111if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007113else
7114 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007118/* Override any GCC internal prototype to avoid an error.
7119 Use char because int might match the return type of a GCC
7120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007121#ifdef __cplusplus
7122extern "C"
7123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007124char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007125int
7126main ()
7127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007128return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007129 ;
7130 return 0;
7131}
7132_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007133for ac_lib in '' x; do
7134 if test -z "$ac_lib"; then
7135 ac_res="none required"
7136 else
7137 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007138 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007139 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007140 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007142fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007143rm -f core conftest.err conftest.$ac_objext \
7144 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007145 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148done
Victor Stinnere0be4232011-10-25 13:06:09 +02007149if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151else
7152 ac_cv_search_opendir=no
7153fi
7154rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007155LIBS=$ac_func_search_save_LIBS
7156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7158$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007160if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007161 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007163fi
7164
7165fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007166
Matthias Kloseb9621712010-04-24 17:59:49 +00007167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7168$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007169if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007173/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007174#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007175int
7176main ()
7177{
7178return makedev(0, 0);
7179 ;
7180 return 0;
7181}
7182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007184 ac_cv_header_sys_types_h_makedev=yes
7185else
Matthias Kloseb9621712010-04-24 17:59:49 +00007186 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007187fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007188rm -f core conftest.err conftest.$ac_objext \
7189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007190
7191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7193$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007194
7195if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007196ac_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 +02007197if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007198
Matthias Kloseb9621712010-04-24 17:59:49 +00007199$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007200
7201fi
7202
7203
7204
7205 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007206 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 +02007207if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007210
7211fi
7212
7213
7214 fi
7215fi
7216
Michael W. Hudson54241132001-12-07 15:38:26 +00007217
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007218# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7219for ac_header in net/if.h
7220do :
7221 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7222#ifdef STDC_HEADERS
7223# include <stdlib.h>
7224# include <stddef.h>
7225#else
7226# ifdef HAVE_STDLIB_H
7227# include <stdlib.h>
7228# endif
7229#endif
7230#ifdef HAVE_SYS_SOCKET_H
7231# include <sys/socket.h>
7232#endif
7233
7234"
Victor Stinnere0be4232011-10-25 13:06:09 +02007235if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007236 cat >>confdefs.h <<_ACEOF
7237#define HAVE_NET_IF_H 1
7238_ACEOF
7239
7240fi
7241
7242done
7243
7244
Martin v. Löwis11017b12006-01-14 18:12:57 +00007245# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007246for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007247do :
7248 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 +00007249#ifdef HAVE_ASM_TYPES_H
7250#include <asm/types.h>
7251#endif
7252#ifdef HAVE_SYS_SOCKET_H
7253#include <sys/socket.h>
7254#endif
7255
Matthias Kloseb9621712010-04-24 17:59:49 +00007256"
Victor Stinnere0be4232011-10-25 13:06:09 +02007257if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007258 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007259#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007260_ACEOF
7261
7262fi
7263
7264done
7265
7266
Charles-François Natali47413c12011-10-06 19:47:44 +02007267# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007268for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007269do :
7270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7271ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7272#ifdef HAVE_SYS_SOCKET_H
7273#include <sys/socket.h>
7274#endif
7275
7276"
7277if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7278 cat >>confdefs.h <<_ACEOF
7279#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7280_ACEOF
7281
7282fi
7283
7284done
7285
7286
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007288was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7290$as_echo_n "checking for clock_t in time.h... " >&6; }
7291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007292/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007293#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007294
7295_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007296if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007298 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007299else
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
7301
Matthias Kloseb9621712010-04-24 17:59:49 +00007302$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007303
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007304
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007306rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007307
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7309$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007310
Matthias Kloseb9621712010-04-24 17:59:49 +00007311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7312$as_echo_n "checking for makedev... " >&6; }
7313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007314/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007315
Jesus Cea740f53a2010-04-28 11:35:30 +00007316#if defined(MAJOR_IN_MKDEV)
7317#include <sys/mkdev.h>
7318#elif defined(MAJOR_IN_SYSMACROS)
7319#include <sys/sysmacros.h>
7320#else
7321#include <sys/types.h>
7322#endif
7323
Neal Norwitz11690112002-07-30 01:08:28 +00007324int
7325main ()
7326{
Jesus Cea740f53a2010-04-28 11:35:30 +00007327
7328 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007329 ;
7330 return 0;
7331}
Matthias Kloseb159a552010-04-25 21:00:44 +00007332
Neal Norwitz11690112002-07-30 01:08:28 +00007333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007334if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007335 ac_cv_has_makedev=yes
7336else
Matthias Kloseb9621712010-04-24 17:59:49 +00007337 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007338fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007339rm -f core conftest.err conftest.$ac_objext \
7340 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7342$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007343if test "$ac_cv_has_makedev" = "yes"; then
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007346
7347fi
7348
Christian Heimes985ecdc2013-11-20 11:46:18 +01007349# byte swapping
7350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7351$as_echo_n "checking for le64toh... " >&6; }
7352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7353/* end confdefs.h. */
7354
7355#ifdef HAVE_ENDIAN_H
7356#include <endian.h>
7357#elif defined(HAVE_SYS_ENDIAN_H)
7358#include <sys/endian.h>
7359#endif
7360
7361int
7362main ()
7363{
7364
7365 le64toh(1)
7366 ;
7367 return 0;
7368}
7369
7370_ACEOF
7371if ac_fn_c_try_link "$LINENO"; then :
7372 ac_cv_has_le64toh=yes
7373else
7374 ac_cv_has_le64toh=no
7375fi
7376rm -f core conftest.err conftest.$ac_objext \
7377 conftest$ac_exeext conftest.$ac_ext
7378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7379$as_echo "$ac_cv_has_le64toh" >&6; }
7380if test "$ac_cv_has_le64toh" = "yes"; then
7381
7382$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7383
7384fi
7385
Martin v. Löwis399a6892002-10-04 10:22:02 +00007386# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7387# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7388# defined, but the compiler does not support pragma redefine_extname,
7389# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7390# structures (such as rlimit64) without declaring them. As a
7391# work-around, disable LFS on such configurations
7392
7393use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7395$as_echo_n "checking Solaris LFS bug... " >&6; }
7396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007398
7399#define _LARGEFILE_SOURCE 1
7400#define _FILE_OFFSET_BITS 64
7401#include <sys/resource.h>
7402
Martin v. Löwis399a6892002-10-04 10:22:02 +00007403int
7404main ()
7405{
7406struct rlimit foo;
7407 ;
7408 return 0;
7409}
7410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007411if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412 sol_lfs_bug=no
7413else
Matthias Kloseb9621712010-04-24 17:59:49 +00007414 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7418$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007419if test "$sol_lfs_bug" = "yes"; then
7420 use_lfs=no
7421fi
7422
7423if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007424# Two defines needed to enable largefile support on various platforms
7425# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007426case $ac_sys_system/$ac_sys_release in
7427AIX*)
7428
7429$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7430
7431 ;;
7432esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007435
7436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007438
Martin v. Löwis399a6892002-10-04 10:22:02 +00007439fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007440
Guido van Rossum84e7b241996-08-19 21:59:00 +00007441# Add some code to confdefs.h so that the test for off_t works on SCO
7442cat >> confdefs.h <<\EOF
7443#if defined(SCO_DS)
7444#undef _OFF_T
7445#endif
7446EOF
7447
Guido van Rossumef2255b2000-03-10 22:30:29 +00007448# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007449ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007450if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452else
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454cat >>confdefs.h <<_ACEOF
7455#define mode_t int
7456_ACEOF
7457
7458fi
7459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007461if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007463else
Martin v. Löwis11437992002-04-12 09:54:03 +00007464
7465cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007466#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007467_ACEOF
7468
7469fi
7470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007472if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007474else
Martin v. Löwis11437992002-04-12 09:54:03 +00007475
7476cat >>confdefs.h <<_ACEOF
7477#define pid_t int
7478_ACEOF
7479
7480fi
7481
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007482
Martin v. Löwis11437992002-04-12 09:54:03 +00007483cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007484#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007486
Matthias Kloseb9621712010-04-24 17:59:49 +00007487ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007488if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007489
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007490else
Martin v. Löwis11437992002-04-12 09:54:03 +00007491
7492cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007493#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007494_ACEOF
7495
7496fi
7497
Matthias Kloseb9621712010-04-24 17:59:49 +00007498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7499$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007500if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007502else
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007506
7507_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007510 ac_cv_type_uid_t=yes
7511else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007512 ac_cv_type_uid_t=no
7513fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007514rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007515
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7518$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007519if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520
Matthias Kloseb9621712010-04-24 17:59:49 +00007521$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007522
7523
Matthias Kloseb9621712010-04-24 17:59:49 +00007524$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007525
7526fi
7527
Mark Dickinson983bc162012-12-02 12:11:38 +00007528
7529# There are two separate checks for each of the exact-width integer types we
7530# need. First we check whether the type is available using the usual
7531# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7532# and <stdint.h> where available). We then also use the special type checks of
7533# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7534# directly, #define's uint32_t to be a suitable type.
7535
7536ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7537if test "x$ac_cv_type_uint32_t" = xyes; then :
7538
7539$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7540
7541fi
7542
Matthias Kloseb9621712010-04-24 17:59:49 +00007543ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7544case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007545 no|yes) ;; #(
7546 *)
7547
Matthias Kloseb9621712010-04-24 17:59:49 +00007548$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007549
7550
7551cat >>confdefs.h <<_ACEOF
7552#define uint32_t $ac_cv_c_uint32_t
7553_ACEOF
7554;;
7555 esac
7556
Mark Dickinson983bc162012-12-02 12:11:38 +00007557
7558ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7559if test "x$ac_cv_type_uint64_t" = xyes; then :
7560
7561$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7562
7563fi
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7566case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007567 no|yes) ;; #(
7568 *)
7569
Matthias Kloseb9621712010-04-24 17:59:49 +00007570$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007571
7572
7573cat >>confdefs.h <<_ACEOF
7574#define uint64_t $ac_cv_c_uint64_t
7575_ACEOF
7576;;
7577 esac
7578
Mark Dickinson983bc162012-12-02 12:11:38 +00007579
7580ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7581if test "x$ac_cv_type_int32_t" = xyes; then :
7582
7583$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7584
7585fi
7586
Matthias Kloseb9621712010-04-24 17:59:49 +00007587ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7588case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007589 no|yes) ;; #(
7590 *)
7591
7592cat >>confdefs.h <<_ACEOF
7593#define int32_t $ac_cv_c_int32_t
7594_ACEOF
7595;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007596esac
7597
Mark Dickinson983bc162012-12-02 12:11:38 +00007598
7599ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7600if test "x$ac_cv_type_int64_t" = xyes; then :
7601
7602$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7603
7604fi
7605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7607case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007608 no|yes) ;; #(
7609 *)
7610
7611cat >>confdefs.h <<_ACEOF
7612#define int64_t $ac_cv_c_int64_t
7613_ACEOF
7614;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007615esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007616
Mark Dickinson983bc162012-12-02 12:11:38 +00007617
Matthias Kloseb9621712010-04-24 17:59:49 +00007618ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007619if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620
Matthias Kloseb9621712010-04-24 17:59:49 +00007621$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007622
7623fi
7624
Stefan Krah1919b7e2012-03-21 18:25:23 +01007625ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7626if test "x$ac_cv_type___uint128_t" = xyes; then :
7627
7628$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7629
7630fi
7631
Jack Jansendd19cf82001-12-06 22:36:17 +00007632
Michael W. Hudson54241132001-12-07 15:38:26 +00007633# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007634# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007635# The cast to long int works around a bug in the HP C Compiler
7636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7640$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007641if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007643else
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 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 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646else
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 if test "$ac_cv_type_int" = yes; then
7648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007650as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007652 else
7653 ac_cv_sizeof_int=0
7654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656
Martin v. Löwis11437992002-04-12 09:54:03 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7659$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660
7661
7662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007664#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007665_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007666
7667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668# The cast to long int works around a bug in the HP C Compiler
7669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7673$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007674if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 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 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 if test "$ac_cv_type_long" = yes; then
7681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007683as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007684See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 else
7686 ac_cv_sizeof_long=0
7687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007689
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7692$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693
7694
7695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007697#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007698_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007699
7700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701# The cast to long int works around a bug in the HP C Compiler
7702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7706$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007707if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 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 +00007711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 if test "$ac_cv_type_void_p" = yes; then
7714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007716as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007717See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718 else
7719 ac_cv_sizeof_void_p=0
7720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007722
Martin v. Löwis11437992002-04-12 09:54:03 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7725$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726
7727
7728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007730#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007731_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007732
7733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734# The cast to long int works around a bug in the HP C Compiler
7735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7739$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007740if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007741 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007742else
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 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 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 if test "$ac_cv_type_short" = yes; then
7747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007749as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751 else
7752 ac_cv_sizeof_short=0
7753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007755
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7758$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007759
7760
7761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007763#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007764_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007765
7766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007767# The cast to long int works around a bug in the HP C Compiler
7768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7772$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007773if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 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 +00007777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778else
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 if test "$ac_cv_type_float" = yes; then
7780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007782as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007783See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784 else
7785 ac_cv_sizeof_float=0
7786 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007788
Martin v. Löwis11437992002-04-12 09:54:03 +00007789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7791$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007792
7793
7794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007796#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007797_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007798
7799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007800# The cast to long int works around a bug in the HP C Compiler
7801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7803# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7805$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007806if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 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 +00007810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811else
Matthias Kloseb9621712010-04-24 17:59:49 +00007812 if test "$ac_cv_type_double" = yes; then
7813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007815as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007816See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817 else
7818 ac_cv_sizeof_double=0
7819 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007821
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7824$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825
7826
7827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007829#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007830_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007831
7832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007833# The cast to long int works around a bug in the HP C Compiler
7834# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7835# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7836# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7838$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007839if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007840 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007841else
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 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 +00007843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844else
Matthias Kloseb9621712010-04-24 17:59:49 +00007845 if test "$ac_cv_type_fpos_t" = yes; then
7846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007848as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007849See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007850 else
7851 ac_cv_sizeof_fpos_t=0
7852 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7857$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858
7859
7860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007862#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007863_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007864
Michael W. Hudson54241132001-12-07 15:38:26 +00007865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007866# The cast to long int works around a bug in the HP C Compiler
7867# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7868# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7869# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7871$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007872if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007874else
Matthias Kloseb9621712010-04-24 17:59:49 +00007875 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 +00007876
Martin v. Löwis18e16552006-02-15 17:27:45 +00007877else
Matthias Kloseb9621712010-04-24 17:59:49 +00007878 if test "$ac_cv_type_size_t" = yes; then
7879 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007881as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007882See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007883 else
7884 ac_cv_sizeof_size_t=0
7885 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007886fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007887
Martin v. Löwis18e16552006-02-15 17:27:45 +00007888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7890$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891
7892
7893
Martin v. Löwis18e16552006-02-15 17:27:45 +00007894cat >>confdefs.h <<_ACEOF
7895#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7896_ACEOF
7897
7898
Christian Heimes400adb02008-02-01 08:12:03 +00007899# The cast to long int works around a bug in the HP C Compiler
7900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7902# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7904$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007905if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007906 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007907else
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 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 +00007909
Christian Heimes400adb02008-02-01 08:12:03 +00007910else
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 if test "$ac_cv_type_pid_t" = yes; then
7912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007914as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007915See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007916 else
7917 ac_cv_sizeof_pid_t=0
7918 fi
7919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920
Christian Heimes400adb02008-02-01 08:12:03 +00007921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7923$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007924
7925
7926
7927cat >>confdefs.h <<_ACEOF
7928#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7929_ACEOF
7930
7931
Michael W. Hudson54241132001-12-07 15:38:26 +00007932
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7934$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007935have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007937/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007938
Martin v. Löwis11437992002-04-12 09:54:03 +00007939int
7940main ()
7941{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007942long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ;
7944 return 0;
7945}
7946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007948
7949
Matthias Kloseb9621712010-04-24 17:59:49 +00007950$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007951
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007952 have_long_long=yes
7953
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7957$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007958if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959# The cast to long int works around a bug in the HP C Compiler
7960# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7961# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7962# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7964$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007965if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 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 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970else
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 if test "$ac_cv_type_long_long" = yes; then
7972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007974as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007975See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976 else
7977 ac_cv_sizeof_long_long=0
7978 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980
Martin v. Löwis11437992002-04-12 09:54:03 +00007981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7983$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984
7985
7986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007988#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007989_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007990
Michael W. Hudson54241132001-12-07 15:38:26 +00007991
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007992fi
7993
Matthias Kloseb9621712010-04-24 17:59:49 +00007994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7995$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007996have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007998/* end confdefs.h. */
7999
8000int
8001main ()
8002{
8003long double x; x = (long double)0;
8004 ;
8005 return 0;
8006}
8007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008008if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008009
8010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008012
8013 have_long_double=yes
8014
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008015fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8018$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008019if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008020# The cast to long int works around a bug in the HP C Compiler
8021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8023# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8025$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 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 +00008030
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008031else
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 if test "$ac_cv_type_long_double" = yes; then
8033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008035as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008036See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008037 else
8038 ac_cv_sizeof_long_double=0
8039 fi
8040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8044$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008045
8046
8047
8048cat >>confdefs.h <<_ACEOF
8049#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8050_ACEOF
8051
8052
8053fi
8054
8055
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8057$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008058have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008060/* end confdefs.h. */
8061
8062int
8063main ()
8064{
8065_Bool x; x = (_Bool)0;
8066 ;
8067 return 0;
8068}
8069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008070if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008071
8072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008074
8075 have_c99_bool=yes
8076
Thomas Woutersb2137042007-02-01 18:02:27 +00008077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8080$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008081if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082# The cast to long int works around a bug in the HP C Compiler
8083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8087$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008088if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 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 +00008092
Thomas Woutersb2137042007-02-01 18:02:27 +00008093else
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 if test "$ac_cv_type__Bool" = yes; then
8095 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008097as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008098See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008099 else
8100 ac_cv_sizeof__Bool=0
8101 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103
Thomas Woutersb2137042007-02-01 18:02:27 +00008104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8106$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008107
8108
8109
Thomas Woutersb2137042007-02-01 18:02:27 +00008110cat >>confdefs.h <<_ACEOF
8111#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8112_ACEOF
8113
8114
8115fi
8116
Matthias Kloseb9621712010-04-24 17:59:49 +00008117ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008118 #include <stdint.h>
8119 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008120 #ifdef HAVE_INTTYPES_H
8121 #include <inttypes.h>
8122 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008123"
Victor Stinnere0be4232011-10-25 13:06:09 +02008124if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008125
8126cat >>confdefs.h <<_ACEOF
8127#define HAVE_UINTPTR_T 1
8128_ACEOF
8129
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130# The cast to long int works around a bug in the HP C Compiler
8131# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8132# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8133# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8135$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008136if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 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 +00008140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141else
Matthias Kloseb9621712010-04-24 17:59:49 +00008142 if test "$ac_cv_type_uintptr_t" = yes; then
8143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008145as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008146See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147 else
8148 ac_cv_sizeof_uintptr_t=0
8149 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008150fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008151
Martin v. Löwis11437992002-04-12 09:54:03 +00008152fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8154$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008155
8156
8157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008159#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008161
Michael W. Hudson54241132001-12-07 15:38:26 +00008162
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008163fi
8164
Thomas Wouters89f507f2006-12-13 04:49:30 +00008165
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008166# The cast to long int works around a bug in the HP C Compiler
8167# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8168# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8169# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8171$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008173 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008176#ifdef HAVE_SYS_TYPES_H
8177#include <sys/types.h>
8178#endif
8179
Matthias Kloseb9621712010-04-24 17:59:49 +00008180"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 if test "$ac_cv_type_off_t" = yes; then
8184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008186as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008187See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008188 else
8189 ac_cv_sizeof_off_t=0
8190 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8195$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008196
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008197
8198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008200#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008202
Michael W. Hudson54241132001-12-07 15:38:26 +00008203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8206$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008207if test "$have_long_long" = yes
8208then
8209if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008210 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211
Matthias Kloseb9621712010-04-24 17:59:49 +00008212$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008213
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8215$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008216else
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8218$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008219fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008220else
Matthias Kloseb9621712010-04-24 17:59:49 +00008221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8222$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008223fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008224
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8230$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235#ifdef HAVE_SYS_TYPES_H
8236#include <sys/types.h>
8237#endif
8238#ifdef HAVE_TIME_H
8239#include <time.h>
8240#endif
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008244else
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 if test "$ac_cv_type_time_t" = yes; then
8246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008248as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008249See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008250 else
8251 ac_cv_sizeof_time_t=0
8252 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008254
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8257$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008259
8260
Martin v. Löwis11437992002-04-12 09:54:03 +00008261cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008262#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008263_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008264
Michael W. Hudson54241132001-12-07 15:38:26 +00008265
8266
Trent Mick635f6fb2000-08-23 21:33:05 +00008267# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008268ac_save_cc="$CC"
8269if test "$ac_cv_kpthread" = "yes"
8270then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008271elif test "$ac_cv_kthread" = "yes"
8272then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008273elif test "$ac_cv_pthread" = "yes"
8274then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008275fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008276
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8278$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008279have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008282
8283 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008284int
8285main ()
8286{
Guido van Rossum12580492000-09-24 16:47:19 +00008287pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 ;
8289 return 0;
8290}
Matthias Kloseb159a552010-04-25 21:00:44 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008293if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008294 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8298$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008299if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8303# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8305$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008306if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008308else
Matthias Kloseb9621712010-04-24 17:59:49 +00008309 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008310#ifdef HAVE_PTHREAD_H
8311#include <pthread.h>
8312#endif
8313
Matthias Kloseb9621712010-04-24 17:59:49 +00008314"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008315
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008316else
Matthias Kloseb9621712010-04-24 17:59:49 +00008317 if test "$ac_cv_type_pthread_t" = yes; then
8318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008320as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008321See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008322 else
8323 ac_cv_sizeof_pthread_t=0
8324 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326
Trent Mick635f6fb2000-08-23 21:33:05 +00008327fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8329$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008330
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008331
8332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008334#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008336
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008337
Trent Mick635f6fb2000-08-23 21:33:05 +00008338fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008339CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008340
Michael W. Hudson54241132001-12-07 15:38:26 +00008341
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008342case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008343 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008344 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8345 ;;
8346 Darwin/*)
8347 OTHER_LIBTOOL_OPT=""
8348 ;;
8349esac
8350
8351
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008352
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008353case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008354 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008355 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8356 if test "${enable_universalsdk}"; then
8357 :
8358 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008359 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008360 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008361 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008362 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008363 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008364 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008365 if test ${gcc_version} '<' 4.0
8366 then
8367 LIBTOOL_CRUFT="-lcc_dynamic"
8368 else
8369 LIBTOOL_CRUFT=""
8370 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008371 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008372 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008373else
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008375/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008376
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008377 #include <unistd.h>
8378 int main(int argc, char*argv[])
8379 {
8380 if (sizeof(long) == 4) {
8381 return 0;
8382 } else {
8383 return 1;
8384 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008385 }
8386
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008388if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008389 ac_osx_32bit=yes
8390else
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008395fi
8396
8397
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008398 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008399 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008400 i386)
8401 MACOSX_DEFAULT_ARCH="i386"
8402 ;;
8403 ppc)
8404 MACOSX_DEFAULT_ARCH="ppc"
8405 ;;
8406 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008407 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008408 ;;
8409 esac
8410 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008411 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008412 i386)
8413 MACOSX_DEFAULT_ARCH="x86_64"
8414 ;;
8415 ppc)
8416 MACOSX_DEFAULT_ARCH="ppc64"
8417 ;;
8418 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008419 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008420 ;;
8421 esac
8422
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008423 fi
8424
8425 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008426 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008427 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008428esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8430$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008431if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008432then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008433 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008434 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008435 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008438
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8440$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008441 if test $enable_shared = "yes"
8442 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008443 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 +00008444 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008445else
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008448fi
8449
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8451$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008452case $ac_sys_system/$ac_sys_release in
8453 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8458$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008459 ;;
8460 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008463 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008464esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008465
Guido van Rossum0a516c91994-09-12 10:58:40 +00008466# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008467
Michael W. Hudson54241132001-12-07 15:38:26 +00008468
8469
8470
8471
Benjamin Peterson99f03762010-04-11 22:15:28 +00008472
Thomas Wouters477c8d52006-05-27 19:21:47 +00008473
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008474# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8475# -- usually .so, .sl on HP-UX, .dll on Cygwin
8476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8477$as_echo_n "checking the extension of shared libraries... " >&6; }
8478if test -z "$SHLIB_SUFFIX"; then
8479 case $ac_sys_system in
8480 hp*|HP*)
8481 case `uname -m` in
8482 ia64) SHLIB_SUFFIX=.so;;
8483 *) SHLIB_SUFFIX=.sl;;
8484 esac
8485 ;;
8486 CYGWIN*) SHLIB_SUFFIX=.dll;;
8487 *) SHLIB_SUFFIX=.so;;
8488 esac
8489fi
8490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8491$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008492
Guido van Rossum0a516c91994-09-12 10:58:40 +00008493# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008494# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008495# (Shared libraries in this instance are shared modules to be loaded into
8496# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8498$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008499if test -z "$LDSHARED"
8500then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008502 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008503 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008504 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008505 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008506 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008507 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008508 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008509 if test "$GCC" = "yes" ; then
8510 LDSHARED='$(CC) -shared'
8511 LDCXXSHARED='$(CXX) -shared'
8512 else
8513 LDSHARED='$(CC) -G'
8514 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008515 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008516 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008517 if test "$GCC" = "yes" ; then
8518 LDSHARED='$(CC) -shared'
8519 LDCXXSHARED='$(CXX) -shared'
8520 else
8521 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008522 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008523 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008524 LDSHARED='$(CC) -bundle'
8525 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008526 if test "$enable_framework" ; then
8527 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008528 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8529 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008530 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008531 else
8532 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008533 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008534 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008535 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008536 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008537 LDSHARED='$(CC) -bundle'
8538 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008539 if test "$enable_framework" ; then
8540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008543 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008544 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008545 # No framework, use the Python app as bundle-loader
8546 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008547 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008548 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008549 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008550 Darwin/*)
8551 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8552 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008553
Ned Deily36820b62014-06-25 13:44:22 -07008554 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8555 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8556 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8557 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8558 if test ${dep_target_major} -eq 10 && \
8559 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008560 then
Ned Deily36820b62014-06-25 13:44:22 -07008561 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008562 LDSHARED='$(CC) -bundle'
8563 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008564 if test "$enable_framework" ; then
8565 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008566 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8567 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008568 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008569 else
8570 # No framework, use the Python app as bundle-loader
8571 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8572 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008573 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008574 fi
Ned Deily36820b62014-06-25 13:44:22 -07008575 else
8576 # building for OS X 10.3 and later
8577 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8578 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8579 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008580 fi
8581 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008582 Linux*|GNU*|QNX*)
8583 LDSHARED='$(CC) -shared'
8584 LDCXXSHARED='$(CXX) -shared';;
8585 BSD/OS*/4*)
8586 LDSHARED="gcc -shared"
8587 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008588 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008589 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008590 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008591 LDSHARED='$(CC) -shared'
8592 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008593 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008594 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008595 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008596 OpenBSD*)
8597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8598 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008599 LDSHARED='$(CC) -shared $(CCSHARED)'
8600 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008601 else
8602 case `uname -r` in
8603 [01].* | 2.[0-7] | 2.[0-7].*)
8604 LDSHARED="ld -Bshareable ${LDFLAGS}"
8605 ;;
8606 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008607 LDSHARED='$(CC) -shared $(CCSHARED)'
8608 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008609 ;;
8610 esac
8611 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008612 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008613 LDSHARED='$(CC) -shared'
8614 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008615 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008616 if test "$GCC" = "yes" ; then
8617 LDSHARED='$(CC) -shared'
8618 LDCXXSHARED='$(CXX) -shared'
8619 else
8620 LDSHARED='$(CC) -G'
8621 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008622 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008623 SCO_SV*)
8624 LDSHARED='$(CC) -Wl,-G,-Bexport'
8625 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8626 CYGWIN*)
8627 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8628 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008629 *) LDSHARED="ld";;
8630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8633$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008634LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008635BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008636# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008637# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8639$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008640if test -z "$CCSHARED"
8641then
Guido van Rossum07397971997-04-29 21:49:50 +00008642 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008643 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008644 then CCSHARED="-fPIC";
8645 elif test `uname -p` = sparc;
8646 then CCSHARED="-xcode=pic32";
8647 else CCSHARED="-Kpic";
8648 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008649 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008650 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008651 else CCSHARED="+z";
8652 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008653 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008654 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008655 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008656 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008657 if test "$GCC" = "yes"
8658 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008659 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008660 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008661 SCO_SV*)
8662 if test "$GCC" = "yes"
8663 then CCSHARED="-fPIC"
8664 else CCSHARED="-Kpic -belf"
8665 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008666 IRIX*/6*) case $CC in
8667 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008668 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008669 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008670 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8673$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008674# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008675# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8677$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008678if test -z "$LINKFORSHARED"
8679then
Guido van Rossum07397971997-04-29 21:49:50 +00008680 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008681 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008682 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008683 LINKFORSHARED="-Wl,-E -Wl,+s";;
8684# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008685 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008686 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008689 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008690
8691 # Issue #18075: the default maximum stack size (8MBytes) is too
8692 # small for the default recursion limit. Increase the stack size
8693 # to ensure that tests don't crash
8694 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8695
Jack Jansene578a632001-08-15 01:27:14 +00008696 if test "$enable_framework"
8697 then
Jack Jansenda49e192005-01-07 13:08:22 +00008698 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008699 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008700 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008701 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008702 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008703 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008704 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008705 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8706 then
8707 LINKFORSHARED="-Wl,--export-dynamic"
8708 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008709 SunOS/5*) case $CC in
8710 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008711 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008712 then
8713 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008714 fi;;
8715 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008716 CYGWIN*)
8717 if test $enable_shared = "no"
8718 then
8719 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8720 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008721 QNX*)
8722 # -Wl,-E causes the symbols to be added to the dynamic
8723 # symbol table so that they can be found when a module
8724 # is loaded. -N 2048K causes the stack size to be set
8725 # to 2048 kilobytes so that the stack doesn't overflow
8726 # when running test_compile.py.
8727 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8731$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008732
Michael W. Hudson54241132001-12-07 15:38:26 +00008733
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008734
Matthias Kloseb9621712010-04-24 17:59:49 +00008735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8736$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008737if test ! "$LIBRARY" = "$LDLIBRARY"
8738then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008739 case $ac_sys_system in
8740 CYGWIN*)
8741 # Cygwin needs CCSHARED when building extension DLLs
8742 # but not when building the interpreter DLL.
8743 CFLAGSFORSHARED='';;
8744 *)
8745 CFLAGSFORSHARED='$(CCSHARED)'
8746 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8749$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008750
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008751# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8752# library (with --enable-shared).
8753# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008754# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8755# if it is not required, since it creates a dependency of the shared library
8756# to LIBS. This, in turn, means that applications linking the shared libpython
8757# don't need to link LIBS explicitly. The default should be only changed
8758# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008759
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8761$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008762case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008763 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008764 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008765esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8767$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008768
8769
Guido van Rossum627b2d71993-12-24 10:39:16 +00008770# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8772$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008773if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008774 $as_echo_n "(cached) " >&6
8775else
8776 ac_check_lib_save_LIBS=$LIBS
8777LIBS="-lsendfile $LIBS"
8778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8779/* end confdefs.h. */
8780
8781/* Override any GCC internal prototype to avoid an error.
8782 Use char because int might match the return type of a GCC
8783 builtin and then its argument prototype would still apply. */
8784#ifdef __cplusplus
8785extern "C"
8786#endif
8787char sendfile ();
8788int
8789main ()
8790{
8791return sendfile ();
8792 ;
8793 return 0;
8794}
8795_ACEOF
8796if ac_fn_c_try_link "$LINENO"; then :
8797 ac_cv_lib_sendfile_sendfile=yes
8798else
8799 ac_cv_lib_sendfile_sendfile=no
8800fi
8801rm -f core conftest.err conftest.$ac_objext \
8802 conftest$ac_exeext conftest.$ac_ext
8803LIBS=$ac_check_lib_save_LIBS
8804fi
8805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8806$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008807if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008808 cat >>confdefs.h <<_ACEOF
8809#define HAVE_LIBSENDFILE 1
8810_ACEOF
8811
8812 LIBS="-lsendfile $LIBS"
8813
8814fi
8815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8817$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008818if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008819 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008820else
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008822LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826/* Override any GCC internal prototype to avoid an error.
8827 Use char because int might match the return type of a GCC
8828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829#ifdef __cplusplus
8830extern "C"
8831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008832char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008833int
8834main ()
8835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ;
8838 return 0;
8839}
8840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008843else
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008845fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008846rm -f core conftest.err conftest.$ac_objext \
8847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008848LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8851$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008852if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 cat >>confdefs.h <<_ACEOF
8854#define HAVE_LIBDL 1
8855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008856
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008857 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008858
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008859fi
8860 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8862$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008863if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008865else
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008867LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871/* Override any GCC internal prototype to avoid an error.
8872 Use char because int might match the return type of a GCC
8873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008874#ifdef __cplusplus
8875extern "C"
8876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008877char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008878int
8879main ()
8880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008882 ;
8883 return 0;
8884}
8885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008888else
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008891rm -f core conftest.err conftest.$ac_objext \
8892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008893LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8896$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008897if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 cat >>confdefs.h <<_ACEOF
8899#define HAVE_LIBDLD 1
8900_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008901
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008902 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008904fi
8905 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008906
Georg Brandlb1441c72009-01-03 22:33:39 +00008907# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008908if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8910$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008911if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008912 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008913else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008914 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008918/* Override any GCC internal prototype to avoid an error.
8919 Use char because int might match the return type of a GCC
8920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008921#ifdef __cplusplus
8922extern "C"
8923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008924char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008925int
8926main ()
8927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008929 ;
8930 return 0;
8931}
8932_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933for ac_lib in '' pthread rt posix4; do
8934 if test -z "$ac_lib"; then
8935 ac_res="none required"
8936 else
8937 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008938 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008941 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943rm -f core conftest.err conftest.$ac_objext \
8944 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008945 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948done
Victor Stinnere0be4232011-10-25 13:06:09 +02008949if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951else
8952 ac_cv_search_sem_init=no
8953fi
8954rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008955LIBS=$ac_func_search_save_LIBS
8956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8958$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008960if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008962
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008963fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008964 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008965 # posix4 on Solaris 2.6
8966 # pthread (first!) on Linux
8967fi
8968
Martin v. Löwis19d17342003-06-14 21:03:05 +00008969# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8971$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008972if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008974else
8975 ac_check_lib_save_LIBS=$LIBS
8976LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008978/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008980/* Override any GCC internal prototype to avoid an error.
8981 Use char because int might match the return type of a GCC
8982 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008983#ifdef __cplusplus
8984extern "C"
8985#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008986char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008987int
8988main ()
8989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008991 ;
8992 return 0;
8993}
8994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008995if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008996 ac_cv_lib_intl_textdomain=yes
8997else
Matthias Kloseb9621712010-04-24 17:59:49 +00008998 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000rm -f core conftest.err conftest.$ac_objext \
9001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009002LIBS=$ac_check_lib_save_LIBS
9003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9005$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009006if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009009
Brett Cannonc6d936e2009-06-07 20:09:53 +00009010 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009011fi
9012
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009013
9014# checks for system dependent C++ extensions support
9015case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009016 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9017$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009019/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009020
Georg Brandl59e87bd2011-02-15 19:48:59 +00009021 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009022int
9023main ()
9024{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009025loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ;
9027 return 0;
9028}
Matthias Kloseb159a552010-04-25 21:00:44 +00009029
Martin v. Löwis11437992002-04-12 09:54:03 +00009030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009031if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009032
Matthias Kloseb159a552010-04-25 21:00:44 +00009033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009035
Matthias Kloseb159a552010-04-25 21:00:44 +00009036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009037$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009038
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009039else
Matthias Kloseb159a552010-04-25 21:00:44 +00009040
9041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009042$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009043
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045rm -f core conftest.err conftest.$ac_objext \
9046 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009047 *) ;;
9048esac
9049
Christian Heimes985ecdc2013-11-20 11:46:18 +01009050# check for systems that require aligned memory access
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9052$as_echo_n "checking aligned memory access is required... " >&6; }
9053if test "$cross_compiling" = yes; then :
9054 aligned_required=yes
9055else
9056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9057/* end confdefs.h. */
9058
9059int main()
9060{
9061 char s[16];
9062 int i, *p1, *p2;
9063 for (i=0; i < 16; i++)
9064 s[i] = i;
9065 p1 = (int*)(s+1);
9066 p2 = (int*)(s+2);
9067 if (*p1 == *p2)
9068 return 1;
9069 return 0;
9070}
9071
9072_ACEOF
9073if ac_fn_c_try_run "$LINENO"; then :
9074 aligned_required=no
9075else
9076 aligned_required=yes
9077fi
9078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9079 conftest.$ac_objext conftest.beam conftest.$ac_ext
9080fi
9081
9082
9083if test "$aligned_required" = yes ; then
9084
9085$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9086
9087fi
9088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9089$as_echo "$aligned_required" >&6; }
9090
9091
9092# str, bytes and memoryview hash algorithm
9093
9094
9095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9096$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9097
9098# Check whether --with-hash_algorithm was given.
9099if test "${with_hash_algorithm+set}" = set; then :
9100 withval=$with_hash_algorithm;
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9102$as_echo "$withval" >&6; }
9103case "$withval" in
9104 siphash24)
9105 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9106
9107 ;;
9108 fnv)
9109 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9110
9111 ;;
9112 *)
9113 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9114 ;;
9115esac
9116
9117else
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9119$as_echo "default" >&6; }
9120fi
9121
9122
Guido van Rossum70c7f481998-03-26 18:44:10 +00009123# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9125$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009126if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009127 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009128else
Martin v. Löwis11437992002-04-12 09:54:03 +00009129 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009130LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009134/* Override any GCC internal prototype to avoid an error.
9135 Use char because int might match the return type of a GCC
9136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009137#ifdef __cplusplus
9138extern "C"
9139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009140char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009141int
9142main ()
9143{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009144return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ;
9146 return 0;
9147}
9148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009149if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009151else
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009153fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009154rm -f core conftest.err conftest.$ac_objext \
9155 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009156LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009157fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9159$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009160if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009161 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009162fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009163 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9165$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009166if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009170LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174/* Override any GCC internal prototype to avoid an error.
9175 Use char because int might match the return type of a GCC
9176 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009177#ifdef __cplusplus
9178extern "C"
9179#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009180char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009181int
9182main ()
9183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009184return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ;
9186 return 0;
9187}
9188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009189if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009191else
Matthias Kloseb9621712010-04-24 17:59:49 +00009192 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009194rm -f core conftest.err conftest.$ac_objext \
9195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009196LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9199$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009200if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009201 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009202fi
9203 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009204
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9206$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009207
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009208# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009209if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9212$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009213LIBS="$withval $LIBS"
9214
9215else
Matthias Kloseb9621712010-04-24 17:59:49 +00009216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218fi
9219
Guido van Rossum7f43da71994-08-01 12:15:30 +00009220
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009221if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009222 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9223set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009226if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009228else
9229 case $PKG_CONFIG in
9230 [\\/]* | ?:[\\/]*)
9231 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9232 ;;
9233 *)
9234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235for as_dir in $PATH
9236do
9237 IFS=$as_save_IFS
9238 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009241 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009243 break 2
9244 fi
9245done
Matthias Kloseb9621712010-04-24 17:59:49 +00009246 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009247IFS=$as_save_IFS
9248
9249 ;;
9250esac
9251fi
9252PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9253if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9255$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009256else
Matthias Kloseb9621712010-04-24 17:59:49 +00009257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009259fi
9260
9261
9262fi
9263if test -z "$ac_cv_path_PKG_CONFIG"; then
9264 ac_pt_PKG_CONFIG=$PKG_CONFIG
9265 # Extract the first word of "pkg-config", so it can be a program name with args.
9266set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9268$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009269if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009271else
9272 case $ac_pt_PKG_CONFIG in
9273 [\\/]* | ?:[\\/]*)
9274 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9275 ;;
9276 *)
9277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9278for as_dir in $PATH
9279do
9280 IFS=$as_save_IFS
9281 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009282 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009284 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009286 break 2
9287 fi
9288done
Matthias Kloseb9621712010-04-24 17:59:49 +00009289 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009290IFS=$as_save_IFS
9291
9292 ;;
9293esac
9294fi
9295ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9296if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9298$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009299else
Matthias Kloseb9621712010-04-24 17:59:49 +00009300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9301$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009302fi
9303
9304 if test "x$ac_pt_PKG_CONFIG" = x; then
9305 PKG_CONFIG=""
9306 else
9307 case $cross_compiling:$ac_tool_warned in
9308yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9310$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009311ac_tool_warned=yes ;;
9312esac
9313 PKG_CONFIG=$ac_pt_PKG_CONFIG
9314 fi
9315else
9316 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9317fi
9318
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009319
9320# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9322$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009323
9324# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009325if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009326 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009327else
9328 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009329fi
9330
9331
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9333$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009334
9335# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9337$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009338
9339# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009340if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009341 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009342else
9343 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009344fi
9345
9346
9347if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009348 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9349else
9350 LIBFFI_INCLUDEDIR=""
9351fi
9352
9353
Matthias Kloseb9621712010-04-24 17:59:49 +00009354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9355$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009356
Stefan Krah60187b52012-03-23 19:06:27 +01009357# Check for use of the system libmpdec library
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9359$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9360
9361# Check whether --with-system_libmpdec was given.
9362if test "${with_system_libmpdec+set}" = set; then :
9363 withval=$with_system_libmpdec;
9364else
9365 with_system_libmpdec="no"
9366fi
9367
9368
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9370$as_echo "$with_system_libmpdec" >&6; }
9371
Benjamin Peterson076ed002010-10-31 17:11:02 +00009372# Check for support for loadable sqlite extensions
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9374$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9375# Check whether --enable-loadable-sqlite-extensions was given.
9376if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9377 enableval=$enable_loadable_sqlite_extensions;
9378else
9379 enable_loadable_sqlite_extensions="no"
9380fi
9381
9382
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9384$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9385
Ned Deilyd819b932013-09-06 01:07:05 -07009386# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9387
9388
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9390$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9391
9392# Check whether --with-tcltk-includes was given.
9393if test "${with_tcltk_includes+set}" = set; then :
9394 withval=$with_tcltk_includes;
9395else
9396 with_tcltk_includes="default"
9397fi
9398
9399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9400$as_echo "$with_tcltk_includes" >&6; }
9401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9402$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9403
9404# Check whether --with-tcltk-libs was given.
9405if test "${with_tcltk_libs+set}" = set; then :
9406 withval=$with_tcltk_libs;
9407else
9408 with_tcltk_libs="default"
9409fi
9410
9411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9412$as_echo "$with_tcltk_libs" >&6; }
9413if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9414then
9415 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9416 then
9417 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9418 fi
9419 TCLTK_INCLUDES=""
9420 TCLTK_LIBS=""
9421else
9422 TCLTK_INCLUDES="$with_tcltk_includes"
9423 TCLTK_LIBS="$with_tcltk_libs"
9424fi
9425
Matthias Klose55708cc2009-04-30 08:06:49 +00009426# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9428$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009429
9430# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009431if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009432 withval=$with_dbmliborder;
9433if test x$with_dbmliborder = xyes
9434then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009435as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009436else
9437 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9438 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9439 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009440 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009441 fi
9442 done
9443fi
9444fi
9445
Matthias Kloseb9621712010-04-24 17:59:49 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9447$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009448
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009449# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009450
9451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9453$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009456if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457 withval=$with_signal_module;
9458fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009459
9460
9461if test -z "$with_signal_module"
9462then with_signal_module="yes"
9463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9465$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009466
9467if test "${with_signal_module}" = "yes"; then
9468 USE_SIGNAL_MODULE=""
9469 SIGNAL_OBJS=""
9470else
9471 USE_SIGNAL_MODULE="#"
9472 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9473fi
9474
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009475# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009476
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009477USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479
Martin v. Löwis11437992002-04-12 09:54:03 +00009480
9481# Templates for things AC_DEFINEd more than once.
9482# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009483
9484
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9487$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009490if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009491 withval=$with_threads;
9492fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009493
9494
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009495# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009498if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499 withval=$with_thread; with_threads=$with_thread
9500fi
9501
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009502
9503if test -z "$with_threads"
9504then with_threads="yes"
9505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9507$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009508
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009509
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009510if test "$with_threads" = "no"
9511then
9512 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009513elif test "$ac_cv_pthread_is_default" = yes
9514then
Matthias Kloseb9621712010-04-24 17:59:49 +00009515 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009516
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009517 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009518 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009519
9520 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009522elif test "$ac_cv_kpthread" = "yes"
9523then
9524 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009525 if test "$ac_cv_cxx_thread" = "yes"; then
9526 CXX="$CXX -Kpthread"
9527 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009530 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009531 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009532elif test "$ac_cv_kthread" = "yes"
9533then
9534 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009535 if test "$ac_cv_cxx_thread" = "yes"; then
9536 CXX="$CXX -Kthread"
9537 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009539
9540 posix_threads=yes
9541 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009542elif test "$ac_cv_pthread" = "yes"
9543then
9544 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009545 if test "$ac_cv_cxx_thread" = "yes"; then
9546 CXX="$CXX -pthread"
9547 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009549
9550 posix_threads=yes
9551 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009552else
9553 if test ! -z "$with_threads" -a -d "$with_threads"
9554 then LDFLAGS="$LDFLAGS -L$with_threads"
9555 fi
9556 if test ! -z "$withval" -a -d "$withval"
9557 then LDFLAGS="$LDFLAGS -L$withval"
9558 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009559
9560 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009561 # define _POSIX_THREADS in unistd.h. Some apparently don't
9562 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9564$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009566/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009567
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009568#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009569#ifdef _POSIX_THREADS
9570yes
9571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009572
9573_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009574if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009576 unistd_defines_pthreads=yes
9577else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009578 unistd_defines_pthreads=no
9579fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009580rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9583$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009584
Matthias Kloseb9621712010-04-24 17:59:49 +00009585 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009586
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009587 # Just looking for pthread_create in libpthread is not enough:
9588 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9589 # So we really have to include pthread.h, and then link.
9590 _libs=$LIBS
9591 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9593$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009596
9597#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009598#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009599
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009600void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009601int
9602main ()
9603{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009604
9605pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009606 ;
9607 return 0;
9608}
9609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009610if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9613$as_echo "yes" >&6; }
9614 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009615
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009616 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009617 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009618else
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009620 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009622if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009624
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009625 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009626 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009627else
Guido van Rossumad678af1998-10-02 14:42:15 +00009628
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9630$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009631if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633else
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009635LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009639/* Override any GCC internal prototype to avoid an error.
9640 Use char because int might match the return type of a GCC
9641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009642#ifdef __cplusplus
9643extern "C"
9644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009645char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009646int
9647main ()
9648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ;
9651 return 0;
9652}
9653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009654if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009656else
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009659rm -f core conftest.err conftest.$ac_objext \
9660 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009661LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9664$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009665if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009667
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009668 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009669 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009670 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009671else
Greg Steinadf63d62000-07-05 10:38:09 +00009672
Matthias Kloseb9621712010-04-24 17:59:49 +00009673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9674$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009675if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009676 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009677else
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009679LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009681/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009683/* Override any GCC internal prototype to avoid an error.
9684 Use char because int might match the return type of a GCC
9685 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009686#ifdef __cplusplus
9687extern "C"
9688#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009689char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690int
9691main ()
9692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ;
9695 return 0;
9696}
9697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009700else
Matthias Kloseb9621712010-04-24 17:59:49 +00009701 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703rm -f core conftest.err conftest.$ac_objext \
9704 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009705LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9708$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009709if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009710 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009711
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009712 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009713 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009714 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009715else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009716
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9718$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009723LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009733char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009734int
9735main ()
9736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9752$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009753if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009754 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009757 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009758 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009759else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009760
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9762$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009765else
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009767LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009771/* Override any GCC internal prototype to avoid an error.
9772 Use char because int might match the return type of a GCC
9773 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009774#ifdef __cplusplus
9775extern "C"
9776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009777char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009778int
9779main ()
9780{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009781return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ;
9783 return 0;
9784}
9785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009786if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009791rm -f core conftest.err conftest.$ac_objext \
9792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009793LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9796$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009797if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009798 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009799
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009800 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009801 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009802 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009803else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009804
Martin v. Löwis130fb172001-07-19 11:00:41 +00009805 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009806fi
9807
Guido van Rossum627b2d71993-12-24 10:39:16 +00009808
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009809fi
9810
Guido van Rossum0be3e491997-05-22 20:33:33 +00009811fi
9812
Guido van Rossum49545951997-12-02 19:28:29 +00009813fi
9814
Guido van Rossumb93a8621998-05-07 13:27:32 +00009815fi
9816
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009818rm -f core conftest.err conftest.$ac_objext \
9819 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9822$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009823if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009827LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831/* Override any GCC internal prototype to avoid an error.
9832 Use char because int might match the return type of a GCC
9833 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834#ifdef __cplusplus
9835extern "C"
9836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009837char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838int
9839main ()
9840{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
9845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009846if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009848else
Matthias Kloseb9621712010-04-24 17:59:49 +00009849 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009853LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9856$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009858 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009859
Martin v. Löwis130fb172001-07-19 11:00:41 +00009860 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009861 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009862 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009863fi
9864
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009865
Neal Norwitza978ab02002-11-02 16:58:05 +00009866 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9868$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009871else
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009873LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009875/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877/* Override any GCC internal prototype to avoid an error.
9878 Use char because int might match the return type of a GCC
9879 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009880#ifdef __cplusplus
9881extern "C"
9882#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009883char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009884int
9885main ()
9886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ;
9889 return 0;
9890}
9891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009894else
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009897rm -f core conftest.err conftest.$ac_objext \
9898 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009899LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9902$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009903if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009904 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009905
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009906 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009907 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009908 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009909fi
9910
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009911 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009912fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009913
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009914if test "$posix_threads" = "yes"; then
9915 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009916
Matthias Kloseb9621712010-04-24 17:59:49 +00009917$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009918
9919 fi
9920
9921 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9922 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009923 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009924$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009925
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009926 ;;
9927 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009928$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009929
9930 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009931 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009932$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009933
9934 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009935 esac
9936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9938$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009939 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009941else
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009943 ac_cv_pthread_system_supported=no
9944else
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009946/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009947
9948 #include <stdio.h>
9949 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009950 void *foo(void *parm) {
9951 return NULL;
9952 }
9953 main() {
9954 pthread_attr_t attr;
9955 pthread_t id;
9956 if (pthread_attr_init(&attr)) exit(-1);
9957 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9958 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9959 exit(0);
9960 }
9961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009962if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963 ac_cv_pthread_system_supported=yes
9964else
Matthias Kloseb9621712010-04-24 17:59:49 +00009965 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009969fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009970
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009971
Guido van Rossum627b2d71993-12-24 10:39:16 +00009972fi
9973
Matthias Kloseb9621712010-04-24 17:59:49 +00009974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9975$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009976 if test "$ac_cv_pthread_system_supported" = "yes"; then
9977
Matthias Kloseb9621712010-04-24 17:59:49 +00009978$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009979
9980 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 for ac_func in pthread_sigmask
9982do :
9983 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009984if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009985 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009986#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009987_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009988 case $ac_sys_system in
9989 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990
Matthias Kloseb9621712010-04-24 17:59:49 +00009991$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009992
9993 ;;
9994 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995fi
9996done
9997
Christian Heimesf77b4b22013-08-21 13:26:05 +02009998 for ac_func in pthread_atfork
9999do :
10000 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10001if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10002 cat >>confdefs.h <<_ACEOF
10003#define HAVE_PTHREAD_ATFORK 1
10004_ACEOF
10005
10006fi
10007done
10008
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010009fi
10010
10011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010012# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010013
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10015$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010017if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010022 ipv6=no
10023 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010024 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10025$as_echo "yes" >&6; }
10026 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010027
10028 ipv6=yes
10029 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010030 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Matthias Kloseb9621712010-04-24 17:59:49 +000010033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010034/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010035 /* AF_INET6 available check */
10036#include <sys/types.h>
10037#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010038int
10039main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010040{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010041int domain = AF_INET6;
10042 ;
10043 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010044}
Martin v. Löwis11437992002-04-12 09:54:03 +000010045_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010046if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010047
Matthias Kloseb9621712010-04-24 17:59:49 +000010048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10049$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010050 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052else
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010056 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010057
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010058fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010061if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10063$as_echo_n "checking if RFC2553 API is available... " >&6; }
10064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010066
10067 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010068#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010069int
10070main ()
10071{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010072struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010073 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010074 ;
10075 return 0;
10076}
Matthias Kloseb159a552010-04-25 21:00:44 +000010077
Martin v. Löwis11437992002-04-12 09:54:03 +000010078_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010079if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010080
10081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010082$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010083 ipv6=yes
10084
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010085else
Matthias Kloseb159a552010-04-25 21:00:44 +000010086
10087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010088$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010089 ipv6=no
10090
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010093fi
10094
10095if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010097
10098fi
10099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100fi
10101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010102
10103ipv6type=unknown
10104ipv6lib=none
10105ipv6trylibc=no
10106
10107if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10109$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010110 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10111 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112 case $i in
10113 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010115/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010116
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117#include <netinet/in.h>
10118#ifdef IPV6_INRIA_VERSION
10119yes
10120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010121_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010124 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010126rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127
10128 ;;
10129 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010131/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010132
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133#include <netinet/in.h>
10134#ifdef __KAME__
10135yes
10136#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010140 ipv6type=$i;
10141 ipv6lib=inet6
10142 ipv6libdir=/usr/local/v6/lib
10143 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010145rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146
10147 ;;
10148 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010150/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010151
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010152#include <features.h>
10153#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10154yes
10155#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010156_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159 ipv6type=$i;
10160 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010162rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163
10164 ;;
10165 linux-inet6)
10166 if test -d /usr/inet6; then
10167 ipv6type=$i
10168 ipv6lib=inet6
10169 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010170 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171 fi
10172 ;;
10173 solaris)
10174 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010175 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010176 ipv6type=$i
10177 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178 fi
10179 fi
10180 ;;
10181 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010184
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010185#include <sys/param.h>
10186#ifdef _TOSHIBA_INET6
10187yes
10188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010189_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192 ipv6type=$i;
10193 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010194 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010196rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010197
10198 ;;
10199 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010202
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203#include </usr/local/v6/include/sys/v6config.h>
10204#ifdef __V6D__
10205yes
10206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010207_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210 ipv6type=$i;
10211 ipv6lib=v6;
10212 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010213 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010215rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216
10217 ;;
10218 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222#include <sys/param.h>
10223#ifdef _ZETA_MINAMI_INET6
10224yes
10225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229 ipv6type=$i;
10230 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010231 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010233rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234
10235 ;;
10236 esac
10237 if test "$ipv6type" != "unknown"; then
10238 break
10239 fi
10240 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10242$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010243fi
10244
10245if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10246 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10247 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10248 echo "using lib$ipv6lib"
10249 else
10250 if test $ipv6trylibc = "yes"; then
10251 echo "using libc"
10252 else
10253 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10254 echo "You need to fetch lib$ipv6lib.a from appropriate"
10255 echo 'ipv6 kit and compile beforehand.'
10256 exit 1
10257 fi
10258 fi
10259fi
10260
Matthias Kloseb9621712010-04-24 17:59:49 +000010261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10262$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10263cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010264/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010265
10266 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010267int
10268main ()
10269{
10270FSIORefNum fRef = 0
10271 ;
10272 return 0;
10273}
Matthias Kloseb159a552010-04-25 21:00:44 +000010274
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010277
Matthias Kloseb159a552010-04-25 21:00:44 +000010278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010280
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10282$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010283
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010284else
Matthias Kloseb159a552010-04-25 21:00:44 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10287$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010288
10289fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10291
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010292# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10294$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010296# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010297if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010298 withval=$with_doc_strings;
10299fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010300
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010301
10302if test -z "$with_doc_strings"
10303then with_doc_strings="yes"
10304fi
10305if test "$with_doc_strings" != "no"
10306then
10307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010309
10310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10312$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010313
Antoine Pitrou042b1282010-08-13 21:15:58 +000010314# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10316$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010319if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010321if test "$withval" != no
10322then
10323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010325
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10327$as_echo "yes" >&6; }
10328else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010330fi
10331else
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334fi
10335
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010336
10337# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10339$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010342if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343 withval=$with_pymalloc;
10344fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010345
Neil Schemenauera35c6882001-02-27 04:45:05 +000010346
Neil Schemenauer16c22972002-03-22 15:34:49 +000010347if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010348then
10349 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010350fi
10351if test "$with_pymalloc" != "no"
10352then
Martin v. Löwis11437992002-04-12 09:54:03 +000010353
Matthias Kloseb9621712010-04-24 17:59:49 +000010354$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010355
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010356 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10359$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010360
Benjamin Peterson05159c42009-12-03 03:01:27 +000010361# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10363$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010364
10365# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010366if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010367 withval=$with_valgrind;
10368else
10369 with_valgrind=no
10370fi
10371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10373$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010374if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010375 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 +020010376if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010377
Matthias Kloseb9621712010-04-24 17:59:49 +000010378$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010379
10380else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010381 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010382
10383fi
10384
10385
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010386 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010387fi
10388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010389# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010390
Guido van Rossum98935bf2001-09-05 19:13:16 +000010391DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010392
Guido van Rossume97ee181999-12-20 21:27:22 +000010393# the dlopen() function means we might want to use dynload_shlib.o. some
10394# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010395for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010396do :
10397 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010401_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010402
Guido van Rossume97ee181999-12-20 21:27:22 +000010403fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010404done
Guido van Rossume97ee181999-12-20 21:27:22 +000010405
Michael W. Hudson54241132001-12-07 15:38:26 +000010406
Guido van Rossume97ee181999-12-20 21:27:22 +000010407# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10408# loading of modules.
10409
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10411$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010412if test -z "$DYNLOADFILE"
10413then
10414 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010415 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10416 if test "$ac_cv_func_dlopen" = yes
10417 then DYNLOADFILE="dynload_shlib.o"
10418 else DYNLOADFILE="dynload_aix.o"
10419 fi
10420 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010421 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010422 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10423 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010424 *)
10425 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10426 # out any dynamic loading
10427 if test "$ac_cv_func_dlopen" = yes
10428 then DYNLOADFILE="dynload_shlib.o"
10429 else DYNLOADFILE="dynload_stub.o"
10430 fi
10431 ;;
10432 esac
10433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10435$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010436if test "$DYNLOADFILE" != "dynload_stub.o"
10437then
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010440
10441fi
10442
Neil Schemenauer4e425612001-06-19 15:44:15 +000010443# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10444
Michael W. Hudson54241132001-12-07 15:38:26 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10447$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010448if test -z "$MACHDEP_OBJS"
10449then
Jack Jansene578a632001-08-15 01:27:14 +000010450 MACHDEP_OBJS=$extra_machdep_objs
10451else
10452 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010453fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010454if test -z "$MACHDEP_OBJS"; then
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10456$as_echo "none" >&6; }
10457else
10458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10459$as_echo "$MACHDEP_OBJS" >&6; }
10460fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010461
Guido van Rossum627b2d71993-12-24 10:39:16 +000010462# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010463for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010464 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010465 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010466 futimens futimes gai_strerror \
10467 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010468 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010469 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010470 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10471 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010472 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010473 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010474 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010475 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010476 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010477 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010478 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10479 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010480 sigaction sigaltstack siginterrupt sigpending sigrelse \
10481 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010482 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010483 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010484 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010485do :
10486 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10487ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010488if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010490#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010491_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010492
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010493fi
10494done
10495
Michael W. Hudson54241132001-12-07 15:38:26 +000010496
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010497ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10498 #include <dirent.h>
10499"
10500if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10501
10502$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10503
10504fi
10505
10506
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010507# For some functions, having a definition is not sufficient, since
10508# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10510$as_echo_n "checking for chroot... " >&6; }
10511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010513#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010514int
10515main ()
10516{
10517void *x=chroot
10518 ;
10519 return 0;
10520}
10521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010525
Matthias Kloseb159a552010-04-25 21:00:44 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010527$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010528else
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10530$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010531
10532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10535$as_echo_n "checking for link... " >&6; }
10536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010538#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010539int
10540main ()
10541{
10542void *x=link
10543 ;
10544 return 0;
10545}
10546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010548
Matthias Kloseb9621712010-04-24 17:59:49 +000010549$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010550
Matthias Kloseb159a552010-04-25 21:00:44 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010552$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010553else
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010556
10557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10560$as_echo_n "checking for symlink... " >&6; }
10561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010562/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010563#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010564int
10565main ()
10566{
10567void *x=symlink
10568 ;
10569 return 0;
10570}
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010575
Matthias Kloseb159a552010-04-25 21:00:44 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010577$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010578else
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10580$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010581
10582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10585$as_echo_n "checking for fchdir... " >&6; }
10586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010587/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010588#include <unistd.h>
10589int
10590main ()
10591{
10592void *x=fchdir
10593 ;
10594 return 0;
10595}
10596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010597if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010600
Matthias Kloseb159a552010-04-25 21:00:44 +000010601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010602$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010603else
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10605$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010606
10607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10610$as_echo_n "checking for fsync... " >&6; }
10611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010613#include <unistd.h>
10614int
10615main ()
10616{
10617void *x=fsync
10618 ;
10619 return 0;
10620}
10621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010622if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010623
Matthias Kloseb9621712010-04-24 17:59:49 +000010624$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010625
Matthias Kloseb159a552010-04-25 21:00:44 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010628else
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010631
10632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10635$as_echo_n "checking for fdatasync... " >&6; }
10636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010638#include <unistd.h>
10639int
10640main ()
10641{
10642void *x=fdatasync
10643 ;
10644 return 0;
10645}
10646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010650
Matthias Kloseb159a552010-04-25 21:00:44 +000010651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010652$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010653else
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10655$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010656
10657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10660$as_echo_n "checking for epoll... " >&6; }
10661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010662/* end confdefs.h. */
10663#include <sys/epoll.h>
10664int
10665main ()
10666{
10667void *x=epoll_create
10668 ;
10669 return 0;
10670}
10671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010673
Matthias Kloseb9621712010-04-24 17:59:49 +000010674$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010675
Matthias Kloseb159a552010-04-25 21:00:44 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010677$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010678else
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10680$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010681
10682fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10685$as_echo_n "checking for epoll_create1... " >&6; }
10686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687/* end confdefs.h. */
10688#include <sys/epoll.h>
10689int
10690main ()
10691{
10692void *x=epoll_create1
10693 ;
10694 return 0;
10695}
10696_ACEOF
10697if ac_fn_c_try_compile "$LINENO"; then :
10698
10699$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10700
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10702$as_echo "yes" >&6; }
10703else
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10705$as_echo "no" >&6; }
10706
10707fi
10708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10710$as_echo_n "checking for kqueue... " >&6; }
10711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010712/* end confdefs.h. */
10713
10714#include <sys/types.h>
10715#include <sys/event.h>
10716
10717int
10718main ()
10719{
10720int x=kqueue()
10721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010728
Matthias Kloseb159a552010-04-25 21:00:44 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010730$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010731else
Matthias Kloseb9621712010-04-24 17:59:49 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010734
10735fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10738$as_echo_n "checking for prlimit... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10740/* end confdefs.h. */
10741
10742#include <sys/time.h>
10743#include <sys/resource.h>
10744
10745int
10746main ()
10747{
10748void *x=prlimit
10749 ;
10750 return 0;
10751}
10752_ACEOF
10753if ac_fn_c_try_compile "$LINENO"; then :
10754
10755$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10758$as_echo "yes" >&6; }
10759else
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
10762
10763fi
10764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10765
Martin v. Löwisd5843682002-11-21 20:41:28 +000010766# On some systems (eg. FreeBSD 5), we would find a definition of the
10767# functions ctermid_r, setgroups in the library, but no prototype
10768# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10769# address to avoid compiler warnings and potential miscompilations
10770# because of the missing prototypes.
10771
Matthias Kloseb9621712010-04-24 17:59:49 +000010772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10773$as_echo_n "checking for ctermid_r... " >&6; }
10774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010776
Martin v. Löwisd5843682002-11-21 20:41:28 +000010777#include <stdio.h>
10778
Martin v. Löwisd5843682002-11-21 20:41:28 +000010779int
10780main ()
10781{
10782void* p = ctermid_r
10783 ;
10784 return 0;
10785}
10786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010788
Matthias Kloseb9621712010-04-24 17:59:49 +000010789$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010790
Matthias Kloseb159a552010-04-25 21:00:44 +000010791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010792$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010793else
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10795$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010796
10797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10799
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10801$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010802if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010803 $as_echo_n "(cached) " >&6
10804else
10805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010807#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010808int
10809main ()
10810{
10811void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010812
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010813 ;
10814 return 0;
10815}
10816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010817if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010818 ac_cv_flock_decl=yes
10819else
10820 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010821
10822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010824
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010825fi
10826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10827$as_echo "$ac_cv_flock_decl" >&6; }
10828if test "x${ac_cv_flock_decl}" = xyes; then
10829 for ac_func in flock
10830do :
10831 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010832if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010833 cat >>confdefs.h <<_ACEOF
10834#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010835_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010836
Antoine Pitroua3000072010-09-07 14:52:42 +000010837else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010839$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010840if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010841 $as_echo_n "(cached) " >&6
10842else
10843 ac_check_lib_save_LIBS=$LIBS
10844LIBS="-lbsd $LIBS"
10845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10846/* end confdefs.h. */
10847
10848/* Override any GCC internal prototype to avoid an error.
10849 Use char because int might match the return type of a GCC
10850 builtin and then its argument prototype would still apply. */
10851#ifdef __cplusplus
10852extern "C"
10853#endif
10854char flock ();
10855int
10856main ()
10857{
10858return flock ();
10859 ;
10860 return 0;
10861}
10862_ACEOF
10863if ac_fn_c_try_link "$LINENO"; then :
10864 ac_cv_lib_bsd_flock=yes
10865else
10866 ac_cv_lib_bsd_flock=no
10867fi
10868rm -f core conftest.err conftest.$ac_objext \
10869 conftest$ac_exeext conftest.$ac_ext
10870LIBS=$ac_check_lib_save_LIBS
10871fi
10872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10873$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010874if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010875 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010876
10877
10878$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10879
10880
10881fi
10882
10883
10884fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010885done
10886
Antoine Pitroua3000072010-09-07 14:52:42 +000010887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10890$as_echo_n "checking for getpagesize... " >&6; }
10891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010892/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010893
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010894#include <unistd.h>
10895
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010896int
10897main ()
10898{
10899void* p = getpagesize
10900 ;
10901 return 0;
10902}
10903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010905
Matthias Kloseb9621712010-04-24 17:59:49 +000010906$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010907
Matthias Kloseb159a552010-04-25 21:00:44 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010909$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10912$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010913
10914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010916
Victor Stinner984890f2011-11-24 13:53:38 +010010917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10918$as_echo_n "checking for broken unsetenv... " >&6; }
10919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10920/* end confdefs.h. */
10921
10922#include <stdlib.h>
10923
10924int
10925main ()
10926{
10927int res = unsetenv("DUMMY")
10928 ;
10929 return 0;
10930}
10931_ACEOF
10932if ac_fn_c_try_compile "$LINENO"; then :
10933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10934$as_echo "no" >&6; }
10935else
10936
10937$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10938
10939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10940$as_echo "yes" >&6; }
10941
10942fi
10943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10944
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010945for ac_prog in true
10946do
10947 # Extract the first word of "$ac_prog", so it can be a program name with args.
10948set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10950$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010951if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010953else
10954 if test -n "$TRUE"; then
10955 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10956else
10957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10958for as_dir in $PATH
10959do
10960 IFS=$as_save_IFS
10961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010964 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010965 $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 +000010966 break 2
10967 fi
10968done
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010971
10972fi
10973fi
10974TRUE=$ac_cv_prog_TRUE
10975if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10977$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010978else
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010981fi
10982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010984 test -n "$TRUE" && break
10985done
10986test -n "$TRUE" || TRUE="/bin/true"
10987
10988
Matthias Kloseb9621712010-04-24 17:59:49 +000010989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10990$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010991if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010992 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010993else
10994 ac_check_lib_save_LIBS=$LIBS
10995LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010997/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010999/* Override any GCC internal prototype to avoid an error.
11000 Use char because int might match the return type of a GCC
11001 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011002#ifdef __cplusplus
11003extern "C"
11004#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011005char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011006int
11007main ()
11008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011010 ;
11011 return 0;
11012}
11013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011015 ac_cv_lib_c_inet_aton=yes
11016else
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011019rm -f core conftest.err conftest.$ac_objext \
11020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011021LIBS=$ac_check_lib_save_LIBS
11022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11024$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011025if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011026 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011027else
Matthias Kloseb9621712010-04-24 17:59:49 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11029$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011030if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011031 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011032else
11033 ac_check_lib_save_LIBS=$LIBS
11034LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011036/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038/* Override any GCC internal prototype to avoid an error.
11039 Use char because int might match the return type of a GCC
11040 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041#ifdef __cplusplus
11042extern "C"
11043#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011045int
11046main ()
11047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011048return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011049 ;
11050 return 0;
11051}
11052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011054 ac_cv_lib_resolv_inet_aton=yes
11055else
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011058rm -f core conftest.err conftest.$ac_objext \
11059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060LIBS=$ac_check_lib_save_LIBS
11061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11063$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011064if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011065 cat >>confdefs.h <<_ACEOF
11066#define HAVE_LIBRESOLV 1
11067_ACEOF
11068
11069 LIBS="-lresolv $LIBS"
11070
11071fi
11072
11073
11074fi
11075
11076
Christian Heimesd0764e22007-12-04 15:00:33 +000011077# On Tru64, chflags seems to be present, but calling it will
11078# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11080$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011081if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011083else
Matthias Kloseb9621712010-04-24 17:59:49 +000011084 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011085 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011086else
Matthias Kloseb9621712010-04-24 17:59:49 +000011087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011088/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011089
Christian Heimesd0764e22007-12-04 15:00:33 +000011090#include <sys/stat.h>
11091#include <unistd.h>
11092int main(int argc, char*argv[])
11093{
11094 if(chflags(argv[0], 0) != 0)
11095 return 1;
11096 return 0;
11097}
Ned Deily3eb67d52011-06-28 00:00:28 -070011098
Christian Heimesd0764e22007-12-04 15:00:33 +000011099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011101 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011102else
Matthias Kloseb9621712010-04-24 17:59:49 +000011103 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011107fi
11108
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11112$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011113if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011114 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011115if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011116 ac_cv_have_chflags="yes"
11117else
11118 ac_cv_have_chflags="no"
11119fi
11120
11121fi
11122if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011123
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011125
11126fi
11127
Matthias Kloseb9621712010-04-24 17:59:49 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11129$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011130if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011132else
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011134 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011137/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011138
Christian Heimesd0764e22007-12-04 15:00:33 +000011139#include <sys/stat.h>
11140#include <unistd.h>
11141int main(int argc, char*argv[])
11142{
11143 if(lchflags(argv[0], 0) != 0)
11144 return 1;
11145 return 0;
11146}
Ned Deily3eb67d52011-06-28 00:00:28 -070011147
Christian Heimesd0764e22007-12-04 15:00:33 +000011148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011149if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011150 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011151else
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011156fi
11157
11158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11161$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011162if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011163 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011164if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011165 ac_cv_have_lchflags="yes"
11166else
11167 ac_cv_have_lchflags="no"
11168fi
11169
11170fi
11171if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011172
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011174
11175fi
11176
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011177case $ac_sys_system/$ac_sys_release in
11178Darwin/*)
11179 _CUR_CFLAGS="${CFLAGS}"
11180 _CUR_LDFLAGS="${LDFLAGS}"
11181 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11182 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11183 ;;
11184esac
11185
Matthias Kloseb9621712010-04-24 17:59:49 +000011186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11187$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011188if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011190else
11191 ac_check_lib_save_LIBS=$LIBS
11192LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011194/* end confdefs.h. */
11195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196/* Override any GCC internal prototype to avoid an error.
11197 Use char because int might match the return type of a GCC
11198 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011199#ifdef __cplusplus
11200extern "C"
11201#endif
11202char inflateCopy ();
11203int
11204main ()
11205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011207 ;
11208 return 0;
11209}
11210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011212 ac_cv_lib_z_inflateCopy=yes
11213else
Matthias Kloseb9621712010-04-24 17:59:49 +000011214 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011216rm -f core conftest.err conftest.$ac_objext \
11217 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011218LIBS=$ac_check_lib_save_LIBS
11219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11221$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011222if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011225
11226fi
11227
11228
11229case $ac_sys_system/$ac_sys_release in
11230Darwin/*)
11231 CFLAGS="${_CUR_CFLAGS}"
11232 LDFLAGS="${_CUR_LDFLAGS}"
11233 ;;
11234esac
11235
Matthias Kloseb9621712010-04-24 17:59:49 +000011236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11237$as_echo_n "checking for hstrerror... " >&6; }
11238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011239/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011240
Martin v. Löwise9416172003-05-03 10:12:45 +000011241#include <netdb.h>
11242
Martin v. Löwise9416172003-05-03 10:12:45 +000011243int
11244main ()
11245{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011246void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011247 ;
11248 return 0;
11249}
11250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011252
Matthias Kloseb9621712010-04-24 17:59:49 +000011253$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011254
Matthias Kloseb159a552010-04-25 21:00:44 +000011255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011256$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011257else
Matthias Kloseb9621712010-04-24 17:59:49 +000011258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11259$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011260
11261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011262rm -f core conftest.err conftest.$ac_objext \
11263 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11266$as_echo_n "checking for inet_aton... " >&6; }
11267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011268/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011269
Martin v. Löwis86d66262006-02-17 08:40:11 +000011270#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011271#include <sys/socket.h>
11272#include <netinet/in.h>
11273#include <arpa/inet.h>
11274
Martin v. Löwise9416172003-05-03 10:12:45 +000011275int
11276main ()
11277{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011278void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011286
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011292
11293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011294rm -f core conftest.err conftest.$ac_objext \
11295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296
Matthias Kloseb9621712010-04-24 17:59:49 +000011297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11298$as_echo_n "checking for inet_pton... " >&6; }
11299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011300/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011301
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011302#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011303#include <sys/socket.h>
11304#include <netinet/in.h>
11305#include <arpa/inet.h>
11306
Martin v. Löwise9416172003-05-03 10:12:45 +000011307int
11308main ()
11309{
11310void* p = inet_pton
11311 ;
11312 return 0;
11313}
11314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011318
Matthias Kloseb159a552010-04-25 21:00:44 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011321else
Matthias Kloseb9621712010-04-24 17:59:49 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11323$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011324
11325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011327
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011328# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11330$as_echo_n "checking for setgroups... " >&6; }
11331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011332/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011333
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011334#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011335#ifdef HAVE_GRP_H
11336#include <grp.h>
11337#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011338
Martin v. Löwisd5843682002-11-21 20:41:28 +000011339int
11340main ()
11341{
11342void* p = setgroups
11343 ;
11344 return 0;
11345}
11346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011348
Matthias Kloseb9621712010-04-24 17:59:49 +000011349$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011350
Matthias Kloseb159a552010-04-25 21:00:44 +000011351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011352$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011356
11357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011360# check for openpty and forkpty
11361
11362for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011363do :
11364 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011365if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011367#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011368_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011370else
Matthias Kloseb9621712010-04-24 17:59:49 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11372$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011373if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011375else
Martin v. Löwis11437992002-04-12 09:54:03 +000011376 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011377LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011381/* Override any GCC internal prototype to avoid an error.
11382 Use char because int might match the return type of a GCC
11383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011384#ifdef __cplusplus
11385extern "C"
11386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011387char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011388int
11389main ()
11390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011398else
Matthias Kloseb9621712010-04-24 17:59:49 +000011399 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011401rm -f core conftest.err conftest.$ac_objext \
11402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011403LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11406$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011407if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011408 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011409 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011410else
Matthias Kloseb9621712010-04-24 17:59:49 +000011411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11412$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011413if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011414 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011415else
11416 ac_check_lib_save_LIBS=$LIBS
11417LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011419/* end confdefs.h. */
11420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011421/* Override any GCC internal prototype to avoid an error.
11422 Use char because int might match the return type of a GCC
11423 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011424#ifdef __cplusplus
11425extern "C"
11426#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011427char openpty ();
11428int
11429main ()
11430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011432 ;
11433 return 0;
11434}
11435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011436if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011437 ac_cv_lib_bsd_openpty=yes
11438else
Matthias Kloseb9621712010-04-24 17:59:49 +000011439 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011441rm -f core conftest.err conftest.$ac_objext \
11442 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011443LIBS=$ac_check_lib_save_LIBS
11444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11446$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011447if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011448 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011449 LIBS="$LIBS -lbsd"
11450fi
11451
11452
11453fi
11454
Fred Drake8cef4cf2000-06-28 16:40:38 +000011455
11456fi
11457done
11458
11459for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011460do :
11461 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011462if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011465_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011466
Fred Drake8cef4cf2000-06-28 16:40:38 +000011467else
Matthias Kloseb9621712010-04-24 17:59:49 +000011468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11469$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011470if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011471 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011472else
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011474LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011478/* Override any GCC internal prototype to avoid an error.
11479 Use char because int might match the return type of a GCC
11480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011481#ifdef __cplusplus
11482extern "C"
11483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011484char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011485int
11486main ()
11487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 ;
11490 return 0;
11491}
11492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495else
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011498rm -f core conftest.err conftest.$ac_objext \
11499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011500LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11503$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011504if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011506 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11509$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011510if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011511 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011512else
11513 ac_check_lib_save_LIBS=$LIBS
11514LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011516/* end confdefs.h. */
11517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518/* Override any GCC internal prototype to avoid an error.
11519 Use char because int might match the return type of a GCC
11520 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011521#ifdef __cplusplus
11522extern "C"
11523#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011524char forkpty ();
11525int
11526main ()
11527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011528return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011529 ;
11530 return 0;
11531}
11532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011534 ac_cv_lib_bsd_forkpty=yes
11535else
Matthias Kloseb9621712010-04-24 17:59:49 +000011536 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011538rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011540LIBS=$ac_check_lib_save_LIBS
11541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11543$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011546 LIBS="$LIBS -lbsd"
11547fi
11548
11549
11550fi
11551
Fred Drake8cef4cf2000-06-28 16:40:38 +000011552
11553fi
11554done
11555
Jack Jansendd19cf82001-12-06 22:36:17 +000011556
Christian Heimesb186d002008-03-18 15:15:01 +000011557# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011558for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011559do :
11560 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011561if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011562 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011564_ACEOF
11565
11566fi
11567done
11568
11569
Michael W. Hudson54241132001-12-07 15:38:26 +000011570# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011571for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011572do :
11573 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11574ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011575if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011578_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011579
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011580fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011581done
11582
Michael W. Hudson54241132001-12-07 15:38:26 +000011583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011584ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011585if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011586 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011587
Martin v. Löwis1142de32002-03-29 16:28:31 +000011588else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011589 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011590 *" dup2.$ac_objext "* ) ;;
11591 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011593esac
11594
Martin v. Löwis1142de32002-03-29 16:28:31 +000011595fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011596
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011597ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011599 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11600
11601else
11602 case " $LIBOBJS " in
11603 *" strdup.$ac_objext "* ) ;;
11604 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11605 ;;
11606esac
11607
11608fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011609
11610
11611for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011612do :
11613 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011614if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011620#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011621int
11622main ()
11623{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011624getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 ;
11626 return 0;
11627}
11628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011630
Matthias Kloseb9621712010-04-24 17:59:49 +000011631$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011632
Guido van Rossum627b2d71993-12-24 10:39:16 +000011633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011635
Guido van Rossum627b2d71993-12-24 10:39:16 +000011636fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011637done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011638
Jack Jansen150753c2003-03-29 22:07:47 +000011639for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011640do :
11641 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011642if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011643 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011647/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011648#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011649int
11650main ()
11651{
11652setpgrp(0,0);
11653 ;
11654 return 0;
11655}
11656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011658
Matthias Kloseb9621712010-04-24 17:59:49 +000011659$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011660
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011663
11664fi
11665done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011666
Thomas Wouters3a584202000-08-05 23:28:51 +000011667for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011668do :
11669 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011671 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011675/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011676#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011677int
11678main ()
11679{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011680gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011681 ;
11682 return 0;
11683}
11684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011685if ac_fn_c_try_compile "$LINENO"; then :
11686
Guido van Rossum627b2d71993-12-24 10:39:16 +000011687else
Skip Montanaro6dead952003-09-25 14:50:04 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011690
Martin v. Löwis11437992002-04-12 09:54:03 +000011691
Guido van Rossum627b2d71993-12-24 10:39:16 +000011692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011694
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011695fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011696done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011697
Michael W. Hudson54241132001-12-07 15:38:26 +000011698
Victor Stinnere0be4232011-10-25 13:06:09 +020011699for ac_func in clock_gettime
11700do :
11701 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11702if test "x$ac_cv_func_clock_gettime" = xyes; then :
11703 cat >>confdefs.h <<_ACEOF
11704#define HAVE_CLOCK_GETTIME 1
11705_ACEOF
11706
11707else
11708
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11710$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11711if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11712 $as_echo_n "(cached) " >&6
11713else
11714 ac_check_lib_save_LIBS=$LIBS
11715LIBS="-lrt $LIBS"
11716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11717/* end confdefs.h. */
11718
11719/* Override any GCC internal prototype to avoid an error.
11720 Use char because int might match the return type of a GCC
11721 builtin and then its argument prototype would still apply. */
11722#ifdef __cplusplus
11723extern "C"
11724#endif
11725char clock_gettime ();
11726int
11727main ()
11728{
11729return clock_gettime ();
11730 ;
11731 return 0;
11732}
11733_ACEOF
11734if ac_fn_c_try_link "$LINENO"; then :
11735 ac_cv_lib_rt_clock_gettime=yes
11736else
11737 ac_cv_lib_rt_clock_gettime=no
11738fi
11739rm -f core conftest.err conftest.$ac_objext \
11740 conftest$ac_exeext conftest.$ac_ext
11741LIBS=$ac_check_lib_save_LIBS
11742fi
11743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11744$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11745if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11746
11747 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11748
11749
11750$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11751
11752
11753fi
11754
11755
11756fi
11757done
11758
11759
11760for ac_func in clock_getres
11761do :
11762 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11763if test "x$ac_cv_func_clock_getres" = xyes; then :
11764 cat >>confdefs.h <<_ACEOF
11765#define HAVE_CLOCK_GETRES 1
11766_ACEOF
11767
11768else
11769
11770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11771$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11772if ${ac_cv_lib_rt_clock_getres+:} false; then :
11773 $as_echo_n "(cached) " >&6
11774else
11775 ac_check_lib_save_LIBS=$LIBS
11776LIBS="-lrt $LIBS"
11777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11778/* end confdefs.h. */
11779
11780/* Override any GCC internal prototype to avoid an error.
11781 Use char because int might match the return type of a GCC
11782 builtin and then its argument prototype would still apply. */
11783#ifdef __cplusplus
11784extern "C"
11785#endif
11786char clock_getres ();
11787int
11788main ()
11789{
11790return clock_getres ();
11791 ;
11792 return 0;
11793}
11794_ACEOF
11795if ac_fn_c_try_link "$LINENO"; then :
11796 ac_cv_lib_rt_clock_getres=yes
11797else
11798 ac_cv_lib_rt_clock_getres=no
11799fi
11800rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
11802LIBS=$ac_check_lib_save_LIBS
11803fi
11804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11805$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11806if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11807
11808 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11809
11810
11811fi
11812
11813
11814fi
11815done
11816
11817
Matthias Kloseb9621712010-04-24 17:59:49 +000011818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11819$as_echo_n "checking for major... " >&6; }
11820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011822
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011823#if defined(MAJOR_IN_MKDEV)
11824#include <sys/mkdev.h>
11825#elif defined(MAJOR_IN_SYSMACROS)
11826#include <sys/sysmacros.h>
11827#else
11828#include <sys/types.h>
11829#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011830
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011831int
11832main ()
11833{
11834
11835 makedev(major(0),minor(0));
11836
11837 ;
11838 return 0;
11839}
11840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011842
11843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11847$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011848
11849else
Skip Montanaro6dead952003-09-25 14:50:04 +000011850
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011853
11854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011855rm -f core conftest.err conftest.$ac_objext \
11856 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011857
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011858# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011859# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11861$as_echo_n "checking for getaddrinfo... " >&6; }
11862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011864
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011865#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011866#include <sys/socket.h>
11867#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011868#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869
Martin v. Löwis11437992002-04-12 09:54:03 +000011870int
11871main ()
11872{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011873getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 ;
11875 return 0;
11876}
11877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011878if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011879 have_getaddrinfo=yes
11880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011883rm -f core conftest.err conftest.$ac_objext \
11884 conftest$ac_exeext conftest.$ac_ext
11885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11886$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011887if test $have_getaddrinfo = yes
11888then
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11890$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011895
11896if test "${enable_ipv6+set}" = set; then
11897 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11898else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011899 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011900fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011901else
Matthias Kloseb9621712010-04-24 17:59:49 +000011902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011904
Stefan Krah19c21392012-11-22 23:47:32 +010011905#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011906#include <sys/types.h>
11907#include <netdb.h>
11908#include <string.h>
11909#include <sys/socket.h>
11910#include <netinet/in.h>
11911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011912int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011913{
11914 int passive, gaierr, inet4 = 0, inet6 = 0;
11915 struct addrinfo hints, *ai, *aitop;
11916 char straddr[INET6_ADDRSTRLEN], strport[16];
11917
11918 for (passive = 0; passive <= 1; passive++) {
11919 memset(&hints, 0, sizeof(hints));
11920 hints.ai_family = AF_UNSPEC;
11921 hints.ai_flags = passive ? AI_PASSIVE : 0;
11922 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011923 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011924 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11925 (void)gai_strerror(gaierr);
11926 goto bad;
11927 }
11928 for (ai = aitop; ai; ai = ai->ai_next) {
11929 if (ai->ai_addr == NULL ||
11930 ai->ai_addrlen == 0 ||
11931 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11932 straddr, sizeof(straddr), strport, sizeof(strport),
11933 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11934 goto bad;
11935 }
11936 switch (ai->ai_family) {
11937 case AF_INET:
11938 if (strcmp(strport, "54321") != 0) {
11939 goto bad;
11940 }
11941 if (passive) {
11942 if (strcmp(straddr, "0.0.0.0") != 0) {
11943 goto bad;
11944 }
11945 } else {
11946 if (strcmp(straddr, "127.0.0.1") != 0) {
11947 goto bad;
11948 }
11949 }
11950 inet4++;
11951 break;
11952 case AF_INET6:
11953 if (strcmp(strport, "54321") != 0) {
11954 goto bad;
11955 }
11956 if (passive) {
11957 if (strcmp(straddr, "::") != 0) {
11958 goto bad;
11959 }
11960 } else {
11961 if (strcmp(straddr, "::1") != 0) {
11962 goto bad;
11963 }
11964 }
11965 inet6++;
11966 break;
11967 case AF_UNSPEC:
11968 goto bad;
11969 break;
11970 default:
11971 /* another family support? */
11972 break;
11973 }
11974 }
11975 }
11976
11977 if (!(inet4 == 0 || inet4 == 2))
11978 goto bad;
11979 if (!(inet6 == 0 || inet6 == 2))
11980 goto bad;
11981
11982 if (aitop)
11983 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011984 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011985
11986 bad:
11987 if (aitop)
11988 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011989 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011990}
11991
Martin v. Löwis11437992002-04-12 09:54:03 +000011992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011994 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012002fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012003
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12007$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12008
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012009if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012010then
12011 if test $ipv6 = yes
12012 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012013 echo 'Fatal: You must get working getaddrinfo() function.'
12014 echo ' or you can specify "--disable-ipv6"'.
12015 exit 1
12016 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012017else
Martin v. Löwis11437992002-04-12 09:54:03 +000012018
Matthias Kloseb9621712010-04-24 17:59:49 +000012019$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012020
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012021fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012022
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012023for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012024do :
12025 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012026if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012027 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012028#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012030
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012031fi
12032done
12033
Michael W. Hudson54241132001-12-07 15:38:26 +000012034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012035# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12037$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012038if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012039 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012042/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043#include <sys/types.h>
12044#include <sys/time.h>
12045#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047int
12048main ()
12049{
12050if ((struct tm *) 0)
12051return 0;
12052 ;
12053 return 0;
12054}
12055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012056if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012057 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012058else
Matthias Kloseb9621712010-04-24 17:59:49 +000012059 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12064$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012065if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Matthias Kloseb9621712010-04-24 17:59:49 +000012067$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012068
12069fi
12070
Matthias Kloseb9621712010-04-24 17:59:49 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12072$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012073if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012077/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012078#include <sys/types.h>
12079#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084struct tm tm;
12085 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 ;
12088 return 0;
12089}
12090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012091if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012092 ac_cv_struct_tm=time.h
12093else
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12099$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012100if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012101
Matthias Kloseb9621712010-04-24 17:59:49 +000012102$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103
12104fi
12105
Matthias Kloseb9621712010-04-24 17:59:49 +000012106ac_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 +000012107#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
Matthias Kloseb9621712010-04-24 17:59:49 +000012109"
Victor Stinnere0be4232011-10-25 13:06:09 +020012110if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
12112cat >>confdefs.h <<_ACEOF
12113#define HAVE_STRUCT_TM_TM_ZONE 1
12114_ACEOF
12115
12116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12120
Matthias Kloseb9621712010-04-24 17:59:49 +000012121$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122
12123else
Matthias Kloseb9621712010-04-24 17:59:49 +000012124 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12125"
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012130fi
12131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012133#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134_ACEOF
12135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12137$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012138if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012139 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012142/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012143#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012144#if !HAVE_DECL_TZNAME
12145extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012147
Martin v. Löwis11437992002-04-12 09:54:03 +000012148int
12149main ()
12150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012151return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 ;
12153 return 0;
12154}
12155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012156if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157 ac_cv_var_tzname=yes
12158else
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012161rm -f core conftest.err conftest.$ac_objext \
12162 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12165$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012166 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012169
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170 fi
12171fi
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173ac_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 +020012174if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012175
12176cat >>confdefs.h <<_ACEOF
12177#define HAVE_STRUCT_STAT_ST_RDEV 1
12178_ACEOF
12179
12180
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012181fi
12182
Matthias Kloseb9621712010-04-24 17:59:49 +000012183ac_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 +020012184if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012185
Martin v. Löwis11437992002-04-12 09:54:03 +000012186cat >>confdefs.h <<_ACEOF
12187#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12188_ACEOF
12189
12190
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012191fi
12192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193ac_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 +020012194if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012195
12196cat >>confdefs.h <<_ACEOF
12197#define HAVE_STRUCT_STAT_ST_FLAGS 1
12198_ACEOF
12199
12200
12201fi
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203ac_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 +020012204if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012205
12206cat >>confdefs.h <<_ACEOF
12207#define HAVE_STRUCT_STAT_ST_GEN 1
12208_ACEOF
12209
12210
12211fi
12212
Matthias Kloseb9621712010-04-24 17:59:49 +000012213ac_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 +020012214if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012215
12216cat >>confdefs.h <<_ACEOF
12217#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12218_ACEOF
12219
12220
12221fi
12222
Matthias Kloseb9621712010-04-24 17:59:49 +000012223ac_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 +020012224if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226cat >>confdefs.h <<_ACEOF
12227#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12228_ACEOF
12229
12230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012232
12233else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012234 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012235 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12237 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012238esac
12239
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012240fi
12241
Michael W. Hudson54241132001-12-07 15:38:26 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12245$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012246if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248else
Matthias Kloseb159a552010-04-25 21:00:44 +000012249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012252#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012253int
12254main ()
12255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 ;
12258 return 0;
12259}
12260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012261if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012262 ac_cv_header_time_altzone=yes
12263else
Matthias Kloseb9621712010-04-24 17:59:49 +000012264 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012267
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012268fi
12269
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12271$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012273
Matthias Kloseb9621712010-04-24 17:59:49 +000012274$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275
12276fi
12277
Guido van Rossumda88dad1995-01-26 00:46:29 +000012278was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12280$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012282/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012283
12284#include <sys/types.h>
12285#include <sys/select.h>
12286#include <sys/time.h>
12287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288int
12289main ()
12290{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291;
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012297
12298
Matthias Kloseb9621712010-04-24 17:59:49 +000012299$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012301 was_it_defined=yes
12302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12306$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307
Matthias Kloseb9621712010-04-24 17:59:49 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12309$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012310if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012312else
Matthias Kloseb9621712010-04-24 17:59:49 +000012313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012314/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012315#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012316int
12317main ()
12318{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012319struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012320 ;
12321 return 0;
12322}
12323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012324if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012325 ac_cv_struct_addrinfo=yes
12326else
Matthias Kloseb9621712010-04-24 17:59:49 +000012327 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12330fi
12331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12333$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012334if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012337
12338fi
12339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12341$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012342if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012343 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012344else
Matthias Kloseb9621712010-04-24 17:59:49 +000012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012346/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012347
12348# include <sys/types.h>
12349# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012350int
12351main ()
12352{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012353struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 ;
12355 return 0;
12356}
12357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012359 ac_cv_struct_sockaddr_storage=yes
12360else
Matthias Kloseb9621712010-04-24 17:59:49 +000012361 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12364fi
12365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12367$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012369
Matthias Kloseb9621712010-04-24 17:59:49 +000012370$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012371
12372fi
12373
Guido van Rossum627b2d71993-12-24 10:39:16 +000012374# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012375
Matthias Kloseb9621712010-04-24 17:59:49 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12377$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012378if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012380else
Matthias Kloseb9621712010-04-24 17:59:49 +000012381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012383$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012384int
12385main ()
12386{
12387static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012388test_array [0] = 0;
12389return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012390
12391 ;
12392 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012393}
Martin v. Löwis11437992002-04-12 09:54:03 +000012394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012396 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12403$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012406
12407fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012408
Matthias Kloseb9621712010-04-24 17:59:49 +000012409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12410$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012412 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012413else
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012415/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416
Martin v. Löwis11437992002-04-12 09:54:03 +000012417int
12418main ()
12419{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012422 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012423 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012424 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426 char const *const *pcpcc;
12427 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 /* NEC SVR4.0.2 mips cc rejects this. */
12429 struct point {int x, y;};
12430 static struct point const zero = {0,0};
12431 /* AIX XL C 1.02.0.0 rejects this.
12432 It does not let you subtract one const X* pointer from another in
12433 an arm of an if-expression whose if-part is not a constant
12434 expression */
12435 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012438 ++pcpcc;
12439 ppc = (char**) pcpcc;
12440 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012441 { /* SCO 3.2v4 cc rejects this sort of thing. */
12442 char tx;
12443 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012444 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012448 }
12449 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12450 int x[] = {25, 17};
12451 const int *foo = &x[0];
12452 ++foo;
12453 }
12454 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12455 typedef const int *iptr;
12456 iptr p = 0;
12457 ++p;
12458 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012459 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012461 struct s { int j; const int *ap[3]; } bx;
12462 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 }
12464 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12465 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012468 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012469#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012470
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 ;
12472 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012473}
Martin v. Löwis11437992002-04-12 09:54:03 +000012474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476 ac_cv_c_const=yes
12477else
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12483$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012484if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487
12488fi
12489
Michael W. Hudson54241132001-12-07 15:38:26 +000012490
Guido van Rossumda88dad1995-01-26 00:46:29 +000012491works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12493$as_echo_n "checking for working volatile... " >&6; }
12494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012495/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012496
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 ;
12502 return 0;
12503}
12504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012506 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507else
Skip Montanaro6dead952003-09-25 14:50:04 +000012508
Matthias Kloseb9621712010-04-24 17:59:49 +000012509$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012510
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012511
Guido van Rossum627b2d71993-12-24 10:39:16 +000012512fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12515$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012516
Guido van Rossumda88dad1995-01-26 00:46:29 +000012517works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12519$as_echo_n "checking for working signed char... " >&6; }
12520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012522
Martin v. Löwis11437992002-04-12 09:54:03 +000012523int
12524main ()
12525{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012526signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012527 ;
12528 return 0;
12529}
12530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012531if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012532 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012533else
Skip Montanaro6dead952003-09-25 14:50:04 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012536
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012537
Guido van Rossum7f43da71994-08-01 12:15:30 +000012538fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12541$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012542
Guido van Rossumda88dad1995-01-26 00:46:29 +000012543have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12545$as_echo_n "checking for prototypes... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012548int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012549int
12550main ()
12551{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012552return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
12555}
12556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
Matthias Kloseb9621712010-04-24 17:59:49 +000012559$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012560
Matthias Kloseb159a552010-04-25 21:00:44 +000012561 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12565$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012566
Guido van Rossumda88dad1995-01-26 00:46:29 +000012567works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12569$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012571/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012572
12573#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012574int foo(int x, ...) {
12575 va_list va;
12576 va_start(va, x);
12577 va_arg(va, int);
12578 va_arg(va, char *);
12579 va_arg(va, double);
12580 return 0;
12581}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Guido van Rossum90eea071996-08-30 20:58:57 +000012586return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 ;
12588 return 0;
12589}
12590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593
Matthias Kloseb9621712010-04-24 17:59:49 +000012594$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012595
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012596 works=yes
12597
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12601$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012602
Martin v. Löwisd6320502004-08-12 13:45:08 +000012603# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12605$as_echo_n "checking for socketpair... " >&6; }
12606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012607/* end confdefs.h. */
12608
12609#include <sys/types.h>
12610#include <sys/socket.h>
12611
12612int
12613main ()
12614{
12615void *x=socketpair
12616 ;
12617 return 0;
12618}
12619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012621
Matthias Kloseb9621712010-04-24 17:59:49 +000012622$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012623
Matthias Kloseb159a552010-04-25 21:00:44 +000012624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012625$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012626else
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12628$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012629
12630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012632
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12635$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012637/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638#include <sys/types.h>
12639#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012640int
12641main ()
12642{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012643struct sockaddr x;
12644x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ;
12646 return 0;
12647}
12648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012649if ac_fn_c_try_compile "$LINENO"; then :
12650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12651$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Matthias Kloseb9621712010-04-24 17:59:49 +000012653$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012654
12655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012658
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012661
Guido van Rossumda88dad1995-01-26 00:46:29 +000012662va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12664$as_echo_n "checking whether va_list is an array... " >&6; }
12665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012666/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667
12668#ifdef HAVE_STDARG_PROTOTYPES
12669#include <stdarg.h>
12670#else
12671#include <varargs.h>
12672#endif
12673
Martin v. Löwis11437992002-04-12 09:54:03 +000012674int
12675main ()
12676{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 ;
12679 return 0;
12680}
12681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012682if ac_fn_c_try_compile "$LINENO"; then :
12683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684else
Skip Montanaro6dead952003-09-25 14:50:04 +000012685
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Guido van Rossumda88dad1995-01-26 00:46:29 +000012689 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012690
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12694$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012696# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012697
12698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012700if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012701
Matthias Kloseb9621712010-04-24 17:59:49 +000012702 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12705$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012706 OLD_CFLAGS=$CFLAGS
12707 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012709/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012710
12711# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713int
12714main ()
12715{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012716
12717 char *name;
12718 struct hostent *he, *res;
12719 char buffer[2048];
12720 int buflen = 2048;
12721 int h_errnop;
12722
12723 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
12725 ;
12726 return 0;
12727}
12728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012732
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012735
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12737$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012738
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012739else
Skip Montanaro6dead952003-09-25 14:50:04 +000012740
Matthias Kloseb9621712010-04-24 17:59:49 +000012741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12742$as_echo "no" >&6; }
12743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12744$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012747
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012748# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Martin v. Löwis11437992002-04-12 09:54:03 +000012750int
12751main ()
12752{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012753
12754 char *name;
12755 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012756 char buffer[2048];
12757 int buflen = 2048;
12758 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012759
Matthias Kloseb159a552010-04-25 21:00:44 +000012760 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
12762 ;
12763 return 0;
12764}
12765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012766if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012769
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Matthias Kloseb159a552010-04-25 21:00:44 +000012771$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12774$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012776else
Skip Montanaro6dead952003-09-25 14:50:04 +000012777
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12779$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12781$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12783/* end confdefs.h. */
12784
12785# include <netdb.h>
12786
12787int
12788main ()
12789{
12790
12791 char *name;
12792 struct hostent *he;
12793 struct hostent_data data;
12794
12795 (void) gethostbyname_r(name, he, &data);
12796
12797 ;
12798 return 0;
12799}
12800_ACEOF
12801if ac_fn_c_try_compile "$LINENO"; then :
12802
12803 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12804
12805
12806$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12807
12808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12809$as_echo "yes" >&6; }
12810
12811else
12812
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12814$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000012821
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012824 CFLAGS=$OLD_CFLAGS
12825
12826else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 for ac_func in gethostbyname
12829do :
12830 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012831if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012833#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012834_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012835
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012836fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012837done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012838
Michael W. Hudson54241132001-12-07 15:38:26 +000012839
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012840fi
12841
Michael W. Hudson54241132001-12-07 15:38:26 +000012842
12843
12844
12845
12846
12847
Guido van Rossum627b2d71993-12-24 10:39:16 +000012848# checks for system services
12849# (none yet)
12850
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012851# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012852ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012853if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012854
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012855else
Matthias Kloseb9621712010-04-24 17:59:49 +000012856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12857$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860else
Martin v. Löwis11437992002-04-12 09:54:03 +000012861 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012862LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012866/* Override any GCC internal prototype to avoid an error.
12867 Use char because int might match the return type of a GCC
12868 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012869#ifdef __cplusplus
12870extern "C"
12871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012872char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012873int
12874main ()
12875{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012877 ;
12878 return 0;
12879}
12880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012881if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012883else
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012888LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12891$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012892if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 cat >>confdefs.h <<_ACEOF
12894#define HAVE_LIBIEEE 1
12895_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012896
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012897 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898
Guido van Rossum627b2d71993-12-24 10:39:16 +000012899fi
12900
Michael W. Hudson54241132001-12-07 15:38:26 +000012901
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012902fi
12903
Michael W. Hudson54241132001-12-07 15:38:26 +000012904
Guido van Rossum7f253911997-05-09 02:42:48 +000012905# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12907$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012910if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012911 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012912if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012913then
12914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012916
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12918$as_echo "yes" >&6; }
12919else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12920$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012921fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12924$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925fi
12926
Guido van Rossum7f253911997-05-09 02:42:48 +000012927
Guido van Rossum7f43da71994-08-01 12:15:30 +000012928# check for --with-libm=...
12929
Guido van Rossum563e7081996-09-10 18:20:48 +000012930case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012931Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012932*) LIBM=-lm
12933esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12935$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012940if test "$withval" = no
12941then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12943$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012944elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012945then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12947$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012948else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012949fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12952$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953fi
12954
Guido van Rossum7f43da71994-08-01 12:15:30 +000012955
12956# check for --with-libc=...
12957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12959$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012962if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012964if test "$withval" = no
12965then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12967$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012968elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012969then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12971$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012972else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012973fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12976$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977fi
12978
Guido van Rossum7f43da71994-08-01 12:15:30 +000012979
Stefan Krah1919b7e2012-03-21 18:25:23 +010012980# **************************************
12981# * Check for gcc x64 inline assembler *
12982# **************************************
12983
12984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12985$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12987/* end confdefs.h. */
12988
12989int
12990main ()
12991{
12992
12993 __asm__ __volatile__ ("movq %rcx, %rax");
12994
12995 ;
12996 return 0;
12997}
12998_ACEOF
12999if ac_fn_c_try_compile "$LINENO"; then :
13000 have_gcc_asm_for_x64=yes
13001else
13002 have_gcc_asm_for_x64=no
13003fi
13004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13006$as_echo "$have_gcc_asm_for_x64" >&6; }
13007if test "$have_gcc_asm_for_x64" = yes
13008then
13009
13010$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13011
13012fi
13013
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013014# **************************************************
13015# * Check for various properties of floating point *
13016# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13019$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013020if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013021 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013022else
13023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013025 ac_cv_little_endian_double=no
13026else
Matthias Kloseb9621712010-04-24 17:59:49 +000013027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013028/* end confdefs.h. */
13029
13030#include <string.h>
13031int main() {
13032 double x = 9006104071832581.0;
13033 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13034 return 0;
13035 else
13036 return 1;
13037}
13038
13039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013041 ac_cv_little_endian_double=yes
13042else
Matthias Kloseb9621712010-04-24 17:59:49 +000013043 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013047fi
13048
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013049fi
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13052$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013053if test "$ac_cv_little_endian_double" = yes
13054then
13055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013057
13058fi
13059
Matthias Kloseb9621712010-04-24 17:59:49 +000013060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13061$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013062if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013064else
13065
Matthias Kloseb9621712010-04-24 17:59:49 +000013066if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013067 ac_cv_big_endian_double=no
13068else
Matthias Kloseb9621712010-04-24 17:59:49 +000013069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013070/* end confdefs.h. */
13071
13072#include <string.h>
13073int main() {
13074 double x = 9006104071832581.0;
13075 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13076 return 0;
13077 else
13078 return 1;
13079}
13080
13081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013082if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013083 ac_cv_big_endian_double=yes
13084else
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13088 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013089fi
13090
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013091fi
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13094$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013095if test "$ac_cv_big_endian_double" = yes
13096then
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013099
13100fi
13101
13102# Some ARM platforms use a mixed-endian representation for doubles.
13103# While Python doesn't currently have full support for these platforms
13104# (see e.g., issue 1762561), we can at least make sure that float <-> string
13105# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13107$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013108if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013110else
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013113 ac_cv_mixed_endian_double=no
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013116/* end confdefs.h. */
13117
13118#include <string.h>
13119int main() {
13120 double x = 9006104071832581.0;
13121 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13122 return 0;
13123 else
13124 return 1;
13125}
13126
13127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013128if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013129 ac_cv_mixed_endian_double=yes
13130else
Matthias Kloseb9621712010-04-24 17:59:49 +000013131 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013133rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13134 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013135fi
13136
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013137fi
13138
Matthias Kloseb9621712010-04-24 17:59:49 +000013139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13140$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013141if test "$ac_cv_mixed_endian_double" = yes
13142then
13143
Matthias Kloseb9621712010-04-24 17:59:49 +000013144$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013145
13146fi
13147
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013148# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013149# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013150# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013151# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013152# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013153# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013154
13155# This inline assembler syntax may also work for suncc and icc,
13156# so we try it on all platforms.
13157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13159$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013161/* end confdefs.h. */
13162
13163int
13164main ()
13165{
13166
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013167 unsigned short cw;
13168 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13169 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013170
13171 ;
13172 return 0;
13173}
13174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013176 have_gcc_asm_for_x87=yes
13177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013179fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13182$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013183if test "$have_gcc_asm_for_x87" = yes
13184then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013187
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013188fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013189
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013190# Detect whether system arithmetic is subject to x87-style double
13191# rounding issues. The result of this test has little meaning on non
13192# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13193# mode is round-to-nearest and double rounding issues are present, and
13194# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13196$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013197# $BASECFLAGS may affect the result
13198ac_save_cc="$CC"
13199CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013201 ac_cv_x87_double_rounding=no
13202else
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013204/* end confdefs.h. */
13205
13206#include <stdlib.h>
13207#include <math.h>
13208int main() {
13209 volatile double x, y, z;
13210 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13211 x = 0.99999999999999989; /* 1-2**-53 */
13212 y = 1./x;
13213 if (y != 1.)
13214 exit(0);
13215 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13216 x = 1e16;
13217 y = 2.99999;
13218 z = x + y;
13219 if (z != 1e16+4.)
13220 exit(0);
13221 /* both tests show evidence of double rounding */
13222 exit(1);
13223}
13224
13225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013226if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013227 ac_cv_x87_double_rounding=no
13228else
Matthias Kloseb9621712010-04-24 17:59:49 +000013229 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013233fi
13234
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013235CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13237$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013238if test "$ac_cv_x87_double_rounding" = yes
13239then
13240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013242
13243fi
13244
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013245# ************************************
13246# * Check for mathematical functions *
13247# ************************************
13248
13249LIBS_SAVE=$LIBS
13250LIBS="$LIBS $LIBM"
13251
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013252for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13253do :
13254 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13255ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013256if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013257 cat >>confdefs.h <<_ACEOF
13258#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13259_ACEOF
13260
13261fi
13262done
13263
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013264for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013265do :
13266 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13267ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013268if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013269 cat >>confdefs.h <<_ACEOF
13270#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13271_ACEOF
13272
13273fi
13274done
13275
13276ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13277"
Victor Stinnere0be4232011-10-25 13:06:09 +020013278if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013279 ac_have_decl=1
13280else
13281 ac_have_decl=0
13282fi
13283
13284cat >>confdefs.h <<_ACEOF
13285#define HAVE_DECL_ISINF $ac_have_decl
13286_ACEOF
13287ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13288"
Victor Stinnere0be4232011-10-25 13:06:09 +020013289if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013290 ac_have_decl=1
13291else
13292 ac_have_decl=0
13293fi
13294
13295cat >>confdefs.h <<_ACEOF
13296#define HAVE_DECL_ISNAN $ac_have_decl
13297_ACEOF
13298ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13299"
Victor Stinnere0be4232011-10-25 13:06:09 +020013300if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013301 ac_have_decl=1
13302else
13303 ac_have_decl=0
13304fi
13305
13306cat >>confdefs.h <<_ACEOF
13307#define HAVE_DECL_ISFINITE $ac_have_decl
13308_ACEOF
13309
13310
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013311# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13312# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13314$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013315if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013317else
13318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013320 ac_cv_tanh_preserves_zero_sign=no
13321else
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013323/* end confdefs.h. */
13324
13325#include <math.h>
13326#include <stdlib.h>
13327int main() {
13328 /* return 0 if either negative zeros don't exist
13329 on this platform or if negative zeros exist
13330 and tanh(-0.) == -0. */
13331 if (atan2(0., -1.) == atan2(-0., -1.) ||
13332 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13333 else exit(1);
13334}
13335
13336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013338 ac_cv_tanh_preserves_zero_sign=yes
13339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013344fi
13345
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013346fi
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13349$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013350if test "$ac_cv_tanh_preserves_zero_sign" = yes
13351then
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013354
13355fi
13356
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013357if test "$ac_cv_func_log1p" = yes
13358then
13359 # On some versions of AIX, log1p(-0.) returns 0. instead of
13360 # -0. See issue #9920.
13361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13362$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013363 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013364 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013365else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013366
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013367 if test "$cross_compiling" = yes; then :
13368 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013369else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13371/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013372
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013373 #include <math.h>
13374 #include <stdlib.h>
13375 int main() {
13376 /* Fail if the signs of log1p(-0.) and -0. can be
13377 distinguished. */
13378 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13379 return 0;
13380 else
13381 return 1;
13382 }
13383
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013384_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013385if ac_fn_c_try_run "$LINENO"; then :
13386 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013387else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013388 ac_cv_log1p_drops_zero_sign=yes
13389fi
13390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013392fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013393
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013394fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013395
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13397$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13398fi
13399if test "$ac_cv_log1p_drops_zero_sign" = yes
13400then
13401
13402$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13403
13404fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013405
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013406LIBS=$LIBS_SAVE
13407
Mark Dickinsona614f042009-11-28 12:48:43 +000013408# For multiprocessing module, check that sem_open
13409# actually works. For FreeBSD versions <= 7.2,
13410# the kernel module that provides POSIX semaphores
13411# isn't loaded by default, so an attempt to call
13412# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13414$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013417else
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013419 ac_cv_posix_semaphores_enabled=yes
13420else
Matthias Kloseb9621712010-04-24 17:59:49 +000013421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013422/* end confdefs.h. */
13423
13424#include <unistd.h>
13425#include <fcntl.h>
13426#include <stdio.h>
13427#include <semaphore.h>
13428#include <sys/stat.h>
13429
13430int main(void) {
13431 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13432 if (a == SEM_FAILED) {
13433 perror("sem_open");
13434 return 1;
13435 }
13436 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013437 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013438 return 0;
13439}
13440
13441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013442if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013443 ac_cv_posix_semaphores_enabled=yes
13444else
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13448 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013449fi
13450
13451
Mark Dickinsona614f042009-11-28 12:48:43 +000013452fi
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13455$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013456if test $ac_cv_posix_semaphores_enabled = no
13457then
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013460
13461fi
13462
Mark Dickinson10683072009-04-18 21:18:19 +000013463# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13465$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013466if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013468else
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013470 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013471else
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013473/* end confdefs.h. */
13474
13475#include <unistd.h>
13476#include <fcntl.h>
13477#include <stdio.h>
13478#include <semaphore.h>
13479#include <sys/stat.h>
13480
13481int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013482 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013483 int count;
13484 int res;
13485 if(a==SEM_FAILED){
13486 perror("sem_open");
13487 return 1;
13488
13489 }
13490 res = sem_getvalue(a, &count);
13491 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013492 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013493 return res==-1 ? 1 : 0;
13494}
13495
Mark Dickinson10683072009-04-18 21:18:19 +000013496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013498 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013499else
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013502rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13503 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013504fi
13505
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013506
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013507fi
13508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13510$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013511if test $ac_cv_broken_sem_getvalue = yes
13512then
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013515
13516fi
13517
Mark Dickinsonbd792642009-03-18 20:06:12 +000013518# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13520$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013521# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013523 enableval=$enable_big_digits; case $enable_big_digits in
13524yes)
13525 enable_big_digits=30 ;;
13526no)
13527 enable_big_digits=15 ;;
1352815|30)
13529 ;;
13530*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013531 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 +000013532esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13534$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013535
13536cat >>confdefs.h <<_ACEOF
13537#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13538_ACEOF
13539
13540
13541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13543$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013544fi
13545
13546
Guido van Rossumef2255b2000-03-10 22:30:29 +000013547# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013548ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013549if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
13551
Matthias Kloseb9621712010-04-24 17:59:49 +000013552$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013553
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013554 wchar_h="yes"
13555
Guido van Rossumef2255b2000-03-10 22:30:29 +000013556else
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013558
13559fi
13560
Michael W. Hudson54241132001-12-07 15:38:26 +000013561
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013563# determine wchar_t size
13564if test "$wchar_h" = yes
13565then
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013567# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13568# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13569# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13571$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013572if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013574else
Matthias Kloseb9621712010-04-24 17:59:49 +000013575 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13576"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013577
Martin v. Löwis11437992002-04-12 09:54:03 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 if test "$ac_cv_type_wchar_t" = yes; then
13580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013582as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013583See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584 else
13585 ac_cv_sizeof_wchar_t=0
13586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013588
Martin v. Löwis11437992002-04-12 09:54:03 +000013589fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13591$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013592
13593
13594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013596#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013597_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013598
Michael W. Hudson54241132001-12-07 15:38:26 +000013599
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013600fi
13601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13603$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013604have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013607
13608#include <tcl.h>
13609#if TCL_UTF_MAX != 6
13610# error "NOT UCS4_TCL"
13611#endif
13612int
13613main ()
13614{
13615
13616 ;
13617 return 0;
13618}
13619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013621
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013624
13625 have_ucs4_tcl=yes
13626
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13630$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013631
Skip Montanaro6dead952003-09-25 14:50:04 +000013632# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013633if test "$wchar_h" = yes
13634then
13635 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13637$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013638 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013639 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013640else
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013643 ac_cv_wchar_t_signed=yes
13644else
Matthias Kloseb9621712010-04-24 17:59:49 +000013645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013646/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013647
13648 #include <wchar.h>
13649 int main()
13650 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013651 /* Success: exit code 0 */
13652 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013653 }
13654
13655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013656if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013657 ac_cv_wchar_t_signed=yes
13658else
Matthias Kloseb9621712010-04-24 17:59:49 +000013659 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013663fi
13664
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013665fi
13666
Matthias Kloseb9621712010-04-24 17:59:49 +000013667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13668$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013669fi
13670
Georg Brandl52d168a2008-01-07 18:10:24 +000013671# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013672if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013673 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013674then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013675 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
Georg Brandl52d168a2008-01-07 18:10:24 +000013679else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013680 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013681fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13683$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013684
13685# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13687$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013688if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013689 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 ac_cv_c_bigendian=unknown
13692 # See if we're dealing with a universal compiler.
13693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694/* end confdefs.h. */
13695#ifndef __APPLE_CC__
13696 not a universal capable compiler
13697 #endif
13698 typedef int dummy;
13699
Skip Montanaro6dead952003-09-25 14:50:04 +000013700_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if ac_fn_c_try_compile "$LINENO"; then :
13702
13703 # Check for potential -arch flags. It is not universal unless
13704 # there are at least two -arch flags with different values.
13705 ac_arch=
13706 ac_prev=
13707 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13708 if test -n "$ac_prev"; then
13709 case $ac_word in
13710 i?86 | x86_64 | ppc | ppc64)
13711 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13712 ac_arch=$ac_word
13713 else
13714 ac_cv_c_bigendian=universal
13715 break
13716 fi
13717 ;;
13718 esac
13719 ac_prev=
13720 elif test "x$ac_word" = "x-arch"; then
13721 ac_prev=arch
13722 fi
13723 done
13724fi
13725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13726 if test $ac_cv_c_bigendian = unknown; then
13727 # See if sys/param.h defines the BYTE_ORDER macro.
13728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013729/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013730#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013732
Martin v. Löwis11437992002-04-12 09:54:03 +000013733int
13734main ()
13735{
Matthias Kloseb9621712010-04-24 17:59:49 +000013736#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13737 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13738 && LITTLE_ENDIAN)
13739 bogus endian macros
13740 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
13742 ;
13743 return 0;
13744}
13745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013746if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013747 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013750#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753int
13754main ()
13755{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013756#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013757 not big endian
13758 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013759
13760 ;
13761 return 0;
13762}
13763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013764if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013765 ac_cv_c_bigendian=yes
13766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013770fi
13771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13772 fi
13773 if test $ac_cv_c_bigendian = unknown; then
13774 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013776/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013777#include <limits.h>
13778
Martin v. Löwis11437992002-04-12 09:54:03 +000013779int
13780main ()
13781{
Matthias Kloseb9621712010-04-24 17:59:49 +000013782#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13783 bogus endian macros
13784 #endif
13785
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 ;
13787 return 0;
13788}
13789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if ac_fn_c_try_compile "$LINENO"; then :
13791 # It does; now see whether it defined to _BIG_ENDIAN or not.
13792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13793/* end confdefs.h. */
13794#include <limits.h>
13795
13796int
13797main ()
13798{
13799#ifndef _BIG_ENDIAN
13800 not big endian
13801 #endif
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013808 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13813fi
13814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13815 fi
13816 if test $ac_cv_c_bigendian = unknown; then
13817 # Compile a test program.
13818 if test "$cross_compiling" = yes; then :
13819 # Try to guess by grepping values from an object file.
13820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821/* end confdefs.h. */
13822short int ascii_mm[] =
13823 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13824 short int ascii_ii[] =
13825 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13826 int use_ascii (int i) {
13827 return ascii_mm[i] + ascii_ii[i];
13828 }
13829 short int ebcdic_ii[] =
13830 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13831 short int ebcdic_mm[] =
13832 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13833 int use_ebcdic (int i) {
13834 return ebcdic_mm[i] + ebcdic_ii[i];
13835 }
13836 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837
Matthias Kloseb9621712010-04-24 17:59:49 +000013838int
13839main ()
13840{
13841return use_ascii (foo) == use_ebcdic (foo);
13842 ;
13843 return 0;
13844}
13845_ACEOF
13846if ac_fn_c_try_compile "$LINENO"; then :
13847 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13848 ac_cv_c_bigendian=yes
13849 fi
13850 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13851 if test "$ac_cv_c_bigendian" = unknown; then
13852 ac_cv_c_bigendian=no
13853 else
13854 # finding both strings is unlikely to happen, but who knows?
13855 ac_cv_c_bigendian=unknown
13856 fi
13857 fi
13858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013860else
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013862/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013864int
13865main ()
13866{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868 /* Are we little or big endian? From Harbison&Steele. */
13869 union
13870 {
13871 long int l;
13872 char c[sizeof (long int)];
13873 } u;
13874 u.l = 1;
13875 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876
13877 ;
13878 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013879}
Martin v. Löwis11437992002-04-12 09:54:03 +000013880_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013881if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013882 ac_cv_c_bigendian=no
13883else
Matthias Kloseb9621712010-04-24 17:59:49 +000013884 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013885fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13887 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13893$as_echo "$ac_cv_c_bigendian" >&6; }
13894 case $ac_cv_c_bigendian in #(
13895 yes)
13896 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13897;; #(
13898 no)
13899 ;; #(
13900 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013901
Matthias Kloseb9621712010-04-24 17:59:49 +000013902$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013903
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 ;; #(
13905 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013906 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013907 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013908 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013909
Michael W. Hudson54241132001-12-07 15:38:26 +000013910
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013911# ABI version string for Python extension modules. This appears between the
13912# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13913# from the following attributes which affect the ABI of this Python build (in
13914# this order):
13915#
13916# * The Python implementation (always 'cpython-' for us)
13917# * The major and minor version numbers
13918# * --with-pydebug (adds a 'd')
13919# * --with-pymalloc (adds a 'm')
13920# * --with-wide-unicode (adds a 'u')
13921#
13922# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013923# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13924# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013925
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13927$as_echo_n "checking ABIFLAGS... " >&6; }
13928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13929$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13931$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013932SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13934$as_echo "$SOABI" >&6; }
13935
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013936
13937case $ac_sys_system in
13938 Linux*|GNU*)
13939 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13940 *)
13941 EXT_SUFFIX=${SHLIB_SUFFIX};;
13942esac
13943
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13945$as_echo_n "checking LDVERSION... " >&6; }
13946LDVERSION='$(VERSION)$(ABIFLAGS)'
13947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13948$as_echo "$LDVERSION" >&6; }
13949
doko@python.org87421192013-01-26 11:39:31 +010013950
13951LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13952
13953
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013954# Check whether right shifting a negative integer extends the sign bit
13955# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13957$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013960else
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013963 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013964else
Matthias Kloseb9621712010-04-24 17:59:49 +000013965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013967
13968int main()
13969{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013970 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013971}
13972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013975 ac_cv_rshift_extends_sign=yes
13976else
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013981fi
13982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983fi
13984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13986$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013987if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013988then
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013991
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013992fi
13993
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013994# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13996$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013997if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013998 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013999else
Martin v. Löwis11437992002-04-12 09:54:03 +000014000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014002/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014003#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014004int
14005main ()
14006{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014007
14008 FILE *f = fopen("/dev/null", "r");
14009 flockfile(f);
14010 getc_unlocked(f);
14011 funlockfile(f);
14012
Martin v. Löwis11437992002-04-12 09:54:03 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014017if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014018 ac_cv_have_getc_unlocked=yes
14019else
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 ac_cv_have_getc_unlocked=no
14021fi
14022rm -f core conftest.err conftest.$ac_objext \
14023 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025
Matthias Kloseb9621712010-04-24 17:59:49 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14027$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014028if test "$ac_cv_have_getc_unlocked" = yes
14029then
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014032
14033fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014034
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014035# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014036# save the value of LIBS so we don't actually link Python with readline
14037LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014038
Gregory P. Smith18820942008-09-07 06:24:49 +000014039# On some systems we need to link readline to a termcap compatible
14040# library. NOTE: Keep the precedence of listed libraries synchronised
14041# with setup.py.
14042py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14044$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014045for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014046 if test -z "$py_libtermcap"; then
14047 READLINE_LIBS="-lreadline"
14048 else
14049 READLINE_LIBS="-lreadline -l$py_libtermcap"
14050 fi
14051 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014053/* end confdefs.h. */
14054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055/* Override any GCC internal prototype to avoid an error.
14056 Use char because int might match the return type of a GCC
14057 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014058#ifdef __cplusplus
14059extern "C"
14060#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014061char readline ();
14062int
14063main ()
14064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014066 ;
14067 return 0;
14068}
14069_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014070if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014071 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014073rm -f core conftest.err conftest.$ac_objext \
14074 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014075 if test $py_cv_lib_readline = yes; then
14076 break
14077 fi
14078done
14079# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14080#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014081if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14083$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014084else
Matthias Kloseb9621712010-04-24 17:59:49 +000014085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14086$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014089
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014090fi
14091
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14094$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014095if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097else
14098 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014099LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101/* end confdefs.h. */
14102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014103/* Override any GCC internal prototype to avoid an error.
14104 Use char because int might match the return type of a GCC
14105 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014106#ifdef __cplusplus
14107extern "C"
14108#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014109char rl_callback_handler_install ();
14110int
14111main ()
14112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014113return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014114 ;
14115 return 0;
14116}
14117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014118if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014119 ac_cv_lib_readline_rl_callback_handler_install=yes
14120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014123rm -f core conftest.err conftest.$ac_objext \
14124 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014125LIBS=$ac_check_lib_save_LIBS
14126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14128$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014129if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014132
14133fi
14134
14135
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014136# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014138/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014139#include <readline/readline.h>
14140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014141if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014142 have_readline=yes
14143else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014144 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014145
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014146fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014147rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014148if test $have_readline = yes
14149then
Matthias Kloseb9621712010-04-24 17:59:49 +000014150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014151/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014152#include <readline/readline.h>
14153
14154_ACEOF
14155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014159
14160fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014161rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014162
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014164/* end confdefs.h. */
14165#include <readline/readline.h>
14166
14167_ACEOF
14168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014172
14173fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014174rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014175
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014176fi
14177
Martin v. Löwis0daad592001-09-30 21:09:59 +000014178# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14180$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014181if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014182 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014183else
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014185LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014188
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189/* Override any GCC internal prototype to avoid an error.
14190 Use char because int might match the return type of a GCC
14191 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014192#ifdef __cplusplus
14193extern "C"
14194#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014195char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014196int
14197main ()
14198{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014200 ;
14201 return 0;
14202}
14203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014204if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014205 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014206else
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014209rm -f core conftest.err conftest.$ac_objext \
14210 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014211LIBS=$ac_check_lib_save_LIBS
14212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14214$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014215if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014218
Martin v. Löwis0daad592001-09-30 21:09:59 +000014219fi
14220
Michael W. Hudson54241132001-12-07 15:38:26 +000014221
Thomas Wouters89d996e2007-09-08 17:39:28 +000014222# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14224$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014225if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014227else
14228 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014229LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014231/* end confdefs.h. */
14232
14233/* Override any GCC internal prototype to avoid an error.
14234 Use char because int might match the return type of a GCC
14235 builtin and then its argument prototype would still apply. */
14236#ifdef __cplusplus
14237extern "C"
14238#endif
14239char rl_completion_display_matches_hook ();
14240int
14241main ()
14242{
14243return rl_completion_display_matches_hook ();
14244 ;
14245 return 0;
14246}
14247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014248if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014249 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14250else
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014253rm -f core conftest.err conftest.$ac_objext \
14254 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014255LIBS=$ac_check_lib_save_LIBS
14256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14258$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014259if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014262
14263fi
14264
14265
Martin v. Löwis0daad592001-09-30 21:09:59 +000014266# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14268$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014269if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014271else
Martin v. Löwis11437992002-04-12 09:54:03 +000014272 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014273LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014277/* Override any GCC internal prototype to avoid an error.
14278 Use char because int might match the return type of a GCC
14279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014280#ifdef __cplusplus
14281extern "C"
14282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014283char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014284int
14285main ()
14286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014288 ;
14289 return 0;
14290}
14291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014293 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014294else
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014297rm -f core conftest.err conftest.$ac_objext \
14298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014299LIBS=$ac_check_lib_save_LIBS
14300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14302$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014303if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014304
Matthias Kloseb9621712010-04-24 17:59:49 +000014305$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014306
Guido van Rossum353ae582001-07-10 16:45:32 +000014307fi
14308
Jack Jansendd19cf82001-12-06 22:36:17 +000014309
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014310# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014312/* end confdefs.h. */
14313#include <readline/readline.h>
14314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014315if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014316 have_readline=yes
14317else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014318 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014319
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014320fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014321rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014322if test $have_readline = yes
14323then
Matthias Kloseb9621712010-04-24 17:59:49 +000014324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014325/* end confdefs.h. */
14326#include <readline/readline.h>
14327
14328_ACEOF
14329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014330 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014331
Matthias Kloseb9621712010-04-24 17:59:49 +000014332$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014333
14334fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014335rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014336
14337fi
14338
Martin v. Löwis82bca632006-02-10 20:49:30 +000014339# End of readline checks: restore LIBS
14340LIBS=$LIBS_no_readline
14341
Matthias Kloseb9621712010-04-24 17:59:49 +000014342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14343$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014344if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014346else
Martin v. Löwis11437992002-04-12 09:54:03 +000014347
Matthias Kloseb9621712010-04-24 17:59:49 +000014348if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014349 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014350else
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014352/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014353
14354int main()
14355{
14356 int val1 = nice(1);
14357 if (val1 != -1 && val1 == nice(2))
14358 exit(0);
14359 exit(1);
14360}
14361
Martin v. Löwis11437992002-04-12 09:54:03 +000014362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014363if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014364 ac_cv_broken_nice=yes
14365else
Matthias Kloseb9621712010-04-24 17:59:49 +000014366 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14369 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014370fi
14371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014372fi
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14375$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014376if test "$ac_cv_broken_nice" = yes
14377then
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014380
14381fi
14382
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14384$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014385if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014387else
Matthias Kloseb9621712010-04-24 17:59:49 +000014388 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014389 ac_cv_broken_poll=no
14390else
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014392/* end confdefs.h. */
14393
14394#include <poll.h>
14395
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014396int main()
14397{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014398 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014399 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014400
14401 close (42);
14402
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014403 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014404 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014405 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014406 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014407 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014408 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014409 return 1;
14410}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014411
14412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014413if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014414 ac_cv_broken_poll=yes
14415else
Matthias Kloseb9621712010-04-24 17:59:49 +000014416 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014418rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14419 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014422fi
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14425$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014426if test "$ac_cv_broken_poll" = yes
14427then
14428
Matthias Kloseb9621712010-04-24 17:59:49 +000014429$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014430
14431fi
14432
Brett Cannon43802422005-02-10 20:48:03 +000014433# 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 +000014434# (which is not required by ISO C or UNIX spec) and/or if we support
14435# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014436ac_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 +000014437#include <$ac_cv_struct_tm>
14438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439"
Victor Stinnere0be4232011-10-25 13:06:09 +020014440if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014441
14442cat >>confdefs.h <<_ACEOF
14443#define HAVE_STRUCT_TM_TM_ZONE 1
14444_ACEOF
14445
14446
14447fi
14448
14449if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014452
14453else
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14455"
Victor Stinnere0be4232011-10-25 13:06:09 +020014456if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460fi
14461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014462cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014463#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464_ACEOF
14465
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14467$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014468if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014472/* end confdefs.h. */
14473#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014474#if !HAVE_DECL_TZNAME
14475extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014476#endif
14477
14478int
14479main ()
14480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014482 ;
14483 return 0;
14484}
14485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014486if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014487 ac_cv_var_tzname=yes
14488else
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014491rm -f core conftest.err conftest.$ac_objext \
14492 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14495$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014496 if test $ac_cv_var_tzname = yes; then
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014499
14500 fi
14501fi
14502
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014503
Martin v. Löwis1d459062005-03-14 21:23:33 +000014504# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14506$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014507if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014509else
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014512 ac_cv_working_tzset=no
14513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014515/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014516
14517#include <stdlib.h>
14518#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014519#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014520
14521#if HAVE_TZNAME
14522extern char *tzname[];
14523#endif
14524
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014525int main()
14526{
Brett Cannon18367812003-09-19 00:59:16 +000014527 /* Note that we need to ensure that not only does tzset(3)
14528 do 'something' with localtime, but it works as documented
14529 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014530 This includes making sure that tzname is set properly if
14531 tm->tm_zone does not exist since it is the alternative way
14532 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014533
14534 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014535 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014536 */
14537
Martin v. Löwis1d459062005-03-14 21:23:33 +000014538 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014539 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14540
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014541 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014542 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014543 if (localtime(&groundhogday)->tm_hour != 0)
14544 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014545#if HAVE_TZNAME
14546 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14547 if (strcmp(tzname[0], "UTC") ||
14548 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14549 exit(1);
14550#endif
Brett Cannon18367812003-09-19 00:59:16 +000014551
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014552 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014553 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014554 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014555 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014556#if HAVE_TZNAME
14557 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14558 exit(1);
14559#endif
Brett Cannon18367812003-09-19 00:59:16 +000014560
14561 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14562 tzset();
14563 if (localtime(&groundhogday)->tm_hour != 11)
14564 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014565#if HAVE_TZNAME
14566 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14567 exit(1);
14568#endif
14569
14570#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014571 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14572 exit(1);
14573 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14574 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014575#endif
Brett Cannon18367812003-09-19 00:59:16 +000014576
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014577 exit(0);
14578}
14579
14580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014581if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014582 ac_cv_working_tzset=yes
14583else
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014588fi
14589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014590fi
14591
Matthias Kloseb9621712010-04-24 17:59:49 +000014592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14593$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014594if test "$ac_cv_working_tzset" = yes
14595then
14596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014598
14599fi
14600
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014601# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14603$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014604if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014605 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014606else
Matthias Kloseb9621712010-04-24 17:59:49 +000014607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014608/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014609#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014610int
14611main ()
14612{
14613
14614struct stat st;
14615st.st_mtim.tv_nsec = 1;
14616
14617 ;
14618 return 0;
14619}
14620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014622 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014623else
Matthias Kloseb9621712010-04-24 17:59:49 +000014624 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14627fi
14628
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14630$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014631if test "$ac_cv_stat_tv_nsec" = yes
14632then
14633
Matthias Kloseb9621712010-04-24 17:59:49 +000014634$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014635
14636fi
14637
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014638# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14640$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014641if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014643else
Matthias Kloseb9621712010-04-24 17:59:49 +000014644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014645/* end confdefs.h. */
14646#include <sys/stat.h>
14647int
14648main ()
14649{
14650
14651struct stat st;
14652st.st_mtimespec.tv_nsec = 1;
14653
14654 ;
14655 return 0;
14656}
14657_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014658if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014659 ac_cv_stat_tv_nsec2=yes
14660else
Matthias Kloseb9621712010-04-24 17:59:49 +000014661 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14664fi
14665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14667$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014668if test "$ac_cv_stat_tv_nsec2" = yes
14669then
14670
Matthias Kloseb9621712010-04-24 17:59:49 +000014671$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014672
14673fi
14674
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014675# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014676ac_save_cppflags="$CPPFLAGS"
14677CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014678
14679for ac_header in curses.h ncurses.h
14680do :
14681 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14682ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14683if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14684 cat >>confdefs.h <<_ACEOF
14685#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14686_ACEOF
14687
14688fi
14689
14690done
14691
14692
14693# On Solaris, term.h requires curses.h
14694for ac_header in term.h
14695do :
14696 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14697#ifdef HAVE_CURSES_H
14698#include <curses.h>
14699#endif
14700
14701"
14702if test "x$ac_cv_header_term_h" = xyes; then :
14703 cat >>confdefs.h <<_ACEOF
14704#define HAVE_TERM_H 1
14705_ACEOF
14706
14707fi
14708
14709done
14710
14711
Jack Jansen666b1e72001-10-31 12:11:48 +000014712# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14714$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014715if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014719/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014720#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014721int
14722main ()
14723{
Jack Jansen666b1e72001-10-31 12:11:48 +000014724
14725 int rtn;
14726 rtn = mvwdelch(0,0,0);
14727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728 ;
14729 return 0;
14730}
14731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014732if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014733 ac_cv_mvwdelch_is_expression=yes
14734else
Matthias Kloseb9621712010-04-24 17:59:49 +000014735 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14738fi
14739
Matthias Kloseb9621712010-04-24 17:59:49 +000014740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14741$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014742
14743if test "$ac_cv_mvwdelch_is_expression" = yes
14744then
Martin v. Löwis11437992002-04-12 09:54:03 +000014745
Matthias Kloseb9621712010-04-24 17:59:49 +000014746$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014747
14748fi
14749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14751$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014753 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014756/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014757#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014758int
14759main ()
14760{
Jack Jansen666b1e72001-10-31 12:11:48 +000014761
14762 WINDOW *w;
14763 w->_flags = 0;
14764
Martin v. Löwis11437992002-04-12 09:54:03 +000014765 ;
14766 return 0;
14767}
14768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014769if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014770 ac_cv_window_has_flags=yes
14771else
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14775fi
14776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14778$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014779
Jack Jansen666b1e72001-10-31 12:11:48 +000014780
14781if test "$ac_cv_window_has_flags" = yes
14782then
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014785
14786fi
14787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14789$as_echo_n "checking for is_term_resized... " >&6; }
14790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014791/* end confdefs.h. */
14792#include <curses.h>
14793int
14794main ()
14795{
14796void *x=is_term_resized
14797 ;
14798 return 0;
14799}
14800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014804
Matthias Kloseb159a552010-04-25 21:00:44 +000014805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014806$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14809$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014810
14811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14815$as_echo_n "checking for resize_term... " >&6; }
14816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014817/* end confdefs.h. */
14818#include <curses.h>
14819int
14820main ()
14821{
14822void *x=resize_term
14823 ;
14824 return 0;
14825}
14826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014830
Matthias Kloseb159a552010-04-25 21:00:44 +000014831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014832$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14835$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014836
14837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14841$as_echo_n "checking for resizeterm... " >&6; }
14842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014843/* end confdefs.h. */
14844#include <curses.h>
14845int
14846main ()
14847{
14848void *x=resizeterm
14849 ;
14850 return 0;
14851}
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014856
Matthias Kloseb159a552010-04-25 21:00:44 +000014857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014858$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014859else
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14861$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014862
14863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014865# last curses configure check
14866CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14869$as_echo "$as_me: checking for device files" >&6;}
14870
14871if test "x$cross_compiling" = xyes; then
14872 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14874$as_echo_n "checking for /dev/ptmx... " >&6; }
14875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14876$as_echo "not set" >&6; }
14877 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14878 fi
14879 if test "${ac_cv_file__dev_ptc+set}" != set; then
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14881$as_echo_n "checking for /dev/ptc... " >&6; }
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14883$as_echo "not set" >&6; }
14884 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14885 fi
14886fi
14887
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14889$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014890if ${ac_cv_file__dev_ptmx+:} false; then :
14891 $as_echo_n "(cached) " >&6
14892else
14893 test "$cross_compiling" = yes &&
14894 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14895if test -r "/dev/ptmx"; then
14896 ac_cv_file__dev_ptmx=yes
14897else
14898 ac_cv_file__dev_ptmx=no
14899fi
14900fi
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14902$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14903if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014904
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014905fi
14906
14907if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014910
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14913$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014914if ${ac_cv_file__dev_ptc+:} false; then :
14915 $as_echo_n "(cached) " >&6
14916else
14917 test "$cross_compiling" = yes &&
14918 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14919if test -r "/dev/ptc"; then
14920 ac_cv_file__dev_ptc=yes
14921else
14922 ac_cv_file__dev_ptc=no
14923fi
14924fi
14925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14926$as_echo "$ac_cv_file__dev_ptc" >&6; }
14927if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014928
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014929fi
14930
14931if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014932
Matthias Kloseb9621712010-04-24 17:59:49 +000014933$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014934
Neal Norwitz865400f2003-03-21 01:42:58 +000014935fi
14936
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014937if test "$have_long_long" = yes
14938then
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14940$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014941 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014943else
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014945 ac_cv_have_long_long_format="cross -- assuming no"
14946 if test x$GCC = xyes; then
14947 save_CFLAGS=$CFLAGS
14948 CFLAGS="$CFLAGS -Werror -Wformat"
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950/* end confdefs.h. */
14951
14952 #include <stdio.h>
14953 #include <stddef.h>
14954
14955int
14956main ()
14957{
14958
14959 char *buffer;
14960 sprintf(buffer, "%lld", (long long)123);
14961 sprintf(buffer, "%lld", (long long)-123);
14962 sprintf(buffer, "%llu", (unsigned long long)123);
14963
14964 ;
14965 return 0;
14966}
14967_ACEOF
14968if ac_fn_c_try_compile "$LINENO"; then :
14969 ac_cv_have_long_long_format=yes
14970
14971fi
14972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973 CFLAGS=$save_CFLAGS
14974 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014975else
Matthias Kloseb9621712010-04-24 17:59:49 +000014976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014977/* end confdefs.h. */
14978
14979 #include <stdio.h>
14980 #include <stddef.h>
14981 #include <string.h>
14982
14983 #ifdef HAVE_SYS_TYPES_H
14984 #include <sys/types.h>
14985 #endif
14986
14987 int main()
14988 {
14989 char buffer[256];
14990
14991 if (sprintf(buffer, "%lld", (long long)123) < 0)
14992 return 1;
14993 if (strcmp(buffer, "123"))
14994 return 1;
14995
14996 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14997 return 1;
14998 if (strcmp(buffer, "-123"))
14999 return 1;
15000
15001 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15002 return 1;
15003 if (strcmp(buffer, "123"))
15004 return 1;
15005
15006 return 0;
15007 }
15008
15009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015010if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015011 ac_cv_have_long_long_format=yes
15012else
Matthias Kloseb9621712010-04-24 17:59:49 +000015013 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015014fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15016 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015017fi
15018
15019
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015020fi
15021
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15023$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015024fi
15025
Mark Dickinson89d7d412009-12-31 20:50:59 +000015026if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015027then
15028
Matthias Kloseb9621712010-04-24 17:59:49 +000015029$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015030
15031fi
15032
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015033if test $ac_sys_system = Darwin
15034then
15035 LIBS="$LIBS -framework CoreFoundation"
15036fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015037
Matthias Kloseb9621712010-04-24 17:59:49 +000015038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15039$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015040if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015041 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015042else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015044 ac_cv_have_size_t_format="cross -- assuming yes"
15045
Thomas Wouters477c8d52006-05-27 19:21:47 +000015046else
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015048/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015049
Thomas Wouters477c8d52006-05-27 19:21:47 +000015050#include <stdio.h>
15051#include <stddef.h>
15052#include <string.h>
15053
Christian Heimes2c181612007-12-17 20:04:13 +000015054#ifdef HAVE_SYS_TYPES_H
15055#include <sys/types.h>
15056#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015057
15058#ifdef HAVE_SSIZE_T
15059typedef ssize_t Py_ssize_t;
15060#elif SIZEOF_VOID_P == SIZEOF_LONG
15061typedef long Py_ssize_t;
15062#else
15063typedef int Py_ssize_t;
15064#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015065
Christian Heimes2c181612007-12-17 20:04:13 +000015066int main()
15067{
15068 char buffer[256];
15069
Thomas Wouters477c8d52006-05-27 19:21:47 +000015070 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15071 return 1;
15072
Thomas Wouters89f507f2006-12-13 04:49:30 +000015073 if (strcmp(buffer, "123"))
15074 return 1;
15075
15076 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15077 return 1;
15078
15079 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015080 return 1;
15081
15082 return 0;
15083}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015084
Thomas Wouters477c8d52006-05-27 19:21:47 +000015085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015086if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015087 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015088else
Matthias Kloseb9621712010-04-24 17:59:49 +000015089 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015093fi
15094
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015095fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15097$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015098if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015101
15102fi
15103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015105#ifdef HAVE_SYS_TYPES_H
15106#include <sys/types.h>
15107#endif
15108#ifdef HAVE_SYS_SOCKET_H
15109#include <sys/socket.h>
15110#endif
15111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112"
Victor Stinnere0be4232011-10-25 13:06:09 +020015113if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015114
Martin v. Löwis11437992002-04-12 09:54:03 +000015115else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015118
15119fi
15120
Michael W. Hudson54241132001-12-07 15:38:26 +000015121
Matthias Kloseb9621712010-04-24 17:59:49 +000015122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15123$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015124if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015126else
Matthias Kloseb9621712010-04-24 17:59:49 +000015127 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015128 ac_cv_broken_mbstowcs=no
15129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015131/* end confdefs.h. */
15132
Stefan Krah19c21392012-11-22 23:47:32 +010015133#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015134#include<stdlib.h>
15135int main() {
15136 size_t len = -1;
15137 const char *str = "text";
15138 len = mbstowcs(NULL, str, 0);
15139 return (len != 4);
15140}
15141
15142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015144 ac_cv_broken_mbstowcs=no
15145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015150fi
15151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015152fi
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15155$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015156if test "$ac_cv_broken_mbstowcs" = yes
15157then
15158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015160
15161fi
15162
Antoine Pitroub52ec782009-01-25 16:34:23 +000015163# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15165$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015166
15167# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015169 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015170if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015171then
15172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15176$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015177fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015178if test "$withval" = no
15179then
15180
15181$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15184$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015185fi
15186
Antoine Pitrou042b1282010-08-13 21:15:58 +000015187else
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15189$as_echo "no value specified" >&6; }
15190fi
15191
Antoine Pitroub52ec782009-01-25 16:34:23 +000015192
Matthias Kloseb17289e2012-03-15 19:51:34 +010015193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15194$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15195if ${ac_cv_computed_gotos+:} false; then :
15196 $as_echo_n "(cached) " >&6
15197else
15198 if test "$cross_compiling" = yes; then :
15199 if test "${with_computed_gotos+set}" = set; then
15200 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15201 else
15202 ac_cv_computed_gotos=no
15203 fi
15204else
15205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15206/* end confdefs.h. */
15207
15208int main(int argc, char **argv)
15209{
15210 static void *targets[1] = { &&LABEL1 };
15211 goto LABEL2;
15212LABEL1:
15213 return 0;
15214LABEL2:
15215 goto *targets[0];
15216 return 1;
15217}
15218
15219_ACEOF
15220if ac_fn_c_try_run "$LINENO"; then :
15221 ac_cv_computed_gotos=yes
15222else
15223 ac_cv_computed_gotos=no
15224fi
15225rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15226 conftest.$ac_objext conftest.beam conftest.$ac_ext
15227fi
15228
15229fi
15230
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15232$as_echo "$ac_cv_computed_gotos" >&6; }
15233case "$ac_cv_computed_gotos" in yes*)
15234
15235$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15236
15237esac
15238
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015239case $ac_sys_system in
15240AIX*)
15241
15242$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15243 ;;
15244esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015245
Michael W. Hudson54241132001-12-07 15:38:26 +000015246
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015247
15248
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015249for h in `(cd $srcdir;echo Python/thread_*.h)`
15250do
15251 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15252done
15253
Michael W. Hudson54241132001-12-07 15:38:26 +000015254
Neal Norwitzd24499d2005-12-18 21:36:39 +000015255SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15257$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015258for dir in $SRCDIRS; do
15259 if test ! -d $dir; then
15260 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015261 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015262done
Matthias Kloseb9621712010-04-24 17:59:49 +000015263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15264$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015265
Stefan Krah1919b7e2012-03-21 18:25:23 +010015266# Availability of -O2:
15267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15268$as_echo_n "checking for -O2... " >&6; }
15269saved_cflags="$CFLAGS"
15270CFLAGS="-O2"
15271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272/* end confdefs.h. */
15273
15274int
15275main ()
15276{
15277
15278
15279 ;
15280 return 0;
15281}
15282_ACEOF
15283if ac_fn_c_try_compile "$LINENO"; then :
15284 have_O2=yes
15285else
15286 have_O2=no
15287fi
15288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15290$as_echo "$have_O2" >&6; }
15291CFLAGS="$saved_cflags"
15292
15293# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15294# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15296$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15297saved_cflags="$CFLAGS"
15298CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15299if test "$have_O2" = no; then
15300 CFLAGS=""
15301fi
15302if test "$cross_compiling" = yes; then :
15303 have_glibc_memmove_bug=undefined
15304else
15305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15306/* end confdefs.h. */
15307
15308#include <stdio.h>
15309#include <stdlib.h>
15310#include <string.h>
15311void foo(void *p, void *q) { memmove(p, q, 19); }
15312int main() {
15313 char a[32] = "123456789000000000";
15314 foo(&a[9], a);
15315 if (strcmp(a, "123456789123456789000000000") != 0)
15316 return 1;
15317 foo(a, &a[9]);
15318 if (strcmp(a, "123456789000000000") != 0)
15319 return 1;
15320 return 0;
15321}
15322
15323_ACEOF
15324if ac_fn_c_try_run "$LINENO"; then :
15325 have_glibc_memmove_bug=no
15326else
15327 have_glibc_memmove_bug=yes
15328fi
15329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15330 conftest.$ac_objext conftest.beam conftest.$ac_ext
15331fi
15332
15333CFLAGS="$saved_cflags"
15334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15335$as_echo "$have_glibc_memmove_bug" >&6; }
15336if test "$have_glibc_memmove_bug" = yes; then
15337
15338$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15339
15340fi
15341
15342if test "$have_gcc_asm_for_x87" = yes; then
15343 # Some versions of gcc miscompile inline asm:
15344 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15345 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15346 case $CC in
15347 *gcc*)
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15349$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15350 saved_cflags="$CFLAGS"
15351 CFLAGS="-O2"
15352 if test "$cross_compiling" = yes; then :
15353 have_ipa_pure_const_bug=undefined
15354else
15355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15356/* end confdefs.h. */
15357
15358 __attribute__((noinline)) int
15359 foo(int *p) {
15360 int r;
15361 asm ( "movl \$6, (%1)\n\t"
15362 "xorl %0, %0\n\t"
15363 : "=r" (r) : "r" (p) : "memory"
15364 );
15365 return r;
15366 }
15367 int main() {
15368 int p = 8;
15369 if ((foo(&p) ? : p) != 6)
15370 return 1;
15371 return 0;
15372 }
15373
15374_ACEOF
15375if ac_fn_c_try_run "$LINENO"; then :
15376 have_ipa_pure_const_bug=no
15377else
15378 have_ipa_pure_const_bug=yes
15379fi
15380rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15381 conftest.$ac_objext conftest.beam conftest.$ac_ext
15382fi
15383
15384 CFLAGS="$saved_cflags"
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15386$as_echo "$have_ipa_pure_const_bug" >&6; }
15387 if test "$have_ipa_pure_const_bug" = yes; then
15388
15389$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15390
15391 fi
15392 ;;
15393 esac
15394fi
15395
Ned Deily322f5ba2013-11-21 23:01:59 -080015396# ensurepip option
15397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15398$as_echo_n "checking for ensurepip... " >&6; }
15399
15400# Check whether --with-ensurepip was given.
15401if test "${with_ensurepip+set}" = set; then :
15402 withval=$with_ensurepip;
15403else
15404 with_ensurepip=upgrade
15405fi
15406
15407case $with_ensurepip in #(
15408 yes|upgrade) :
15409 ENSUREPIP=upgrade ;; #(
15410 install) :
15411 ENSUREPIP=install ;; #(
15412 no) :
15413 ENSUREPIP=no ;; #(
15414 *) :
15415 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15416esac
15417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15418$as_echo "$ENSUREPIP" >&6; }
15419
15420
Guido van Rossum627b2d71993-12-24 10:39:16 +000015421# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015422ac_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 +000015423
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015424ac_config_files="$ac_config_files Modules/ld_so_aix"
15425
Martin v. Löwis11437992002-04-12 09:54:03 +000015426cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015427# This file is a shell script that caches the results of configure
15428# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015429# scripts and configure runs, see configure's option --config-cache.
15430# It is not useful on other systems. If it contains results you don't
15431# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015432#
Martin v. Löwis11437992002-04-12 09:54:03 +000015433# config.status only pays attention to the cache file if you give it
15434# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015435#
Skip Montanaro6dead952003-09-25 14:50:04 +000015436# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015437# loading this file, other *unset* `ac_cv_foo' will be assigned the
15438# following values.
15439
15440_ACEOF
15441
Guido van Rossumf78abae1997-01-21 22:02:36 +000015442# The following way of writing the cache mishandles newlines in values,
15443# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015444# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015445# Ultrix sh set writes to stderr and can't be redirected directly,
15446# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447(
15448 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15449 eval ac_val=\$$ac_var
15450 case $ac_val in #(
15451 *${as_nl}*)
15452 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15454$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015455 esac
15456 case $ac_var in #(
15457 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015458 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15459 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460 esac ;;
15461 esac
15462 done
15463
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015465 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15466 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015467 # `set' does not quote correctly, so add quotes: double-quote
15468 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015470 "s/'/'\\\\''/g;
15471 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015472 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 *)
15474 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015475 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015476 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015477 esac |
15478 sort
15479) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015480 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015481 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15485 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15487 :end' >>confcache
15488if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15489 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015490 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015491 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15492$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015493 if test ! -f "$cache_file" || test -h "$cache_file"; then
15494 cat confcache >"$cache_file"
15495 else
15496 case $cache_file in #(
15497 */* | ?:*)
15498 mv -f confcache "$cache_file"$$ &&
15499 mv -f "$cache_file"$$ "$cache_file" ;; #(
15500 *)
15501 mv -f confcache "$cache_file" ;;
15502 esac
15503 fi
15504 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015505 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015506 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15507$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015508 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015509fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015510rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015511
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015512test "x$prefix" = xNONE && prefix=$ac_default_prefix
15513# Let make expand exec_prefix.
15514test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015516DEFS=-DHAVE_CONFIG_H
15517
Skip Montanaro6dead952003-09-25 14:50:04 +000015518ac_libobjs=
15519ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015520U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015521for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15522 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015523 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015525 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15526 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015527 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15528 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015529done
15530LIBOBJS=$ac_libobjs
15531
15532LTLIBOBJS=$ac_ltlibobjs
15533
15534
Martin v. Löwis11437992002-04-12 09:54:03 +000015535
Matthias Kloseb9621712010-04-24 17:59:49 +000015536
Victor Stinnere0be4232011-10-25 13:06:09 +020015537: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015538ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015539ac_clean_files_save=$ac_clean_files
15540ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015541{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15542$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15543as_write_fail=0
15544cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015545#! $SHELL
15546# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015547# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015548# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015549# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015550
Martin v. Löwis11437992002-04-12 09:54:03 +000015551debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015552ac_cs_recheck=false
15553ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015554
Matthias Kloseb9621712010-04-24 17:59:49 +000015555SHELL=\${CONFIG_SHELL-$SHELL}
15556export SHELL
15557_ASEOF
15558cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15559## -------------------- ##
15560## M4sh Initialization. ##
15561## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563# Be more Bourne compatible
15564DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015565if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 emulate sh
15567 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015568 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015569 # is contrary to our usage. Disable this feature.
15570 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015572else
Matthias Kloseb9621712010-04-24 17:59:49 +000015573 case `(set -o) 2>/dev/null` in #(
15574 *posix*) :
15575 set -o posix ;; #(
15576 *) :
15577 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015578esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015579fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015580
15581
Matthias Kloseb9621712010-04-24 17:59:49 +000015582as_nl='
15583'
15584export as_nl
15585# Printing a long string crashes Solaris 7 /usr/bin/printf.
15586as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15587as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15588as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15589# Prefer a ksh shell builtin over an external printf program on Solaris,
15590# but without wasting forks for bash or zsh.
15591if test -z "$BASH_VERSION$ZSH_VERSION" \
15592 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15593 as_echo='print -r --'
15594 as_echo_n='print -rn --'
15595elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15596 as_echo='printf %s\n'
15597 as_echo_n='printf %s'
15598else
15599 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15600 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15601 as_echo_n='/usr/ucb/echo -n'
15602 else
15603 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15604 as_echo_n_body='eval
15605 arg=$1;
15606 case $arg in #(
15607 *"$as_nl"*)
15608 expr "X$arg" : "X\\(.*\\)$as_nl";
15609 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15610 esac;
15611 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15612 '
15613 export as_echo_n_body
15614 as_echo_n='sh -c $as_echo_n_body as_echo'
15615 fi
15616 export as_echo_body
15617 as_echo='sh -c $as_echo_body as_echo'
15618fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015619
15620# The user is always right.
15621if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015622 PATH_SEPARATOR=:
15623 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15624 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15625 PATH_SEPARATOR=';'
15626 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015629
15630# IFS
15631# We need space, tab and new line, in precisely that order. Quoting is
15632# there to prevent editors from complaining about space-tab.
15633# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15634# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635IFS=" "" $as_nl"
15636
15637# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015638as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015639case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640 *[\\/]* ) as_myself=$0 ;;
15641 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015642for as_dir in $PATH
15643do
15644 IFS=$as_save_IFS
15645 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15647 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650 ;;
15651esac
15652# We did not find ourselves, most probably we were run as `sh COMMAND'
15653# in which case we are not to be found in the path.
15654if test "x$as_myself" = x; then
15655 as_myself=$0
15656fi
15657if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15659 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660fi
15661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662# Unset variables that we do not need and which cause bugs (e.g. in
15663# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15664# suppresses any "Segmentation fault" message there. '((' could
15665# trigger a bug in pdksh 5.2.14.
15666for as_var in BASH_ENV ENV MAIL MAILPATH
15667do eval test x\${$as_var+set} = xset \
15668 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669done
15670PS1='$ '
15671PS2='> '
15672PS4='+ '
15673
15674# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015675LC_ALL=C
15676export LC_ALL
15677LANGUAGE=C
15678export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680# CDPATH.
15681(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15682
15683
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015684# as_fn_error STATUS ERROR [LINENO LOG_FD]
15685# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015686# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15687# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015688# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015689as_fn_error ()
15690{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015691 as_status=$1; test $as_status -eq 0 && as_status=1
15692 if test "$4"; then
15693 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15694 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015696 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 as_fn_exit $as_status
15698} # as_fn_error
15699
15700
15701# as_fn_set_status STATUS
15702# -----------------------
15703# Set $? to STATUS, without forking.
15704as_fn_set_status ()
15705{
15706 return $1
15707} # as_fn_set_status
15708
15709# as_fn_exit STATUS
15710# -----------------
15711# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15712as_fn_exit ()
15713{
15714 set +e
15715 as_fn_set_status $1
15716 exit $1
15717} # as_fn_exit
15718
15719# as_fn_unset VAR
15720# ---------------
15721# Portably unset VAR.
15722as_fn_unset ()
15723{
15724 { eval $1=; unset $1;}
15725}
15726as_unset=as_fn_unset
15727# as_fn_append VAR VALUE
15728# ----------------------
15729# Append the text in VALUE to the end of the definition contained in VAR. Take
15730# advantage of any shell optimizations that allow amortized linear growth over
15731# repeated appends, instead of the typical quadratic growth present in naive
15732# implementations.
15733if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15734 eval 'as_fn_append ()
15735 {
15736 eval $1+=\$2
15737 }'
15738else
15739 as_fn_append ()
15740 {
15741 eval $1=\$$1\$2
15742 }
15743fi # as_fn_append
15744
15745# as_fn_arith ARG...
15746# ------------------
15747# Perform arithmetic evaluation on the ARGs, and store the result in the
15748# global $as_val. Take advantage of shells that can avoid forks. The arguments
15749# must be portable across $(()) and expr.
15750if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15751 eval 'as_fn_arith ()
15752 {
15753 as_val=$(( $* ))
15754 }'
15755else
15756 as_fn_arith ()
15757 {
15758 as_val=`expr "$@" || test $? -eq 1`
15759 }
15760fi # as_fn_arith
15761
15762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015763if expr a : '\(a\)' >/dev/null 2>&1 &&
15764 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15765 as_expr=expr
15766else
15767 as_expr=false
15768fi
15769
15770if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15771 as_basename=basename
15772else
15773 as_basename=false
15774fi
15775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15777 as_dirname=dirname
15778else
15779 as_dirname=false
15780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782as_me=`$as_basename -- "$0" ||
15783$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15784 X"$0" : 'X\(//\)$' \| \
15785 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015786$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787 sed '/^.*\/\([^/][^/]*\)\/*$/{
15788 s//\1/
15789 q
15790 }
15791 /^X\/\(\/\/\)$/{
15792 s//\1/
15793 q
15794 }
15795 /^X\/\(\/\).*/{
15796 s//\1/
15797 q
15798 }
15799 s/.*/./; q'`
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801# Avoid depending upon Character Ranges.
15802as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15803as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15804as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15805as_cr_digits='0123456789'
15806as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807
15808ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015809case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 xy) ECHO_C='\c';;
15814 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15815 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816 esac;;
15817*)
15818 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015819esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015822if test -d conf$$.dir; then
15823 rm -f conf$$.dir/conf$$.file
15824else
15825 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015828if (echo >conf$$.file) 2>/dev/null; then
15829 if ln -s conf$$.file conf$$ 2>/dev/null; then
15830 as_ln_s='ln -s'
15831 # ... but there are two gotchas:
15832 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15833 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015834 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015836 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 elif ln conf$$.file conf$$ 2>/dev/null; then
15838 as_ln_s=ln
15839 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015840 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015842else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015843 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15846rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
Matthias Kloseb9621712010-04-24 17:59:49 +000015848
15849# as_fn_mkdir_p
15850# -------------
15851# Create "$as_dir" as a directory, including parents if necessary.
15852as_fn_mkdir_p ()
15853{
15854
15855 case $as_dir in #(
15856 -*) as_dir=./$as_dir;;
15857 esac
15858 test -d "$as_dir" || eval $as_mkdir_p || {
15859 as_dirs=
15860 while :; do
15861 case $as_dir in #(
15862 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15863 *) as_qdir=$as_dir;;
15864 esac
15865 as_dirs="'$as_qdir' $as_dirs"
15866 as_dir=`$as_dirname -- "$as_dir" ||
15867$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15868 X"$as_dir" : 'X\(//\)[^/]' \| \
15869 X"$as_dir" : 'X\(//\)$' \| \
15870 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15871$as_echo X"$as_dir" |
15872 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15873 s//\1/
15874 q
15875 }
15876 /^X\(\/\/\)[^/].*/{
15877 s//\1/
15878 q
15879 }
15880 /^X\(\/\/\)$/{
15881 s//\1/
15882 q
15883 }
15884 /^X\(\/\).*/{
15885 s//\1/
15886 q
15887 }
15888 s/.*/./; q'`
15889 test -d "$as_dir" && break
15890 done
15891 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015892 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015893
15894
15895} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015896if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015897 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015898else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015899 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015900 as_mkdir_p=false
15901fi
15902
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015903
15904# as_fn_executable_p FILE
15905# -----------------------
15906# Test if FILE is an executable regular file.
15907as_fn_executable_p ()
15908{
15909 test -f "$1" && test -x "$1"
15910} # as_fn_executable_p
15911as_test_x='test -x'
15912as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015913
15914# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015915as_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 +000015916
15917# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015918as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
15920
Martin v. Löwis11437992002-04-12 09:54:03 +000015921exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015922## ----------------------------------- ##
15923## Main body of $CONFIG_STATUS script. ##
15924## ----------------------------------- ##
15925_ASEOF
15926test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Matthias Kloseb9621712010-04-24 17:59:49 +000015928cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15929# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015930# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931# values after options handling.
15932ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015933This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015934generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
15936 CONFIG_FILES = $CONFIG_FILES
15937 CONFIG_HEADERS = $CONFIG_HEADERS
15938 CONFIG_LINKS = $CONFIG_LINKS
15939 CONFIG_COMMANDS = $CONFIG_COMMANDS
15940 $ $0 $@
15941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015942on `(hostname || uname -n) 2>/dev/null | sed 1q`
15943"
15944
Martin v. Löwis11437992002-04-12 09:54:03 +000015945_ACEOF
15946
Matthias Kloseb9621712010-04-24 17:59:49 +000015947case $ac_config_files in *"
15948"*) set x $ac_config_files; shift; ac_config_files=$*;;
15949esac
15950
15951case $ac_config_headers in *"
15952"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15953esac
15954
15955
15956cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015957# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015958config_files="$ac_config_files"
15959config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015961_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015964ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015965\`$as_me' instantiates files and other configuration actions
15966from templates according to the current configuration. Unless the files
15967and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015968
Matthias Kloseb9621712010-04-24 17:59:49 +000015969Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015973 --config print configuration, then exit
15974 -q, --quiet, --silent
15975 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015976 -d, --debug don't remove temporary files
15977 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015978 --file=FILE[:TEMPLATE]
15979 instantiate the configuration file FILE
15980 --header=FILE[:TEMPLATE]
15981 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015982
15983Configuration files:
15984$config_files
15985
15986Configuration headers:
15987$config_headers
15988
Matthias Kloseb9621712010-04-24 17:59:49 +000015989Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15993ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015994ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015995python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015996configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015998
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015999Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016000This config.status script is free software; the Free Software Foundation
16001gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016002
16003ac_pwd='$ac_pwd'
16004srcdir='$srcdir'
16005INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016006MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016007test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016008_ACEOF
16009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16011# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016012ac_need_defaults=:
16013while test $# != 0
16014do
16015 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016016 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016017 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16018 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016019 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016021 --*=)
16022 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16023 ac_optarg=
16024 ac_shift=:
16025 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016027 ac_option=$1
16028 ac_optarg=$2
16029 ac_shift=shift
16030 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 esac
16032
Skip Montanaro6dead952003-09-25 14:50:04 +000016033 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016035 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16036 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016038 $as_echo "$ac_cs_version"; exit ;;
16039 --config | --confi | --conf | --con | --co | --c )
16040 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 debug=: ;;
16043 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016044 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 case $ac_optarg in
16046 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016047 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016048 esac
16049 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016050 ac_need_defaults=false;;
16051 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016052 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 case $ac_optarg in
16054 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16055 esac
16056 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016057 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058 --he | --h)
16059 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016060 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016061Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016062 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016063 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016064 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16065 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16066 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016067
16068 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016069 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016070Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016071
Matthias Kloseb9621712010-04-24 17:59:49 +000016072 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016074
16075 esac
16076 shift
16077done
16078
Skip Montanaro6dead952003-09-25 14:50:04 +000016079ac_configure_extra_args=
16080
16081if $ac_cs_silent; then
16082 exec 6>/dev/null
16083 ac_configure_extra_args="$ac_configure_extra_args --silent"
16084fi
16085
16086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016088if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016089 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016090 shift
16091 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16092 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016093 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016095fi
16096
Martin v. Löwis11437992002-04-12 09:54:03 +000016097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099exec 5>>config.log
16100{
16101 echo
16102 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16103## Running $as_me. ##
16104_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016105 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016109cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016110_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016111
Matthias Kloseb9621712010-04-24 17:59:49 +000016112cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113
16114# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016115for ac_config_target in $ac_config_targets
16116do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016117 case $ac_config_target in
16118 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16119 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16120 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016121 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16122 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16124 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016125 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016126 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016127 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016128
Victor Stinnere0be4232011-10-25 13:06:09 +020016129 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 esac
16131done
16132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016133
Martin v. Löwis11437992002-04-12 09:54:03 +000016134# If the user did not use the arguments to specify the items to instantiate,
16135# then the envvar interface is used. Set only those that are not.
16136# We use the long form for the default assignment because of an extremely
16137# bizarre bug on SunOS 4.1.3.
16138if $ac_need_defaults; then
16139 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16140 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16141fi
16142
Skip Montanaro6dead952003-09-25 14:50:04 +000016143# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016145# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016146# Hook for its removal unless debugging.
16147# Note that there is a small window in which the directory will not be cleaned:
16148# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016149$debug ||
16150{
Victor Stinnere0be4232011-10-25 13:06:09 +020016151 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016152 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016153 : "${ac_tmp:=$tmp}"
16154 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016156 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016157}
Martin v. Löwis11437992002-04-12 09:54:03 +000016158# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016159
Martin v. Löwis11437992002-04-12 09:54:03 +000016160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016161 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016162 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016163} ||
16164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 tmp=./conf$$-$RANDOM
16166 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016167} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016168ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016169
Matthias Kloseb9621712010-04-24 17:59:49 +000016170# Set up the scripts for CONFIG_FILES section.
16171# No need to generate them if there are no CONFIG_FILES.
16172# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016174
Matthias Kloseb9621712010-04-24 17:59:49 +000016175
16176ac_cr=`echo X | tr X '\015'`
16177# On cygwin, bash can eat \r inside `` if the user requested igncr.
16178# But we know of no other shell where ac_cr would be empty at this
16179# point, so we can use a bashism as a fallback.
16180if test "x$ac_cr" = x; then
16181 eval ac_cr=\$\'\\r\'
16182fi
16183ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16184if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016185 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016186else
16187 ac_cs_awk_cr=$ac_cr
16188fi
16189
Victor Stinnere0be4232011-10-25 13:06:09 +020016190echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016191_ACEOF
16192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194{
16195 echo "cat >conf$$subs.awk <<_ACEOF" &&
16196 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16197 echo "_ACEOF"
16198} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016199 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16200ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201ac_delim='%!_!# '
16202for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016203 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016204 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16207 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 break
16209 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016210 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016211 else
16212 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214done
Matthias Kloseb9621712010-04-24 17:59:49 +000016215rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216
Matthias Kloseb9621712010-04-24 17:59:49 +000016217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016218cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016220sed -n '
16221h
16222s/^/S["/; s/!.*/"]=/
16223p
16224g
16225s/^[^!]*!//
16226:repl
16227t repl
16228s/'"$ac_delim"'$//
16229t delim
16230:nl
16231h
16232s/\(.\{148\}\)..*/\1/
16233t more1
16234s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16235p
16236n
16237b repl
16238:more1
16239s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16240p
16241g
16242s/.\{148\}//
16243t nl
16244:delim
16245h
16246s/\(.\{148\}\)..*/\1/
16247t more2
16248s/["\\]/\\&/g; s/^/"/; s/$/"/
16249p
16250b
16251:more2
16252s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16253p
16254g
16255s/.\{148\}//
16256t delim
16257' <conf$$subs.awk | sed '
16258/^[^""]/{
16259 N
16260 s/\n//
16261}
16262' >>$CONFIG_STATUS || ac_write_fail=1
16263rm -f conf$$subs.awk
16264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16265_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016266cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016267 for (key in S) S_is_set[key] = 1
16268 FS = ""
16269
16270}
16271{
16272 line = $ 0
16273 nfields = split(line, field, "@")
16274 substed = 0
16275 len = length(field[1])
16276 for (i = 2; i < nfields; i++) {
16277 key = field[i]
16278 keylen = length(key)
16279 if (S_is_set[key]) {
16280 value = S[key]
16281 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16282 len += length(value) + length(field[++i])
16283 substed = 1
16284 } else
16285 len += 1 + keylen
16286 }
16287
16288 print line
16289}
16290
16291_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16294if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16295 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16296else
16297 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016298fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016299 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016300_ACEOF
16301
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016302# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16303# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304# trailing colons and then remove the whole line if VPATH becomes empty
16305# (actually we leave an empty line to preserve line numbers).
16306if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016307 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16308h
16309s///
16310s/^/:/
16311s/[ ]*$/:/
16312s/:\$(srcdir):/:/g
16313s/:\${srcdir}:/:/g
16314s/:@srcdir@:/:/g
16315s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016317x
16318s/\(=[ ]*\).*/\1/
16319G
16320s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321s/^[^=]*=[ ]*$//
16322}'
16323fi
16324
Matthias Kloseb9621712010-04-24 17:59:49 +000016325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016326fi # test -n "$CONFIG_FILES"
16327
Matthias Kloseb9621712010-04-24 17:59:49 +000016328# Set up the scripts for CONFIG_HEADERS section.
16329# No need to generate them if there are no CONFIG_HEADERS.
16330# This happens for instance with `./config.status Makefile'.
16331if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016332cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016333BEGIN {
16334_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335
Matthias Kloseb9621712010-04-24 17:59:49 +000016336# Transform confdefs.h into an awk script `defines.awk', embedded as
16337# here-document in config.status, that substitutes the proper values into
16338# config.h.in to produce config.h.
16339
16340# Create a delimiter string that does not exist in confdefs.h, to ease
16341# handling of long lines.
16342ac_delim='%!_!# '
16343for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016344 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16345 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016346 break
16347 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016348 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016349 else
16350 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16351 fi
16352done
16353
16354# For the awk script, D is an array of macro values keyed by name,
16355# likewise P contains macro parameters if any. Preserve backslash
16356# newline sequences.
16357
16358ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16359sed -n '
16360s/.\{148\}/&'"$ac_delim"'/g
16361t rset
16362:rset
16363s/^[ ]*#[ ]*define[ ][ ]*/ /
16364t def
16365d
16366:def
16367s/\\$//
16368t bsnl
16369s/["\\]/\\&/g
16370s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16371D["\1"]=" \3"/p
16372s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16373d
16374:bsnl
16375s/["\\]/\\&/g
16376s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16377D["\1"]=" \3\\\\\\n"\\/p
16378t cont
16379s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16380t cont
16381d
16382:cont
16383n
16384s/.\{148\}/&'"$ac_delim"'/g
16385t clear
16386:clear
16387s/\\$//
16388t bsnlc
16389s/["\\]/\\&/g; s/^/"/; s/$/"/p
16390d
16391:bsnlc
16392s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16393b cont
16394' <confdefs.h | sed '
16395s/'"$ac_delim"'/"\\\
16396"/g' >>$CONFIG_STATUS || ac_write_fail=1
16397
16398cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16399 for (key in D) D_is_set[key] = 1
16400 FS = ""
16401}
16402/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16403 line = \$ 0
16404 split(line, arg, " ")
16405 if (arg[1] == "#") {
16406 defundef = arg[2]
16407 mac1 = arg[3]
16408 } else {
16409 defundef = substr(arg[1], 2)
16410 mac1 = arg[2]
16411 }
16412 split(mac1, mac2, "(") #)
16413 macro = mac2[1]
16414 prefix = substr(line, 1, index(line, defundef) - 1)
16415 if (D_is_set[macro]) {
16416 # Preserve the white space surrounding the "#".
16417 print prefix "define", macro P[macro] D[macro]
16418 next
16419 } else {
16420 # Replace #undef with comments. This is necessary, for example,
16421 # in the case of _POSIX_SOURCE, which is predefined and required
16422 # on some systems where configure will not decide to define it.
16423 if (defundef == "undef") {
16424 print "/*", prefix defundef, macro, "*/"
16425 next
16426 }
16427 }
16428}
16429{ print }
16430_ACAWK
16431_ACEOF
16432cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016433 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016434fi # test -n "$CONFIG_HEADERS"
16435
16436
16437eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16438shift
16439for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440do
16441 case $ac_tag in
16442 :[FHLC]) ac_mode=$ac_tag; continue;;
16443 esac
16444 case $ac_mode$ac_tag in
16445 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016446 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447 :[FH]-) ac_tag=-:-;;
16448 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16449 esac
16450 ac_save_IFS=$IFS
16451 IFS=:
16452 set x $ac_tag
16453 IFS=$ac_save_IFS
16454 shift
16455 ac_file=$1
16456 shift
16457
16458 case $ac_mode in
16459 :L) ac_source=$1;;
16460 :[FH])
16461 ac_file_inputs=
16462 for ac_f
16463 do
16464 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016465 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016466 *) # Look for the file first in the build tree, then in the source tree
16467 # (if the path is not absolute). The absolute path cannot be DOS-style,
16468 # because $ac_f cannot contain `:'.
16469 test -f "$ac_f" ||
16470 case $ac_f in
16471 [\\/$]*) false;;
16472 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16473 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016474 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016475 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016476 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16477 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016478 done
16479
16480 # Let's still pretend it is `configure' which instantiates (i.e., don't
16481 # use $as_me), people would be surprised to read:
16482 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016483 configure_input='Generated from '`
16484 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16485 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016486 if test x"$ac_file" != x-; then
16487 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016488 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16489$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016490 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016491 # Neutralize special characters interpreted by sed in replacement strings.
16492 case $configure_input in #(
16493 *\&* | *\|* | *\\* )
16494 ac_sed_conf_input=`$as_echo "$configure_input" |
16495 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16496 *) ac_sed_conf_input=$configure_input;;
16497 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498
16499 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016500 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16501 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502 esac
16503 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016504 esac
16505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016507$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016508 X"$ac_file" : 'X\(//\)[^/]' \| \
16509 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016511$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16513 s//\1/
16514 q
16515 }
16516 /^X\(\/\/\)[^/].*/{
16517 s//\1/
16518 q
16519 }
16520 /^X\(\/\/\)$/{
16521 s//\1/
16522 q
16523 }
16524 /^X\(\/\).*/{
16525 s//\1/
16526 q
16527 }
16528 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016529 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 ac_builddir=.
16531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532case "$ac_dir" in
16533.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16534*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016535 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016536 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016537 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016538 case $ac_top_builddir_sub in
16539 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16540 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16541 esac ;;
16542esac
16543ac_abs_top_builddir=$ac_pwd
16544ac_abs_builddir=$ac_pwd$ac_dir_suffix
16545# for backward compatibility:
16546ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016547
16548case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016550 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016551 ac_top_srcdir=$ac_top_builddir_sub
16552 ac_abs_top_srcdir=$ac_pwd ;;
16553 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 ac_top_srcdir=$srcdir
16556 ac_abs_top_srcdir=$srcdir ;;
16557 *) # Relative name.
16558 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16559 ac_top_srcdir=$ac_top_build_prefix$srcdir
16560 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016561esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016563
Martin v. Löwis11437992002-04-12 09:54:03 +000016564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016565 case $ac_mode in
16566 :F)
16567 #
16568 # CONFIG_FILE
16569 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016570
16571 case $INSTALL in
16572 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016574 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016575 ac_MKDIR_P=$MKDIR_P
16576 case $MKDIR_P in
16577 [\\/$]* | ?:[\\/]* ) ;;
16578 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16579 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016580_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016581
Matthias Kloseb9621712010-04-24 17:59:49 +000016582cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583# If the template does not know about datarootdir, expand it.
16584# FIXME: This hack should be removed a few years after 2.60.
16585ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016586ac_sed_dataroot='
16587/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 p
16589 q
16590}
16591/@datadir@/p
16592/@docdir@/p
16593/@infodir@/p
16594/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016595/@mandir@/p'
16596case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016597*datarootdir*) ac_datarootdir_seen=yes;;
16598*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16600$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016602cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603 ac_datarootdir_hack='
16604 s&@datadir@&$datadir&g
16605 s&@docdir@&$docdir&g
16606 s&@infodir@&$infodir&g
16607 s&@localedir@&$localedir&g
16608 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016609 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610esac
16611_ACEOF
16612
16613# Neutralize VPATH when `$srcdir' = `.'.
16614# Shell code in configure.ac might set extrasub.
16615# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016616cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16617ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016618$extrasub
16619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016621:t
16622/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016623s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016624s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016625s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016626s&@srcdir@&$ac_srcdir&;t t
16627s&@abs_srcdir@&$ac_abs_srcdir&;t t
16628s&@top_srcdir@&$ac_top_srcdir&;t t
16629s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16630s&@builddir@&$ac_builddir&;t t
16631s&@abs_builddir@&$ac_abs_builddir&;t t
16632s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16633s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016634s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016636"
Victor Stinnere0be4232011-10-25 13:06:09 +020016637eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16638 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016641 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16642 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16643 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016644 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016645which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016646$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016647which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016648
Victor Stinnere0be4232011-10-25 13:06:09 +020016649 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016650 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016651 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16652 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016653 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016654 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 ;;
16656 :H)
16657 #
16658 # CONFIG_HEADER
16659 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016661 {
16662 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016663 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16664 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016665 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016666 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016667 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16668$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016669 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016670 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016671 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016672 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 fi
16674 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016675 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016676 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016677 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016678 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681
16682 esac
16683
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016684
16685 case $ac_file$ac_mode in
16686 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16687
16688 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689done # for ac_tag
16690
Guido van Rossum627b2d71993-12-24 10:39:16 +000016691
Matthias Kloseb9621712010-04-24 17:59:49 +000016692as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016693_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016694ac_clean_files=$ac_clean_files_save
16695
Matthias Kloseb9621712010-04-24 17:59:49 +000016696test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016697 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016698
Martin v. Löwis11437992002-04-12 09:54:03 +000016699
16700# configure is writing to config.log, and then calls config.status.
16701# config.status does its own redirection, appending to config.log.
16702# Unfortunately, on DOS this fails, as config.log is still kept open
16703# by configure, so config.status won't be able to write to it; its
16704# output is simply discarded. So we exec the FD to /dev/null,
16705# effectively closing config.log, so it can be properly (re)opened and
16706# appended to by config.status. When coming back to configure, we
16707# need to make the FD available again.
16708if test "$no_create" != yes; then
16709 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016710 ac_config_status_args=
16711 test "$silent" = yes &&
16712 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016713 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016714 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016715 exec 5>>config.log
16716 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16717 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016718 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016719fi
16720if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16722$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016723fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016724
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016725
Christian Heimes75ed8902013-11-20 01:11:18 +010016726echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016727if test ! -f Modules/Setup
16728then
16729 cp $srcdir/Modules/Setup.dist Modules/Setup
16730fi
16731
Christian Heimes75ed8902013-11-20 01:11:18 +010016732echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016733if test ! -f Modules/Setup.local
16734then
16735 echo "# Edit this file for local setup changes" >Modules/Setup.local
16736fi
16737
Christian Heimes75ed8902013-11-20 01:11:18 +010016738echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016739$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16740 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016741 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016742mv config.c Modules