blob: 7b91f914d4a402b0d2f63b8c6a654191d6291682 [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
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
Matthias Kloseb9621712010-04-24 17:59:49 +0000655PKG_CONFIG
656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000670ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000671LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100672MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000673INSTALL_DATA
674INSTALL_SCRIPT
675INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200676PYTHON
677ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200678ac_ct_READELF
679READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000680ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200681ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000682AR
683RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000684USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000685GNULD
686LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000688RUNSHARED
689INSTSONAME
690LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000691PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000692BLDLIBRARY
693DLLLIBRARY
694LDLIBRARY
695LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100696MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BUILDEXEEXT
698EGREP
699GREP
700CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200701NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200702ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1345d202015-04-13 21:59:57 +0200714PLATDIR
Matthias Kloseb9621712010-04-24 17:59:49 +0000715SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200716_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000718FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800720FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000721FRAMEWORKALTINSTALLLAST
722FRAMEWORKALTINSTALLFIRST
723FRAMEWORKINSTALLLAST
724FRAMEWORKINSTALLFIRST
725PYTHONFRAMEWORKINSTALLDIR
726PYTHONFRAMEWORKPREFIX
727PYTHONFRAMEWORKDIR
728PYTHONFRAMEWORKIDENTIFIER
729PYTHONFRAMEWORK
730LIPO_32BIT_FLAGS
731ARCH_RUN_32BIT
732UNIVERSALSDK
733CONFIG_ARGS
734SOVERSION
735VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200736PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100737host_os
738host_vendor
739host_cpu
740host
741build_os
742build_vendor
743build_cpu
744build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500745HAS_HG
746HGBRANCH
747HGTAG
748HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400749BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000750target_alias
751host_alias
752build_alias
753LIBS
754ECHO_T
755ECHO_N
756ECHO_C
757DEFS
758mandir
759localedir
760libdir
761psdir
762pdfdir
763dvidir
764htmldir
765infodir
766docdir
767oldincludedir
768includedir
769localstatedir
770sharedstatedir
771sysconfdir
772datadir
773datarootdir
774libexecdir
775sbindir
776bindir
777program_transform_name
778prefix
779exec_prefix
780PACKAGE_URL
781PACKAGE_BUGREPORT
782PACKAGE_STRING
783PACKAGE_VERSION
784PACKAGE_TARNAME
785PACKAGE_NAME
786PATH_SEPARATOR
787SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000788ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000789ac_user_opts='
790enable_option_checking
791enable_universalsdk
792with_universal_archs
793with_framework_name
794enable_framework
795with_gcc
796with_cxx_main
797with_suffix
798enable_shared
799enable_profiling
800with_pydebug
Christian Heimes985ecdc2013-11-20 11:46:18 +0100801with_hash_algorithm
Matthias Kloseb9621712010-04-24 17:59:49 +0000802with_libs
803with_system_expat
804with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100805with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000806enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700807with_tcltk_includes
808with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_dbmliborder
810with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_threads
812with_thread
813enable_ipv6
814with_doc_strings
815with_tsc
816with_pymalloc
817with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_fpectl
819with_libm
820with_libc
821enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800823with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000824'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825 ac_precious_vars='build_alias
826host_alias
827target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100828MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000829CC
830CFLAGS
831LDFLAGS
832LIBS
833CPPFLAGS
Benjamin Peterson0f3cde12014-12-15 00:00:23 -0500834CPP
835PKG_CONFIG
836PKG_CONFIG_PATH
837PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838
Guido van Rossum627b2d71993-12-24 10:39:16 +0000839
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000841ac_init_help=
842ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000843ac_unrecognized_opts=
844ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845# The variables have the same names as the options, with
846# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000847cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850no_recursion=
851prefix=NONE
852program_prefix=NONE
853program_suffix=NONE
854program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859x_includes=NONE
860x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000861
862# Installation directory options.
863# These are left unexpanded so users can "make install exec_prefix=/foo"
864# and all the variables that are supposed to be based on exec_prefix
865# by default will actually change.
866# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000868bindir='${exec_prefix}/bin'
869sbindir='${exec_prefix}/sbin'
870libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871datarootdir='${prefix}/share'
872datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873sysconfdir='${prefix}/etc'
874sharedstatedir='${prefix}/com'
875localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876includedir='${prefix}/include'
877oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
879infodir='${datarootdir}/info'
880htmldir='${docdir}'
881dvidir='${docdir}'
882pdfdir='${docdir}'
883psdir='${docdir}'
884libdir='${exec_prefix}/lib'
885localedir='${datarootdir}/locale'
886mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000891do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892 # If the previous option needs an argument, assign it.
893 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895 ac_prev=
896 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000897 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200900 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
901 *=) ac_optarg= ;;
902 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905 # Accept the important Cygnus configure options, so we can diagnose typos.
906
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 case $ac_dashdash$ac_option in
908 --)
909 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -bindir | --bindir | --bindi | --bind | --bin | --bi)
912 ac_prev=bindir ;;
913 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000921 -cache-file | --cache-file | --cache-fil | --cache-fi \
922 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
923 ac_prev=cache_file ;;
924 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
925 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 cache_file=$ac_optarg ;;
927
928 --config-cache | -C)
929 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000933 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000936 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
937 | --dataroo | --dataro | --datar)
938 ac_prev=datarootdir ;;
939 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
940 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
941 datarootdir=$ac_optarg ;;
942
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000944 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000946 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200947 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000948 ac_useropt_orig=$ac_useropt
949 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
950 case $ac_user_opts in
951 *"
952"enable_$ac_useropt"
953"*) ;;
954 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
955 ac_unrecognized_sep=', ';;
956 esac
957 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958
959 -docdir | --docdir | --docdi | --doc | --do)
960 ac_prev=docdir ;;
961 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
962 docdir=$ac_optarg ;;
963
964 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
965 ac_prev=dvidir ;;
966 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
967 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
969 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200973 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000974 ac_useropt_orig=$ac_useropt
975 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
976 case $ac_user_opts in
977 *"
978"enable_$ac_useropt"
979"*) ;;
980 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
981 ac_unrecognized_sep=', ';;
982 esac
983 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
986 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
987 | --exec | --exe | --ex)
988 ac_prev=exec_prefix ;;
989 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
990 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
991 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Obsolete; use --with-gas.
996 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 -help | --help | --hel | --he | -h)
999 ac_init_help=long ;;
1000 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1001 ac_init_help=recursive ;;
1002 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1003 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1011 ac_prev=htmldir ;;
1012 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1013 | --ht=*)
1014 htmldir=$ac_optarg ;;
1015
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016 -includedir | --includedir | --includedi | --included | --include \
1017 | --includ | --inclu | --incl | --inc)
1018 ac_prev=includedir ;;
1019 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1020 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
1023 -infodir | --infodir | --infodi | --infod | --info | --inf)
1024 ac_prev=infodir ;;
1025 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027
1028 -libdir | --libdir | --libdi | --libd)
1029 ac_prev=libdir ;;
1030 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1034 | --libexe | --libex | --libe)
1035 ac_prev=libexecdir ;;
1036 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1037 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001040 -localedir | --localedir | --localedi | --localed | --locale)
1041 ac_prev=localedir ;;
1042 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1043 localedir=$ac_optarg ;;
1044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001046 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047 ac_prev=localstatedir ;;
1048 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001049 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1053 ac_prev=mandir ;;
1054 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001058 # Obsolete; use --without-fp.
1059 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 no_create=yes ;;
1064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1066 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1067 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1070 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1071 | --oldin | --oldi | --old | --ol | --o)
1072 ac_prev=oldincludedir ;;
1073 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1074 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1075 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1079 ac_prev=prefix ;;
1080 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1084 | --program-pre | --program-pr | --program-p)
1085 ac_prev=program_prefix ;;
1086 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1087 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1091 | --program-suf | --program-su | --program-s)
1092 ac_prev=program_suffix ;;
1093 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1094 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-transform-name | --program-transform-name \
1098 | --program-transform-nam | --program-transform-na \
1099 | --program-transform-n | --program-transform- \
1100 | --program-transform | --program-transfor \
1101 | --program-transfo | --program-transf \
1102 | --program-trans | --program-tran \
1103 | --progr-tra | --program-tr | --program-t)
1104 ac_prev=program_transform_name ;;
1105 -program-transform-name=* | --program-transform-name=* \
1106 | --program-transform-nam=* | --program-transform-na=* \
1107 | --program-transform-n=* | --program-transform-=* \
1108 | --program-transform=* | --program-transfor=* \
1109 | --program-transfo=* | --program-transf=* \
1110 | --program-trans=* | --program-tran=* \
1111 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001114 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1115 ac_prev=pdfdir ;;
1116 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1117 pdfdir=$ac_optarg ;;
1118
1119 -psdir | --psdir | --psdi | --psd | --ps)
1120 ac_prev=psdir ;;
1121 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1122 psdir=$ac_optarg ;;
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1125 | -silent | --silent | --silen | --sile | --sil)
1126 silent=yes ;;
1127
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001128 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1129 ac_prev=sbindir ;;
1130 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1131 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
1134 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1135 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1136 | --sharedst | --shareds | --shared | --share | --shar \
1137 | --sha | --sh)
1138 ac_prev=sharedstatedir ;;
1139 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1140 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1141 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1142 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 -site | --site | --sit)
1146 ac_prev=site ;;
1147 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001149
Guido van Rossum7f43da71994-08-01 12:15:30 +00001150 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1151 ac_prev=srcdir ;;
1152 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1156 | --syscon | --sysco | --sysc | --sys | --sy)
1157 ac_prev=sysconfdir ;;
1158 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1159 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001164 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
1167 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1168 verbose=yes ;;
1169
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 -version | --version | --versio | --versi | --vers | -V)
1171 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
1173 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001177 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001178 ac_useropt_orig=$ac_useropt
1179 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1180 case $ac_user_opts in
1181 *"
1182"with_$ac_useropt"
1183"*) ;;
1184 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1185 ac_unrecognized_sep=', ';;
1186 esac
1187 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001191 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001192 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001193 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001194 ac_useropt_orig=$ac_useropt
1195 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196 case $ac_user_opts in
1197 *"
1198"with_$ac_useropt"
1199"*) ;;
1200 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1201 ac_unrecognized_sep=', ';;
1202 esac
1203 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001205 --x)
1206 # Obsolete; use --with-x.
1207 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1210 | --x-incl | --x-inc | --x-in | --x-i)
1211 ac_prev=x_includes ;;
1212 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1213 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1217 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1218 ac_prev=x_libraries ;;
1219 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1220 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001223 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1224Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 ;;
1226
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 *=*)
1228 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1229 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 case $ac_envvar in #(
1231 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001232 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001233 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001234 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 export $ac_envvar ;;
1236
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001237 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001242 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ;;
1244
1245 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246done
1247
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251fi
1252
Matthias Kloseb9621712010-04-24 17:59:49 +00001253if test -n "$ac_unrecognized_opts"; then
1254 case $enable_option_checking in
1255 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1258 esac
1259fi
1260
1261# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1263 datadir sysconfdir sharedstatedir localstatedir includedir \
1264 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1265 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001266do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001267 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 # Remove trailing slashes.
1269 case $ac_val in
1270 */ )
1271 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1272 eval $ac_var=\$ac_val;;
1273 esac
1274 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001276 [\\/$]* | ?:[\\/]* ) continue;;
1277 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001280done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281
Martin v. Löwis11437992002-04-12 09:54:03 +00001282# There might be people who depend on the old broken behavior: `$host'
1283# used to hold the argument of --host etc.
1284# FIXME: To remove some day.
1285build=$build_alias
1286host=$host_alias
1287target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Martin v. Löwis11437992002-04-12 09:54:03 +00001289# FIXME: To remove some day.
1290if test "x$host_alias" != x; then
1291 if test "x$build_alias" = x; then
1292 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001293 elif test "x$build_alias" != "x$host_alias"; then
1294 cross_compiling=yes
1295 fi
1296fi
1297
1298ac_tool_prefix=
1299test -n "$host_alias" && ac_tool_prefix=$host_alias-
1300
1301test "$silent" = yes && exec 6>/dev/null
1302
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304ac_pwd=`pwd` && test -n "$ac_pwd" &&
1305ac_ls_di=`ls -di .` &&
1306ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001309 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001310
1311
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312# Find the source files, if location was not specified.
1313if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001314 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001316 ac_confdir=`$as_dirname -- "$as_myself" ||
1317$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1318 X"$as_myself" : 'X\(//\)[^/]' \| \
1319 X"$as_myself" : 'X\(//\)$' \| \
1320 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1321$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1323 s//\1/
1324 q
1325 }
1326 /^X\(\/\/\)[^/].*/{
1327 s//\1/
1328 q
1329 }
1330 /^X\(\/\/\)$/{
1331 s//\1/
1332 q
1333 }
1334 /^X\(\/\).*/{
1335 s//\1/
1336 q
1337 }
1338 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001339 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341 srcdir=..
1342 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343else
1344 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346if test ! -r "$srcdir/$ac_unique_file"; then
1347 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001348 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1351ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001352 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 pwd)`
1354# When building in place, set srcdir=.
1355if test "$ac_abs_confdir" = "$ac_pwd"; then
1356 srcdir=.
1357fi
1358# Remove unnecessary trailing slashes from srcdir.
1359# Double slashes in file names in object file debugging info
1360# mess up M-x gdb in Emacs.
1361case $srcdir in
1362*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1363esac
1364for ac_var in $ac_precious_vars; do
1365 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1366 eval ac_env_${ac_var}_value=\$${ac_var}
1367 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1368 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1369done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370
Martin v. Löwis11437992002-04-12 09:54:03 +00001371#
1372# Report the --help message.
1373#
1374if test "$ac_init_help" = "long"; then
1375 # Omit some internal or obsolete options to make the list less imposing.
1376 # This message is too long to be a string in the A/UX 3.1 sh.
1377 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001378\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
1380Usage: $0 [OPTION]... [VAR=VALUE]...
1381
1382To assign environment variables (e.g., CC, CFLAGS...), specify them as
1383VAR=VALUE. See below for descriptions of some of the useful variables.
1384
1385Defaults for the options are specified in brackets.
1386
1387Configuration:
1388 -h, --help display this help and exit
1389 --help=short display options specific to this package
1390 --help=recursive display the short help of all the included packages
1391 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001392 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001393 --cache-file=FILE cache test results in FILE [disabled]
1394 -C, --config-cache alias for \`--cache-file=config.cache'
1395 -n, --no-create do not create output files
1396 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398Installation directories:
1399 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001400 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001401 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001402 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404By default, \`make install' will install all the files in
1405\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1406an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1407for instance \`--prefix=\$HOME'.
1408
1409For better control, use the options below.
1410
1411Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 --bindir=DIR user executables [EPREFIX/bin]
1413 --sbindir=DIR system admin executables [EPREFIX/sbin]
1414 --libexecdir=DIR program executables [EPREFIX/libexec]
1415 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1416 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1417 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1418 --libdir=DIR object code libraries [EPREFIX/lib]
1419 --includedir=DIR C header files [PREFIX/include]
1420 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1421 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1422 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1423 --infodir=DIR info documentation [DATAROOTDIR/info]
1424 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1425 --mandir=DIR man documentation [DATAROOTDIR/man]
1426 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1427 --htmldir=DIR html documentation [DOCDIR]
1428 --dvidir=DIR dvi documentation [DOCDIR]
1429 --pdfdir=DIR pdf documentation [DOCDIR]
1430 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431_ACEOF
1432
1433 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001434
1435System types:
1436 --build=BUILD configure for building on BUILD [guessed]
1437 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438_ACEOF
1439fi
1440
1441if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001442 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001443 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001444 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 cat <<\_ACEOF
1446
1447Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001449 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1450 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001451 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001452 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --enable-framework[=INSTALLDIR]
1454 Build (MacOSX|Darwin) framework
1455 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001456 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001457 --enable-loadable-sqlite-extensions
1458 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --enable-ipv6 Enable ipv6 (with ipv4) support
1460 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001461 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001462 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
1464Optional Packages:
1465 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1466 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001467 --with-universal-archs=ARCH
1468 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001469 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001470 --with-framework-name=FRAMEWORK
1471 specify an alternate name of the framework built
1472 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001474 --with-cxx-main=<compiler>
1475 compile main() and link python executable with C++
1476 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with-suffix=.exe set executable suffix
1478 --with-pydebug build with Py_DEBUG defined
Christian Heimes985ecdc2013-11-20 11:46:18 +01001479 --with-hash-algorithm=[fnv|siphash24]
1480 select hash algorithm
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001482 --with-system-expat build pyexpat module using an installed expat
1483 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001484 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001485 --with-system-libmpdec build _decimal module using an installed libmpdec
1486 library
Ned Deilyd819b932013-09-06 01:07:05 -07001487 --with-tcltk-includes='-I...'
1488 override search for Tcl and Tk include files
1489 --with-tcltk-libs='-L...'
1490 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001491 --with-dbmliborder=db1:db2:...
1492 order to check db backends for dbm. Valid value is a
1493 colon separated string with the backend names
1494 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --with(out)-threads[=DIRECTORY]
1497 disable/enable thread support
1498 --with(out)-thread[=DIRECTORY]
1499 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001501 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001503 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-fpectl enable SIGFPE catching
1505 --with-libm=STRING math library
1506 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001507 --with(out)-computed-gotos
1508 Use computed gotos in evaluation loop (enabled by
1509 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001510 --with(out)-ensurepip=[=upgrade]
1511 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001512
1513Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001514 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 CC C compiler command
1516 CFLAGS C compiler flags
1517 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1518 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 CPP C preprocessor
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05001523 PKG_CONFIG path to pkg-config utility
1524 PKG_CONFIG_PATH
1525 directories to add to pkg-config's search path
1526 PKG_CONFIG_LIBDIR
1527 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
1529Use these variables to override the choices made by `configure' or to help
1530it to find libraries and programs with nonstandard names/locations.
1531
Georg Brandle2e15612009-05-20 18:25:10 +00001532Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001535fi
1536
1537if test "$ac_init_help" = "recursive"; then
1538 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001540 test -d "$ac_dir" ||
1541 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1542 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_builddir=.
1544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545case "$ac_dir" in
1546.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1547*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001550 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551 case $ac_top_builddir_sub in
1552 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1553 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1554 esac ;;
1555esac
1556ac_abs_top_builddir=$ac_pwd
1557ac_abs_builddir=$ac_pwd$ac_dir_suffix
1558# for backward compatibility:
1559ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001564 ac_top_srcdir=$ac_top_builddir_sub
1565 ac_abs_top_srcdir=$ac_pwd ;;
1566 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 ac_top_srcdir=$srcdir
1569 ac_abs_top_srcdir=$srcdir ;;
1570 *) # Relative name.
1571 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1572 ac_top_srcdir=$ac_top_build_prefix$srcdir
1573 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001574esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 cd "$ac_dir" || { ac_status=$?; continue; }
1578 # Check for guested configure.
1579 if test -f "$ac_srcdir/configure.gnu"; then
1580 echo &&
1581 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1582 elif test -f "$ac_srcdir/configure"; then
1583 echo &&
1584 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 fi || ac_status=$?
1588 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 done
1590fi
1591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001593if $ac_init_version; then
1594 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001595python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001596generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001598Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599This configure script is free software; the Free Software Foundation
1600gives unlimited permission to copy, distribute and modify it.
1601_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001604
1605## ------------------------ ##
1606## Autoconf initialization. ##
1607## ------------------------ ##
1608
1609# ac_fn_c_try_compile LINENO
1610# --------------------------
1611# Try to compile conftest.$ac_ext, and return whether this succeeded.
1612ac_fn_c_try_compile ()
1613{
1614 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1615 rm -f conftest.$ac_objext
1616 if { { ac_try="$ac_compile"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_compile") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1631 test $ac_status = 0; } && {
1632 test -z "$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 } && test -s conftest.$ac_objext; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_compile
1646
Matthias Kloseb9621712010-04-24 17:59:49 +00001647# ac_fn_c_try_link LINENO
1648# -----------------------
1649# Try to link conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_link ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext conftest$ac_exeext
1654 if { { ac_try="$ac_link"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_link") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest$ac_exeext && {
1673 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001674 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001675 }; then :
1676 ac_retval=0
1677else
1678 $as_echo "$as_me: failed program was:" >&5
1679sed 's/^/| /' conftest.$ac_ext >&5
1680
1681 ac_retval=1
1682fi
1683 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1684 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1685 # interfere with the next link command; also delete a directory that is
1686 # left behind by Apple's compiler. We do this before executing the actions.
1687 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001688 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001689 as_fn_set_status $ac_retval
1690
1691} # ac_fn_c_try_link
1692
Matthias Kloseb9621712010-04-24 17:59:49 +00001693# ac_fn_c_try_cpp LINENO
1694# ----------------------
1695# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1696ac_fn_c_try_cpp ()
1697{
1698 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1699 if { { ac_try="$ac_cpp conftest.$ac_ext"
1700case "(($ac_try" in
1701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1702 *) ac_try_echo=$ac_try;;
1703esac
1704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1705$as_echo "$ac_try_echo"; } >&5
1706 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1707 ac_status=$?
1708 if test -s conftest.err; then
1709 grep -v '^ *+' conftest.err >conftest.er1
1710 cat conftest.er1 >&5
1711 mv -f conftest.er1 conftest.err
1712 fi
1713 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001714 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001715 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1716 test ! -s conftest.err
1717 }; then :
1718 ac_retval=0
1719else
1720 $as_echo "$as_me: failed program was:" >&5
1721sed 's/^/| /' conftest.$ac_ext >&5
1722
1723 ac_retval=1
1724fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001725 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001726 as_fn_set_status $ac_retval
1727
1728} # ac_fn_c_try_cpp
1729
1730# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1731# -------------------------------------------------------
1732# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1733# the include files in INCLUDES and setting the cache variable VAR
1734# accordingly.
1735ac_fn_c_check_header_mongrel ()
1736{
1737 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001738 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1740$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001741if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 $as_echo_n "(cached) " >&6
1743fi
1744eval ac_res=\$$3
1745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746$as_echo "$ac_res" >&6; }
1747else
1748 # Is the header compilable?
1749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1750$as_echo_n "checking $2 usability... " >&6; }
1751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1752/* end confdefs.h. */
1753$4
1754#include <$2>
1755_ACEOF
1756if ac_fn_c_try_compile "$LINENO"; then :
1757 ac_header_compiler=yes
1758else
1759 ac_header_compiler=no
1760fi
1761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1763$as_echo "$ac_header_compiler" >&6; }
1764
1765# Is the header present?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1767$as_echo_n "checking $2 presence... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770#include <$2>
1771_ACEOF
1772if ac_fn_c_try_cpp "$LINENO"; then :
1773 ac_header_preproc=yes
1774else
1775 ac_header_preproc=no
1776fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001777rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1779$as_echo "$ac_header_preproc" >&6; }
1780
1781# So? What about this header?
1782case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1783 yes:no: )
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1785$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1787$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1788 ;;
1789 no:yes:* )
1790 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1791$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1793$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1795$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1797$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1799$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001800( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001801## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001802## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001803 ) | sed "s/^/$as_me: WARNING: /" >&2
1804 ;;
1805esac
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001808if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001809 $as_echo_n "(cached) " >&6
1810else
1811 eval "$3=\$ac_header_compiler"
1812fi
1813eval ac_res=\$$3
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001818
1819} # ac_fn_c_check_header_mongrel
1820
1821# ac_fn_c_try_run LINENO
1822# ----------------------
1823# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1824# that executables *can* be run.
1825ac_fn_c_try_run ()
1826{
1827 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1828 if { { ac_try="$ac_link"
1829case "(($ac_try" in
1830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1831 *) ac_try_echo=$ac_try;;
1832esac
1833eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1834$as_echo "$ac_try_echo"; } >&5
1835 (eval "$ac_link") 2>&5
1836 ac_status=$?
1837 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1838 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1839 { { case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842esac
1843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844$as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_try") 2>&5
1846 ac_status=$?
1847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1848 test $ac_status = 0; }; }; then :
1849 ac_retval=0
1850else
1851 $as_echo "$as_me: program exited with status $ac_status" >&5
1852 $as_echo "$as_me: failed program was:" >&5
1853sed 's/^/| /' conftest.$ac_ext >&5
1854
1855 ac_retval=$ac_status
1856fi
1857 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001859 as_fn_set_status $ac_retval
1860
1861} # ac_fn_c_try_run
1862
1863# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1864# -------------------------------------------------------
1865# Tests whether HEADER exists and can be compiled using the include files in
1866# INCLUDES, setting the cache variable VAR accordingly.
1867ac_fn_c_check_header_compile ()
1868{
1869 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001872if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001873 $as_echo_n "(cached) " >&6
1874else
1875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1876/* end confdefs.h. */
1877$4
1878#include <$2>
1879_ACEOF
1880if ac_fn_c_try_compile "$LINENO"; then :
1881 eval "$3=yes"
1882else
1883 eval "$3=no"
1884fi
1885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1886fi
1887eval ac_res=\$$3
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1889$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001890 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001891
1892} # ac_fn_c_check_header_compile
1893
Matthias Kloseb9621712010-04-24 17:59:49 +00001894# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1895# -------------------------------------------
1896# Tests whether TYPE exists after having included INCLUDES, setting cache
1897# variable VAR accordingly.
1898ac_fn_c_check_type ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001903if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 eval "$3=no"
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913if (sizeof ($2))
1914 return 0;
1915 ;
1916 return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof (($2)))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933
1934else
1935 eval "$3=yes"
1936fi
1937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938fi
1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001945
1946} # ac_fn_c_check_type
1947
1948# ac_fn_c_find_uintX_t LINENO BITS VAR
1949# ------------------------------------
1950# Finds an unsigned integer type with width BITS, setting cache variable VAR
1951# accordingly.
1952ac_fn_c_find_uintX_t ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1956$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001957if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 # Order is important - never check a type that is potentially smaller
1962 # than half of the expected target width.
1963 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1964 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
1968int
1969main ()
1970{
1971static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001972test_array [0] = 0;
1973return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 case $ac_type in #(
1981 uint$2_t) :
1982 eval "$3=yes" ;; #(
1983 *) :
1984 eval "$3=\$ac_type" ;;
1985esac
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000} # ac_fn_c_find_uintX_t
2001
2002# ac_fn_c_find_intX_t LINENO BITS VAR
2003# -----------------------------------
2004# Finds a signed integer type with width BITS, setting cache variable VAR
2005# accordingly.
2006ac_fn_c_find_intX_t ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2010$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002011if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002012 $as_echo_n "(cached) " >&6
2013else
2014 eval "$3=no"
2015 # Order is important - never check a type that is potentially smaller
2016 # than half of the expected target width.
2017 for ac_type in int$2_t 'int' 'long int' \
2018 'long long int' 'short int' 'signed char'; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002022 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002023int
2024main ()
2025{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002026static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002027test_array [0] = 0;
2028return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002029
2030 ;
2031 return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002038 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002039int
2040main ()
2041{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002042static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002043 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052
2053else
2054 case $ac_type in #(
2055 int$2_t) :
2056 eval "$3=yes" ;; #(
2057 *) :
2058 eval "$3=\$ac_type" ;;
2059esac
2060fi
2061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2062fi
2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002064 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066else
2067 break
2068fi
2069 done
2070fi
2071eval ac_res=\$$3
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2073$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002074 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076} # ac_fn_c_find_intX_t
2077
2078# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2079# --------------------------------------------
2080# Tries to find the compile-time value of EXPR in a program that includes
2081# INCLUDES, setting VAR accordingly. Returns whether the value could be
2082# computed
2083ac_fn_c_compute_int ()
2084{
2085 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086 if test "$cross_compiling" = yes; then
2087 # Depending upon the size, compute the lo and hi bounds.
2088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_lo=0 ac_mid=0
2104 while :; do
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002112test_array [0] = 0;
2113return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid; break
2121else
2122 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2123 if test $ac_lo -le $ac_mid; then
2124 ac_lo= ac_hi=
2125 break
2126 fi
2127 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130 done
2131else
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002139test_array [0] = 0;
2140return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_hi=-1 ac_mid=-1
2148 while :; do
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002156test_array [0] = 0;
2157return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_lo=$ac_mid; break
2165else
2166 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2167 if test $ac_mid -le $ac_hi; then
2168 ac_lo= ac_hi=
2169 break
2170 fi
2171 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174 done
2175else
2176 ac_lo= ac_hi=
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179fi
2180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181# Binary search between lo and hi bounds.
2182while test "x$ac_lo" != "x$ac_hi"; do
2183 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187int
2188main ()
2189{
2190static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002191test_array [0] = 0;
2192return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_compile "$LINENO"; then :
2199 ac_hi=$ac_mid
2200else
2201 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2202fi
2203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204done
2205case $ac_lo in #((
2206?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2207'') ac_retval=1 ;;
2208esac
2209 else
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213static long int longval () { return $2; }
2214static unsigned long int ulongval () { return $2; }
2215#include <stdio.h>
2216#include <stdlib.h>
2217int
2218main ()
2219{
2220
2221 FILE *f = fopen ("conftest.val", "w");
2222 if (! f)
2223 return 1;
2224 if (($2) < 0)
2225 {
2226 long int i = longval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%ld", i);
2230 }
2231 else
2232 {
2233 unsigned long int i = ulongval ();
2234 if (i != ($2))
2235 return 1;
2236 fprintf (f, "%lu", i);
2237 }
2238 /* Do not output a trailing newline, as this causes \r\n confusion
2239 on some platforms. */
2240 return ferror (f) || fclose (f) != 0;
2241
2242 ;
2243 return 0;
2244}
2245_ACEOF
2246if ac_fn_c_try_run "$LINENO"; then :
2247 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2248else
2249 ac_retval=1
2250fi
2251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2252 conftest.$ac_objext conftest.beam conftest.$ac_ext
2253rm -f conftest.val
2254
2255 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002257 as_fn_set_status $ac_retval
2258
2259} # ac_fn_c_compute_int
2260
2261# ac_fn_c_check_func LINENO FUNC VAR
2262# ----------------------------------
2263# Tests whether FUNC exists, setting the cache variable VAR accordingly
2264ac_fn_c_check_func ()
2265{
2266 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2268$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002269if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002270 $as_echo_n "(cached) " >&6
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2276#define $2 innocuous_$2
2277
2278/* System header to define __stub macros and hopefully few prototypes,
2279 which can conflict with char $2 (); below.
2280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2281 <limits.h> exists even on freestanding compilers. */
2282
2283#ifdef __STDC__
2284# include <limits.h>
2285#else
2286# include <assert.h>
2287#endif
2288
2289#undef $2
2290
2291/* Override any GCC internal prototype to avoid an error.
2292 Use char because int might match the return type of a GCC
2293 builtin and then its argument prototype would still apply. */
2294#ifdef __cplusplus
2295extern "C"
2296#endif
2297char $2 ();
2298/* The GNU C library defines this for functions which it implements
2299 to always fail with ENOSYS. Some functions are actually named
2300 something starting with __ and the normal name is an alias. */
2301#if defined __stub_$2 || defined __stub___$2
2302choke me
2303#endif
2304
2305int
2306main ()
2307{
2308return $2 ();
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_link "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext \
2319 conftest$ac_exeext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002324 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002325
2326} # ac_fn_c_check_func
2327
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002328# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2329# ---------------------------------------------
2330# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2331# accordingly.
2332ac_fn_c_check_decl ()
2333{
2334 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335 as_decl_name=`echo $2|sed 's/ *(.*//'`
2336 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2338$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2339if eval \${$3+:} false; then :
2340 $as_echo_n "(cached) " >&6
2341else
2342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h. */
2344$4
2345int
2346main ()
2347{
2348#ifndef $as_decl_name
2349#ifdef __cplusplus
2350 (void) $as_decl_use;
2351#else
2352 (void) $as_decl_name;
2353#endif
2354#endif
2355
2356 ;
2357 return 0;
2358}
2359_ACEOF
2360if ac_fn_c_try_compile "$LINENO"; then :
2361 eval "$3=yes"
2362else
2363 eval "$3=no"
2364fi
2365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2366fi
2367eval ac_res=\$$3
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2369$as_echo "$ac_res" >&6; }
2370 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2371
2372} # ac_fn_c_check_decl
2373
Matthias Kloseb9621712010-04-24 17:59:49 +00002374# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2375# ----------------------------------------------------
2376# Tries to find if the field MEMBER exists in type AGGR, after including
2377# INCLUDES, setting cache variable VAR accordingly.
2378ac_fn_c_check_member ()
2379{
2380 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2382$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002383if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002384 $as_echo_n "(cached) " >&6
2385else
2386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2387/* end confdefs.h. */
2388$5
2389int
2390main ()
2391{
2392static $2 ac_aggr;
2393if (ac_aggr.$3)
2394return 0;
2395 ;
2396 return 0;
2397}
2398_ACEOF
2399if ac_fn_c_try_compile "$LINENO"; then :
2400 eval "$4=yes"
2401else
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403/* end confdefs.h. */
2404$5
2405int
2406main ()
2407{
2408static $2 ac_aggr;
2409if (sizeof ac_aggr.$3)
2410return 0;
2411 ;
2412 return 0;
2413}
2414_ACEOF
2415if ac_fn_c_try_compile "$LINENO"; then :
2416 eval "$4=yes"
2417else
2418 eval "$4=no"
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421fi
2422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423fi
2424eval ac_res=\$$4
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002427 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002428
2429} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002431This file contains any messages produced by compilers while
2432running configure, to aid debugging if configure makes a mistake.
2433
Georg Brandl08a90122012-09-29 09:34:13 +02002434It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002435generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437 $ $0 $@
2438
2439_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002441{
2442cat <<_ASUNAME
2443## --------- ##
2444## Platform. ##
2445## --------- ##
2446
2447hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2448uname -m = `(uname -m) 2>/dev/null || echo unknown`
2449uname -r = `(uname -r) 2>/dev/null || echo unknown`
2450uname -s = `(uname -s) 2>/dev/null || echo unknown`
2451uname -v = `(uname -v) 2>/dev/null || echo unknown`
2452
2453/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2454/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2455
2456/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2457/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2458/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002460/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2461/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2462/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2463
2464_ASUNAME
2465
2466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467for as_dir in $PATH
2468do
2469 IFS=$as_save_IFS
2470 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 $as_echo "PATH: $as_dir"
2472 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002474
2475} >&5
2476
2477cat >&5 <<_ACEOF
2478
2479
2480## ----------- ##
2481## Core tests. ##
2482## ----------- ##
2483
2484_ACEOF
2485
2486
2487# Keep a trace of the command line.
2488# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002489# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002490# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002491# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002492ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002493ac_configure_args0=
2494ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002495ac_must_keep_next=false
2496for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002497do
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 for ac_arg
2499 do
2500 case $ac_arg in
2501 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2502 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2503 | -silent | --silent | --silen | --sile | --sil)
2504 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 esac
2508 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002513 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002515 case $ac_arg in
2516 *=* | --config-cache | -C | -disable-* | --disable-* \
2517 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2518 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2519 | -with-* | --with-* | -without-* | --without-* | --x)
2520 case "$ac_configure_args0 " in
2521 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2522 esac
2523 ;;
2524 -* ) ac_must_keep_next=true ;;
2525 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 ;;
2529 esac
2530 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002531done
Matthias Kloseb9621712010-04-24 17:59:49 +00002532{ ac_configure_args0=; unset ac_configure_args0;}
2533{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002534
2535# When interrupted or exit'd, cleanup temporary files, and complete
2536# config.log. We remove comments because anyway the quotes in there
2537# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538# WARNING: Use '\'' to represent an apostrophe within the trap.
2539# 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 +00002540trap 'exit_status=$?
2541 # Save into config.log some information that might help in debugging.
2542 {
2543 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002544
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002545 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002546## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002547## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 echo
2549 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550(
2551 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2552 eval ac_val=\$$ac_var
2553 case $ac_val in #(
2554 *${as_nl}*)
2555 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2557$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 esac
2559 case $ac_var in #(
2560 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2562 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002563 esac ;;
2564 esac
2565 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2568 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 "s/'\''/'\''\\\\'\'''\''/g;
2571 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2572 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002573 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002575 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac |
2577 sort
2578)
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002580
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002582## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 echo
2585 for ac_var in $ac_subst_vars
2586 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 eval ac_val=\$$ac_var
2588 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002592 done | sort
2593 echo
2594
2595 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002597## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 echo
2600 for ac_var in $ac_subst_files
2601 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 eval ac_val=\$$ac_var
2603 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002604 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002607 done | sort
2608 echo
2609 fi
2610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002613## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 echo
2618 fi
2619 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 $as_echo "$as_me: caught signal $ac_signal"
2621 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 rm -f core *.core core.conftest.* &&
2624 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002627for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002629done
2630ac_signal=0
2631
2632# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
Matthias Kloseb9621712010-04-24 17:59:49 +00002635$as_echo "/* confdefs.h */" > confdefs.h
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Predefined preprocessor variables.
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_NAME "$PACKAGE_NAME"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_VERSION "$PACKAGE_VERSION"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_STRING "$PACKAGE_STRING"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2657_ACEOF
2658
Matthias Kloseb9621712010-04-24 17:59:49 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_URL "$PACKAGE_URL"
2661_ACEOF
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
2664# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665# Prefer an explicitly selected file to automatically selected ones.
2666ac_site_file1=NONE
2667ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002668if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 # We do not want a PATH search for config.site.
2670 case $CONFIG_SITE in #((
2671 -*) ac_site_file1=./$CONFIG_SITE;;
2672 */*) ac_site_file1=$CONFIG_SITE;;
2673 *) ac_site_file1=./$CONFIG_SITE;;
2674 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002675elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 ac_site_file1=$prefix/share/config.site
2677 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678else
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 ac_site_file1=$ac_default_prefix/share/config.site
2680 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683do
Matthias Kloseb9621712010-04-24 17:59:49 +00002684 test "x$ac_site_file" = xNONE && continue
2685 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2687$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002689 . "$ac_site_file" \
2690 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002693See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694 fi
2695done
2696
2697if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 # Some versions of bash will fail to source /dev/null (special files
2699 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2700 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2702$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 esac
2707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708else
Matthias Kloseb9621712010-04-24 17:59:49 +00002709 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2710$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 >$cache_file
2712fi
2713
2714# Check that the precious variables saved in the cache have kept the same
2715# value.
2716ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2719 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 case $ac_old_set,$ac_new_set in
2723 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2725$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 +00002726 ac_cache_corrupted=: ;;
2727 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2729$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 ac_cache_corrupted=: ;;
2731 ,);;
2732 *)
2733 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002734 # differences in whitespace do not lead to failure.
2735 ac_old_val_w=`echo x $ac_old_val`
2736 ac_new_val_w=`echo x $ac_new_val`
2737 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2739$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2740 ac_cache_corrupted=:
2741 else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2743$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2744 eval $ac_var=\$ac_old_val
2745 fi
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2747$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2749$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 fi;;
2751 esac
2752 # Pass precious variables to config.status.
2753 if test "$ac_new_set" = set; then
2754 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002755 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 *) ac_arg=$ac_var=$ac_new_val ;;
2757 esac
2758 case " $ac_configure_args " in
2759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002760 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 esac
2762 fi
2763done
2764if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002765 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2768$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002769 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002771## -------------------- ##
2772## Main body of script. ##
2773## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774
Guido van Rossum7f43da71994-08-01 12:15:30 +00002775ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781
Michael W. Hudson54241132001-12-07 15:38:26 +00002782
Trent Nelson4d4ec652012-10-16 08:51:24 -04002783
Trent Nelson5595ab52012-10-17 04:47:31 -04002784if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002785 # If we're building out-of-tree, we need to make sure the following
2786 # resources get picked up before their $srcdir counterparts.
2787 # Objects/ -> typeslots.inc
2788 # Include/ -> Python-ast.h, graminit.h
2789 # Python/ -> importlib.h
2790 # (A side effect of this is that these resources will automatically be
2791 # regenerated when building out-of-tree, regardless of whether or not
2792 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2793 # off.)
2794 BASECPPFLAGS="-IObjects -IInclude -IPython"
2795else
2796 BASECPPFLAGS=""
2797fi
2798
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002799
2800
2801
2802
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002803if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002804then
2805# Extract the first word of "hg", so it can be a program name with args.
2806set dummy hg; ac_word=$2
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2808$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002809if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002810 $as_echo_n "(cached) " >&6
2811else
2812 if test -n "$HAS_HG"; then
2813 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2814else
2815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2816for as_dir in $PATH
2817do
2818 IFS=$as_save_IFS
2819 test -z "$as_dir" && as_dir=.
2820 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002821 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822 ac_cv_prog_HAS_HG="found"
2823 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2824 break 2
2825 fi
2826done
2827 done
2828IFS=$as_save_IFS
2829
2830 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2831fi
2832fi
2833HAS_HG=$ac_cv_prog_HAS_HG
2834if test -n "$HAS_HG"; then
2835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2836$as_echo "$HAS_HG" >&6; }
2837else
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2839$as_echo "no" >&6; }
2840fi
2841
2842
2843else
2844HAS_HG=no-repository
2845fi
2846if test $HAS_HG = found
2847then
2848 HGVERSION="hg id -i \$(srcdir)"
2849 HGTAG="hg id -t \$(srcdir)"
2850 HGBRANCH="hg id -b \$(srcdir)"
2851else
2852 HGVERSION=""
2853 HGTAG=""
2854 HGBRANCH=""
2855fi
2856
2857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002858ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002859
2860
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002861ac_aux_dir=
2862for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2863 if test -f "$ac_dir/install-sh"; then
2864 ac_aux_dir=$ac_dir
2865 ac_install_sh="$ac_aux_dir/install-sh -c"
2866 break
2867 elif test -f "$ac_dir/install.sh"; then
2868 ac_aux_dir=$ac_dir
2869 ac_install_sh="$ac_aux_dir/install.sh -c"
2870 break
2871 elif test -f "$ac_dir/shtool"; then
2872 ac_aux_dir=$ac_dir
2873 ac_install_sh="$ac_aux_dir/shtool install -c"
2874 break
2875 fi
2876done
2877if test -z "$ac_aux_dir"; then
2878 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2879fi
2880
2881# These three variables are undocumented and unsupported,
2882# and are intended to be withdrawn in a future Autoconf release.
2883# They can cause serious problems if a builder's source tree is in a directory
2884# whose full name contains unusual characters.
2885ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2886ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2887ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2888
2889
2890# Make sure we can run config.sub.
2891$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2892 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2893
2894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2895$as_echo_n "checking build system type... " >&6; }
2896if ${ac_cv_build+:} false; then :
2897 $as_echo_n "(cached) " >&6
2898else
2899 ac_build_alias=$build_alias
2900test "x$ac_build_alias" = x &&
2901 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2902test "x$ac_build_alias" = x &&
2903 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2904ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2905 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2906
2907fi
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2909$as_echo "$ac_cv_build" >&6; }
2910case $ac_cv_build in
2911*-*-*) ;;
2912*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2913esac
2914build=$ac_cv_build
2915ac_save_IFS=$IFS; IFS='-'
2916set x $ac_cv_build
2917shift
2918build_cpu=$1
2919build_vendor=$2
2920shift; shift
2921# Remember, the first character of IFS is used to create $*,
2922# except with old shells:
2923build_os=$*
2924IFS=$ac_save_IFS
2925case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2926
2927
2928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2929$as_echo_n "checking host system type... " >&6; }
2930if ${ac_cv_host+:} false; then :
2931 $as_echo_n "(cached) " >&6
2932else
2933 if test "x$host_alias" = x; then
2934 ac_cv_host=$ac_cv_build
2935else
2936 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2937 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2938fi
2939
2940fi
2941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2942$as_echo "$ac_cv_host" >&6; }
2943case $ac_cv_host in
2944*-*-*) ;;
2945*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2946esac
2947host=$ac_cv_host
2948ac_save_IFS=$IFS; IFS='-'
2949set x $ac_cv_host
2950shift
2951host_cpu=$1
2952host_vendor=$2
2953shift; shift
2954# Remember, the first character of IFS is used to create $*,
2955# except with old shells:
2956host_os=$*
2957IFS=$ac_save_IFS
2958case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2959
2960
2961
doko@python.orga10e4a92013-01-25 18:45:12 +01002962
2963
Ned Deilyfcbc2462014-08-22 13:32:49 -07002964# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2965rm -f pybuilddir.txt
2966
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002967if test "$cross_compiling" = yes; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2969$as_echo_n "checking for python interpreter for cross build... " >&6; }
2970 if test -z "$PYTHON_FOR_BUILD"; then
2971 for interp in python$PACKAGE_VERSION python3 python; do
2972 which $interp >/dev/null 2>&1 || continue
2973 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2974 break
2975 fi
2976 interp=
2977 done
2978 if test x$interp = x; then
2979 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2980 fi
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2982$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002983 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 +02002984 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002985elif test "$cross_compiling" = maybe; then
2986 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002987else
2988 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2989fi
2990
2991
Martin v. Löwis11437992002-04-12 09:54:03 +00002992
Benjamin Petersond23f8222009-04-05 19:13:16 +00002993if test "$prefix" != "/"; then
2994 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2995fi
2996
2997
Martin v. Löwis11437992002-04-12 09:54:03 +00002998
2999
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003000# We don't use PACKAGE_ variables, and they cause conflicts
3001# with other autoconf-based packages that include Python.h
3002grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3003rm confdefs.h
3004mv confdefs.h.new confdefs.h
3005
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003006
Georg Brandl08a90122012-09-29 09:34:13 +02003007VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003008
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003009# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003010
3011SOVERSION=1.0
3012
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003013# The later defininition of _XOPEN_SOURCE disables certain features
3014# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3015
Matthias Kloseb9621712010-04-24 17:59:49 +00003016$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003017
3018
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003019# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3020# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3021# them.
3022
Matthias Kloseb9621712010-04-24 17:59:49 +00003023$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003024
3025
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003026# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3027# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3028# them.
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003031
3032
Martin v. Löwisd6320502004-08-12 13:45:08 +00003033# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3034# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3035
Matthias Kloseb9621712010-04-24 17:59:49 +00003036$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003037
3038
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003039# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3040# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3041# them.
3042
Matthias Kloseb9621712010-04-24 17:59:49 +00003043$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003044
3045
3046
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003047define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003048
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003049# Arguments passed to configure.
3050
3051CONFIG_ARGS="$ac_configure_args"
3052
Matthias Kloseb9621712010-04-24 17:59:49 +00003053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3054$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003056if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058 case $enableval in
3059 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060 # Locate the best usable SDK, see Mac/README.txt for more
3061 # information
3062 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003063 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3066 if test ! -d "${enableval}"
3067 then
3068 enableval=/
3069 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071 ;;
3072 esac
3073 case $enableval in
3074 no)
3075 UNIVERSALSDK=
3076 enable_universalsdk=
3077 ;;
3078 *)
3079 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003080 if test ! -d "${UNIVERSALSDK}"
3081 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003082 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003083 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003084 ;;
3085 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003086
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088else
3089
3090 UNIVERSALSDK=
3091 enable_universalsdk=
3092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003093fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003094
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003095if test -n "${UNIVERSALSDK}"
3096then
Matthias Kloseb9621712010-04-24 17:59:49 +00003097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3098$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003099else
Matthias Kloseb9621712010-04-24 17:59:49 +00003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3101$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003102fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003105
Ned Deily87adb6e2013-10-18 21:09:56 -07003106ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003107
Ned Deilycbfb9a52012-06-23 16:02:19 -07003108# For backward compatibility reasons we prefer to select '32-bit' if available,
3109# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111if test "`uname -s`" = "Darwin"
3112then
3113 if test -n "${UNIVERSALSDK}"
3114 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003115 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003116 then
3117 UNIVERSAL_ARCHS="intel"
3118 fi
3119 fi
3120fi
3121
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003122
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3124$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003125
3126# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003128 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003129 UNIVERSAL_ARCHS="$withval"
3130
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003131fi
3132
Ned Deily87adb6e2013-10-18 21:09:56 -07003133if test -n "${UNIVERSALSDK}"
3134then
3135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3136$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3137else
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3139$as_echo "no" >&6; }
3140fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003142
3143# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003145 withval=$with_framework_name;
3146 PYTHONFRAMEWORK=${withval}
3147 PYTHONFRAMEWORKDIR=${withval}.framework
3148 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3149
3150else
3151
3152 PYTHONFRAMEWORK=Python
3153 PYTHONFRAMEWORKDIR=Python.framework
3154 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3155
3156fi
3157
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003159if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003161 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003162 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003163 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 esac
3165 case $enableval in
3166 no)
3167 PYTHONFRAMEWORK=
3168 PYTHONFRAMEWORKDIR=no-framework
3169 PYTHONFRAMEWORKPREFIX=
3170 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171 FRAMEWORKINSTALLFIRST=
3172 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003173 FRAMEWORKALTINSTALLFIRST=
3174 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003175 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003176 if test "x${prefix}" = "xNONE"; then
3177 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3178 else
3179 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3180 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003182 ;;
3183 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003184 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003187 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003188 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3189 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003190 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003191 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003192
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003193 if test "x${prefix}" = "xNONE" ; then
3194 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003195
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003196 else
3197 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3198 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003199
3200 case "${enableval}" in
3201 /System*)
3202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3203 if test "${prefix}" = "NONE" ; then
3204 # See below
3205 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3206 fi
3207 ;;
3208
3209 /Library*)
3210 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3211 ;;
3212
3213 */Library/Frameworks)
3214 MDIR="`dirname "${enableval}"`"
3215 MDIR="`dirname "${MDIR}"`"
3216 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3217
3218 if test "${prefix}" = "NONE"; then
3219 # User hasn't specified the
3220 # --prefix option, but wants to install
3221 # the framework in a non-default location,
3222 # ensure that the compatibility links get
3223 # installed relative to that prefix as well
3224 # instead of in /usr/local.
3225 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3226 fi
3227 ;;
3228
3229 *)
3230 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3231 ;;
3232 esac
3233
Jack Jansen127e56e2001-09-11 14:41:54 +00003234 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003235
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003236 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003237 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003240 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3243
3244 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003247
Guido van Rossum563e7081996-09-10 18:20:48 +00003248else
Martin v. Löwis11437992002-04-12 09:54:03 +00003249
Jack Jansene578a632001-08-15 01:27:14 +00003250 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003251 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003258 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 if test "x${prefix}" = "xNONE" ; then
3260 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3261 else
3262 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3263 fi
Jack Jansene578a632001-08-15 01:27:14 +00003264 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003265
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003266
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003267fi
3268
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269
3270
Michael W. Hudson54241132001-12-07 15:38:26 +00003271
3272
3273
3274
Jack Jansene578a632001-08-15 01:27:14 +00003275
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276
3277
3278
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003279
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003280
Ned Deilyb8f944f2013-11-21 22:42:25 -08003281
Jack Jansene578a632001-08-15 01:27:14 +00003282##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003283## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003284## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003285##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003286# Set name for machine-dependent library files
3287
Matthias Kloseb9621712010-04-24 17:59:49 +00003288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3289$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290if test -z "$MACHDEP"
3291then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 # avoid using uname for cross builds
3293 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003294 # ac_sys_system and ac_sys_release are used for setting
3295 # a lot of different things including 'define_xopen_source'
3296 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 case "$host" in
3298 *-*-linux*)
3299 ac_sys_system=Linux
3300 ;;
3301 *-*-cygwin*)
3302 ac_sys_system=Cygwin
3303 ;;
3304 *)
3305 # for now, limit cross builds to known configurations
3306 MACHDEP="unknown"
3307 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3308 esac
3309 ac_sys_release=
3310 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003311 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003312 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003313 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003316 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003317 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003318 fi
3319 ac_md_system=`echo $ac_sys_system |
3320 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3321 ac_md_release=`echo $ac_sys_release |
3322 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3323 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003324
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003325 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003326 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003327 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003328 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003329 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003330 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003331 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003332fi
Guido van Rossum91922671997-10-09 20:24:13 +00003333
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003334
3335if test "$cross_compiling" = yes; then
3336 case "$host" in
3337 *-*-linux*)
3338 case "$host_cpu" in
3339 arm*)
3340 _host_cpu=arm
3341 ;;
3342 *)
3343 _host_cpu=$host_cpu
3344 esac
3345 ;;
3346 *-*-cygwin*)
3347 _host_cpu=
3348 ;;
3349 *)
3350 # for now, limit cross builds to known configurations
3351 MACHDEP="unknown"
3352 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3353 esac
3354 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3355fi
3356
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003357# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3358# disable features if it is defined, without any means to access these
3359# features as extensions. For these systems, we skip the definition of
3360# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3361# some feature, make sure there is no alternative way to access this
3362# feature. Also, when using wildcards, make sure you have verified the
3363# need for not defining _XOPEN_SOURCE on all systems matching the
3364# wildcard, and that the wildcard does not include future systems
3365# (which may remove their limitations).
3366case $ac_sys_system/$ac_sys_release in
3367 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3368 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003369 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003370 # In addition, Stefan Krah confirms that issue #1244610 exists through
3371 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003372 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003373 define_xopen_source=no
3374 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3375 # also defined. This can be overridden by defining _BSD_SOURCE
3376 # As this has a different meaning on Linux, only define it on OpenBSD
3377
Matthias Kloseb9621712010-04-24 17:59:49 +00003378$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003379
3380 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003381 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003382 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3383 # also defined. This can be overridden by defining _BSD_SOURCE
3384 # As this has a different meaning on Linux, only define it on OpenBSD
3385
Matthias Kloseb9621712010-04-24 17:59:49 +00003386$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003387
3388 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003389 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3390 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3391 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003392 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 +00003393 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003394 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3395 # request to enable features supported by the standard as a request
3396 # to disable features not supported by the standard. The best way
3397 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3398 # entirely and define __EXTENSIONS__ instead.
3399 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003400 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003401 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3402 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003403 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003404 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003405 define_xopen_source=no;;
3406 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003407 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003408 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003409 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003410 # On FreeBSD 4, the math functions C89 does not cover are never defined
3411 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3412 FreeBSD/4.*)
3413 define_xopen_source=no;;
3414 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3415 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3416 # identifies itself as Darwin/7.*
3417 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3418 # disables platform specific features beyond repair.
3419 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3420 # has no effect, don't bother defining them
3421 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003422 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003423 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003424 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003425 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3426 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3427 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003428 AIX/4)
3429 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003430 AIX/5)
3431 if test `uname -r` -eq 1; then
3432 define_xopen_source=no
3433 fi
3434 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003435 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3436 # defining NI_NUMERICHOST.
3437 QNX/6.3.2)
3438 define_xopen_source=no
3439 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003440
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003441esac
3442
3443if test $define_xopen_source = yes
3444then
Victor Stinner14d098d2011-09-07 22:29:43 +02003445 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003446
Victor Stinner14d098d2011-09-07 22:29:43 +02003447$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003448
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003449
3450 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3451 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3452 # several APIs are not declared. Since this is also needed in some
3453 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
Matthias Kloseb9621712010-04-24 17:59:49 +00003455$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003456
3457
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003458
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003459$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003460
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003461fi
3462
Christian Heimes647cd872013-12-07 23:39:33 +01003463# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3464case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003465 hp*|HP*)
3466 define_stdc_a1=yes;;
3467 *)
3468 define_stdc_a1=no;;
3469esac
3470
3471if test $define_stdc_a1 = yes
3472then
Christian Heimes647cd872013-12-07 23:39:33 +01003473
3474$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3475
Christian Heimesb02bcae2013-12-08 15:21:08 +01003476fi
Christian Heimes647cd872013-12-07 23:39:33 +01003477
Guido van Rossum91922671997-10-09 20:24:13 +00003478#
3479# SGI compilers allow the specification of the both the ABI and the
3480# ISA on the command line. Depending on the values of these switches,
3481# different and often incompatable code will be generated.
3482#
3483# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3484# thus supply support for various ABI/ISA combinations. The MACHDEP
3485# variable is also adjusted.
3486#
3487
3488if test ! -z "$SGI_ABI"
3489then
3490 CC="cc $SGI_ABI"
3491 LDFLAGS="$SGI_ABI $LDFLAGS"
3492 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3493fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3495$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003496
doko@ubuntu.com1345d202015-04-13 21:59:57 +02003497
3498PLATDIR=plat-$MACHDEP
3499
Jack Jansen6b08a402004-06-03 12:41:45 +00003500# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3501# it may influence the way we can build extensions, so distutils
3502# needs to check it
3503
Thomas Wouters477c8d52006-05-27 19:21:47 +00003504
Jack Jansen6b08a402004-06-03 12:41:45 +00003505CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003506EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003507
Guido van Rossum627b2d71993-12-24 10:39:16 +00003508# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003509
3510# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3511# for debug/optimization stuff. BASECFLAGS is for flags that are required
3512# just to get things to compile and link. Users are free to override OPT
3513# when running configure or make. The build should not break if they do.
3514# BASECFLAGS should generally not be messed with, however.
3515
3516# XXX shouldn't some/most/all of this code be merged with the stuff later
3517# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3519$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003521# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003522if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003525 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003526 without_gcc=yes;;
3527 yes) CC=gcc
3528 without_gcc=no;;
3529 *) CC=$withval
3530 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003531 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003532else
Martin v. Löwis11437992002-04-12 09:54:03 +00003533
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003534 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003535 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003536 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003537 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003538 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003539fi
3540
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3542$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003543
Guido van Rossum8b131c51995-03-09 14:10:13 +00003544# If the user switches compilers, we can't believe the cache
3545if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3546then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003547 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003548(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003549fi
3550
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003551# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3552# when the compiler supports them, but we don't always want -O2, and
3553# we set -g later.
3554if test -z "$CFLAGS"; then
3555 CFLAGS=
3556fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003557
3558if test "$ac_sys_system" = "Darwin"
3559then
3560 # Compiler selection on MacOSX is more complicated than
3561 # AC_PROG_CC can handle, see Mac/README.txt for more
3562 # information
3563 if test -z "${CC}"
3564 then
3565 found_gcc=
3566 found_clang=
3567 as_save_IFS=$IFS; IFS=:
3568 for as_dir in $PATH
3569 do
3570 IFS=$as_save_IFS
3571 if test -x $as_dir/gcc; then
3572 if test -z "${found_gcc}"; then
3573 found_gcc=$as_dir/gcc
3574 fi
3575 fi
3576 if test -x $as_dir/clang; then
3577 if test -z "${found_clang}"; then
3578 found_clang=$as_dir/clang
3579 fi
3580 fi
3581 done
3582 IFS=$as_save_IFS
3583
3584 if test -n "$found_gcc" -a -n "$found_clang"
3585 then
3586 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3587 then
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3589$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3590 CC="$found_clang"
3591 CXX="$found_clang++"
3592 fi
3593
3594
3595 elif test -z "$found_gcc" -a -n "$found_clang"
3596 then
3597 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3598$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3599 CC="$found_clang"
3600 CXX="$found_clang++"
3601
3602 elif test -z "$found_gcc" -a -z "$found_clang"
3603 then
3604 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3605 if test -n "${found_clang}"
3606 then
3607 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3608$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3609 CC="${found_clang}"
3610 CXX="`/usr/bin/xcrun -find clang++`"
3611
3612 # else: use default behaviour
3613 fi
3614 fi
3615 fi
3616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003617ac_ext=c
3618ac_cpp='$CPP $CPPFLAGS'
3619ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3620ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3621ac_compiler_gnu=$ac_cv_c_compiler_gnu
3622if test -n "$ac_tool_prefix"; then
3623 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3624set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3626$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003627if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003629else
3630 if test -n "$CC"; then
3631 ac_cv_prog_CC="$CC" # Let the user override the test.
3632else
Martin v. Löwis11437992002-04-12 09:54:03 +00003633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003641 $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 +00003642 break 2
3643 fi
3644done
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
Jack Jansendd19cf82001-12-06 22:36:17 +00003648fi
3649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003650CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003651if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3653$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003654else
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661if test -z "$ac_cv_prog_CC"; then
3662 ac_ct_CC=$CC
3663 # Extract the first word of "gcc", so it can be a program name with args.
3664set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3666$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003667if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003669else
3670 if test -n "$ac_ct_CC"; then
3671 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3672else
3673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003681 $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 +00003682 break 2
3683 fi
3684done
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003687
3688fi
3689fi
3690ac_ct_CC=$ac_cv_prog_ac_ct_CC
3691if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3693$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3696$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699 if test "x$ac_ct_CC" = x; then
3700 CC=""
3701 else
3702 case $cross_compiling:$ac_tool_warned in
3703yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003706ac_tool_warned=yes ;;
3707esac
3708 CC=$ac_ct_CC
3709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710else
3711 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003712fi
3713
Jack Jansendd19cf82001-12-06 22:36:17 +00003714if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715 if test -n "$ac_tool_prefix"; then
3716 # 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 +00003717set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003720if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003722else
3723 if test -n "$CC"; then
3724 ac_cv_prog_CC="$CC" # Let the user override the test.
3725else
Martin v. Löwis11437992002-04-12 09:54:03 +00003726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727for as_dir in $PATH
3728do
3729 IFS=$as_save_IFS
3730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $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 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
3741fi
3742fi
3743CC=$ac_cv_prog_CC
3744if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3746$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3749$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752
Martin v. Löwis11437992002-04-12 09:54:03 +00003753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 # Extract the first word of "cc", so it can be a program name with args.
3757set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003760if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
3763 if test -n "$CC"; then
3764 ac_cv_prog_CC="$CC" # Let the user override the test.
3765else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3775 ac_prog_rejected=yes
3776 continue
3777 fi
3778 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $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 +00003780 break 2
3781 fi
3782done
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003785
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003786if test $ac_prog_rejected = yes; then
3787 # We found a bogon in the path, so make sure we never use it.
3788 set dummy $ac_cv_prog_CC
3789 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791 # We chose a different compiler from the bogus one.
3792 # However, it has the same basename, so the bogon will be chosen
3793 # first if we set CC to just the basename; use the full file name.
3794 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003795 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003796 fi
3797fi
3798fi
3799fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003801if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3803$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003807fi
3808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810fi
3811if test -z "$CC"; then
3812 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003819if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003821else
3822 if test -n "$CC"; then
3823 ac_cv_prog_CC="$CC" # Let the user override the test.
3824else
Martin v. Löwis11437992002-04-12 09:54:03 +00003825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 $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 +00003834 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003835 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003836done
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003839
3840fi
3841fi
3842CC=$ac_cv_prog_CC
3843if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3845$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003849fi
3850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$CC" && break
3853 done
3854fi
3855if test -z "$CC"; then
3856 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003857 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003858do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$ac_ct_CC"; then
3867 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3868else
3869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 $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 +00003878 break 2
3879 fi
3880done
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003883
Martin v. Löwis11437992002-04-12 09:54:03 +00003884fi
3885fi
3886ac_ct_CC=$ac_cv_prog_ac_ct_CC
3887if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3889$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003890else
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003893fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895
Martin v. Löwis11437992002-04-12 09:54:03 +00003896 test -n "$ac_ct_CC" && break
3897done
Michael W. Hudson54241132001-12-07 15:38:26 +00003898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 if test "x$ac_ct_CC" = x; then
3900 CC=""
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003906ac_tool_warned=yes ;;
3907esac
3908 CC=$ac_ct_CC
3909 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003910fi
3911
3912fi
3913
3914
Matthias Kloseb9621712010-04-24 17:59:49 +00003915test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003917as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003918See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919
3920# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3922set X $ac_compile
3923ac_compiler=$2
3924for ac_option in --version -v -V -qversion; do
3925 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926case "(($ac_try" in
3927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3928 *) ac_try_echo=$ac_try;;
3929esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003930eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3931$as_echo "$ac_try_echo"; } >&5
3932 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 if test -s conftest.err; then
3935 sed '10a\
3936... rest of stderr output deleted ...
3937 10q' conftest.err >conftest.er1
3938 cat conftest.er1 >&5
3939 fi
3940 rm -f conftest.er1 conftest.err
3941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3942 test $ac_status = 0; }
3943done
Martin v. Löwis11437992002-04-12 09:54:03 +00003944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003946/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003947
Martin v. Löwis11437992002-04-12 09:54:03 +00003948int
3949main ()
3950{
3951
3952 ;
3953 return 0;
3954}
3955_ACEOF
3956ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003957ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003958# Try to create an executable without -o first, disregard a.out.
3959# It will help us diagnose broken compilers, and finding out an intuition
3960# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3962$as_echo_n "checking whether the C compiler works... " >&6; }
3963ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3964
3965# The possible output files:
3966ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3967
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003968ac_rmfiles=
3969for ac_file in $ac_files
3970do
3971 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3974 esac
3975done
3976rm -f $ac_rmfiles
3977
Matthias Kloseb9621712010-04-24 17:59:49 +00003978if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003979case "(($ac_try" in
3980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3981 *) ac_try_echo=$ac_try;;
3982esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3984$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3988 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3990# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3991# in a Makefile. We should not override ac_cv_exeext if it was cached,
3992# so that the user can short-circuit this test for compilers unknown to
3993# Autoconf.
3994for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003995do
3996 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003997 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003998 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003999 ;;
4000 [ab].out )
4001 # We found the default executable, but exeext='' is most
4002 # certainly right.
4003 break;;
4004 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004005 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 then :; else
4007 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4008 fi
4009 # We set ac_cv_exeext here because the later test for it is not
4010 # safe: cross compilers may not add the suffix if given an `-o'
4011 # argument, so we may need to know it at that point already.
4012 # Even if this section looks crufty: it has the advantage of
4013 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 break;;
4015 * )
4016 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004017 esac
4018done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004019test "$ac_cv_exeext" = no && ac_cv_exeext=
4020
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004021else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 ac_file=''
4023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004024if test -z "$ac_file"; then :
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4026$as_echo "no" >&6; }
4027$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004028sed 's/^/| /' conftest.$ac_ext >&5
4029
Matthias Kloseb9621712010-04-24 17:59:49 +00004030{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4031$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004032as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004033See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004034else
4035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4036$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4039$as_echo_n "checking for C compiler default output file name... " >&6; }
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4041$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004043
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4047$as_echo_n "checking for suffix of executables... " >&6; }
4048if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004056 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4060# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4061# work properly (i.e., refer to `conftest.exe'), while it won't with
4062# `rm'.
4063for ac_file in conftest.exe conftest conftest.*; do
4064 test -f "$ac_file" || continue
4065 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004066 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004067 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4068 break;;
4069 * ) break;;
4070 esac
4071done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004072else
Matthias Kloseb9621712010-04-24 17:59:49 +00004073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004075as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004076See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004078rm -f conftest conftest$ac_cv_exeext
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4080$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004081
4082rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004083EXEEXT=$ac_cv_exeext
4084ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4086/* end confdefs.h. */
4087#include <stdio.h>
4088int
4089main ()
4090{
4091FILE *f = fopen ("conftest.out", "w");
4092 return ferror (f) || fclose (f) != 0;
4093
4094 ;
4095 return 0;
4096}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004098ac_clean_files="$ac_clean_files conftest.out"
4099# Check that the compiler produces executables we can run. If not, either
4100# the compiler is broken, or we cross compile.
4101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4102$as_echo_n "checking whether we are cross compiling... " >&6; }
4103if test "$cross_compiling" != yes; then
4104 { { ac_try="$ac_link"
4105case "(($ac_try" in
4106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4107 *) ac_try_echo=$ac_try;;
4108esac
4109eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4110$as_echo "$ac_try_echo"; } >&5
4111 (eval "$ac_link") 2>&5
4112 ac_status=$?
4113 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4114 test $ac_status = 0; }
4115 if { ac_try='./conftest$ac_cv_exeext'
4116 { { case "(($ac_try" in
4117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4118 *) ac_try_echo=$ac_try;;
4119esac
4120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4121$as_echo "$ac_try_echo"; } >&5
4122 (eval "$ac_try") 2>&5
4123 ac_status=$?
4124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4125 test $ac_status = 0; }; }; then
4126 cross_compiling=no
4127 else
4128 if test "$cross_compiling" = maybe; then
4129 cross_compiling=yes
4130 else
4131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004133as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004134If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004135See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 fi
4137 fi
4138fi
4139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4140$as_echo "$cross_compiling" >&6; }
4141
4142rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4143ac_clean_files=$ac_clean_files_save
4144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4145$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
4148else
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150/* end confdefs.h. */
4151
4152int
4153main ()
4154{
4155
4156 ;
4157 return 0;
4158}
4159_ACEOF
4160rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004161if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162case "(($ac_try" in
4163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4164 *) ac_try_echo=$ac_try;;
4165esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004166eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4167$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4171 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172 for ac_file in conftest.o conftest.obj conftest.*; do
4173 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004174 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4177 break;;
4178 esac
4179done
4180else
Matthias Kloseb9621712010-04-24 17:59:49 +00004181 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004182sed 's/^/| /' conftest.$ac_ext >&5
4183
Matthias Kloseb9621712010-04-24 17:59:49 +00004184{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004186as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004187See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004188fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004189rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004190fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4192$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004193OBJEXT=$ac_cv_objext
4194ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4196$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004197if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004198 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203int
4204main ()
4205{
4206#ifndef __GNUC__
4207 choke me
4208#endif
4209
4210 ;
4211 return 0;
4212}
4213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004214if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004215 ac_compiler_gnu=yes
4216else
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004220ac_cv_c_compiler_gnu=$ac_compiler_gnu
4221
4222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4224$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4225if test $ac_compiler_gnu = yes; then
4226 GCC=yes
4227else
4228 GCC=
4229fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004230ac_test_CFLAGS=${CFLAGS+set}
4231ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4233$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004236else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_save_c_werror_flag=$ac_c_werror_flag
4238 ac_c_werror_flag=yes
4239 ac_cv_prog_cc_g=no
4240 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004243
Martin v. Löwis11437992002-04-12 09:54:03 +00004244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254else
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 CFLAGS=""
4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257/* end confdefs.h. */
4258
4259int
4260main ()
4261{
4262
4263 ;
4264 return 0;
4265}
4266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004267if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268
Matthias Kloseb9621712010-04-24 17:59:49 +00004269else
4270 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273/* end confdefs.h. */
4274
4275int
4276main ()
4277{
4278
4279 ;
4280 return 0;
4281}
4282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004283if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4291 ac_c_werror_flag=$ac_save_c_werror_flag
4292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4294$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004295if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004296 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297elif test $ac_cv_prog_cc_g = yes; then
4298 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299 CFLAGS="-g -O2"
4300 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004301 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302 fi
4303else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004304 if test "$GCC" = yes; then
4305 CFLAGS="-O2"
4306 else
4307 CFLAGS=
4308 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4311$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004312if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004313 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004314else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004316ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004318/* end confdefs.h. */
4319#include <stdarg.h>
4320#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004321struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004322/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4323struct buf { int x; };
4324FILE * (*rcsopen) (struct buf *, struct stat *, int);
4325static char *e (p, i)
4326 char **p;
4327 int i;
4328{
4329 return p[i];
4330}
4331static char *f (char * (*g) (char **, int), char **p, ...)
4332{
4333 char *s;
4334 va_list v;
4335 va_start (v,p);
4336 s = g (p, va_arg (v,int));
4337 va_end (v);
4338 return s;
4339}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004340
4341/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4342 function prototypes and stuff, but not '\xHH' hex character constants.
4343 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004345 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4346 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004348int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004350/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4351 inside strings and character constants. */
4352#define FOO(x) 'x'
4353int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4354
Skip Montanaro6dead952003-09-25 14:50:04 +00004355int test (int i, double x);
4356struct s1 {int (*f) (int a);};
4357struct s2 {int (*f) (double a);};
4358int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4359int argc;
4360char **argv;
4361int
4362main ()
4363{
4364return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4365 ;
4366 return 0;
4367}
4368_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4370 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004371do
4372 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376rm -f core conftest.err conftest.$ac_objext
4377 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004378done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004380CC=$ac_save_CC
4381
4382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004383# AC_CACHE_VAL
4384case "x$ac_cv_prog_cc_c89" in
4385 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4387$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4390$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004391 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4394$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004395esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004396if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004397
Matthias Kloseb9621712010-04-24 17:59:49 +00004398fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004399
Martin v. Löwis11437992002-04-12 09:54:03 +00004400ac_ext=c
4401ac_cpp='$CPP $CPPFLAGS'
4402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4404ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004406
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004407
4408
Matthias Kloseb9621712010-04-24 17:59:49 +00004409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4410$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004412# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004413if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004414 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004415
4416 case $withval in
4417 no) with_cxx_main=no
4418 MAINCC='$(CC)';;
4419 yes) with_cxx_main=yes
4420 MAINCC='$(CXX)';;
4421 *) with_cxx_main=yes
4422 MAINCC=$withval
4423 if test -z "$CXX"
4424 then
4425 CXX=$withval
4426 fi;;
4427 esac
4428else
4429
4430 with_cxx_main=no
4431 MAINCC='$(CC)'
4432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004433fi
4434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4436$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004437
4438preset_cxx="$CXX"
4439if test -z "$CXX"
4440then
4441 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004442 gcc) if test -n "$ac_tool_prefix"; then
4443 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4444set dummy ${ac_tool_prefix}g++; ac_word=$2
4445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
4447if ${ac_cv_path_CXX+:} false; then :
4448 $as_echo_n "(cached) " >&6
4449else
4450 case $CXX in
4451 [\\/]* | ?:[\\/]*)
4452 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4453 ;;
4454 *)
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in notfound
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
4460 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004462 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4464 break 2
4465 fi
4466done
4467 done
4468IFS=$as_save_IFS
4469
4470 ;;
4471esac
4472fi
4473CXX=$ac_cv_path_CXX
4474if test -n "$CXX"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4476$as_echo "$CXX" >&6; }
4477else
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
4480fi
4481
4482
4483fi
4484if test -z "$ac_cv_path_CXX"; then
4485 ac_pt_CXX=$CXX
4486 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004487set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004490if ${ac_cv_path_ac_pt_CXX+:} false; then :
4491 $as_echo_n "(cached) " >&6
4492else
4493 case $ac_pt_CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
4503 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004505 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4507 break 2
4508 fi
4509done
4510 done
4511IFS=$as_save_IFS
4512
4513 ;;
4514esac
4515fi
4516ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4517if test -n "$ac_pt_CXX"; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4519$as_echo "$ac_pt_CXX" >&6; }
4520else
4521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
4523fi
4524
4525 if test "x$ac_pt_CXX" = x; then
4526 CXX="g++"
4527 else
4528 case $cross_compiling:$ac_tool_warned in
4529yes:)
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4531$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4532ac_tool_warned=yes ;;
4533esac
4534 CXX=$ac_pt_CXX
4535 fi
4536else
4537 CXX="$ac_cv_path_CXX"
4538fi
4539 ;;
4540 cc) if test -n "$ac_tool_prefix"; then
4541 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4542set dummy ${ac_tool_prefix}c++; ac_word=$2
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004545if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547else
4548 case $CXX in
4549 [\\/]* | ?:[\\/]*)
4550 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4551 ;;
4552 *)
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in notfound
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004558 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004562 break 2
4563 fi
4564done
Matthias Kloseb9621712010-04-24 17:59:49 +00004565 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004566IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004567
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004568 ;;
4569esac
4570fi
4571CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004572if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4574$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004575else
Matthias Kloseb9621712010-04-24 17:59:49 +00004576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004579
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004580
4581fi
4582if test -z "$ac_cv_path_CXX"; then
4583 ac_pt_CXX=$CXX
4584 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004588if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004589 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004591 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 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 +00004594 ;;
4595 *)
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in notfound
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004603 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004605 break 2
4606 fi
4607done
Matthias Kloseb9621712010-04-24 17:59:49 +00004608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004609IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611 ;;
4612esac
4613fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004614ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4615if test -n "$ac_pt_CXX"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4617$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004618else
Matthias Kloseb9621712010-04-24 17:59:49 +00004619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004621fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 if test "x$ac_pt_CXX" = x; then
4624 CXX="c++"
4625 else
4626 case $cross_compiling:$ac_tool_warned in
4627yes:)
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4630ac_tool_warned=yes ;;
4631esac
4632 CXX=$ac_pt_CXX
4633 fi
4634else
4635 CXX="$ac_cv_path_CXX"
4636fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004637 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004638 clang|*/clang) if test -n "$ac_tool_prefix"; then
4639 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4640set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4642$as_echo_n "checking for $ac_word... " >&6; }
4643if ${ac_cv_path_CXX+:} false; then :
4644 $as_echo_n "(cached) " >&6
4645else
4646 case $CXX in
4647 [\\/]* | ?:[\\/]*)
4648 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4649 ;;
4650 *)
4651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4652for as_dir in notfound
4653do
4654 IFS=$as_save_IFS
4655 test -z "$as_dir" && as_dir=.
4656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004658 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4660 break 2
4661 fi
4662done
4663 done
4664IFS=$as_save_IFS
4665
Ned Deilycbfb9a52012-06-23 16:02:19 -07004666 ;;
4667esac
4668fi
4669CXX=$ac_cv_path_CXX
4670if test -n "$CXX"; then
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4672$as_echo "$CXX" >&6; }
4673else
4674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4675$as_echo "no" >&6; }
4676fi
4677
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678
4679fi
4680if test -z "$ac_cv_path_CXX"; then
4681 ac_pt_CXX=$CXX
4682 # Extract the first word of "clang++", so it can be a program name with args.
4683set dummy clang++; ac_word=$2
4684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4685$as_echo_n "checking for $ac_word... " >&6; }
4686if ${ac_cv_path_ac_pt_CXX+:} false; then :
4687 $as_echo_n "(cached) " >&6
4688else
4689 case $ac_pt_CXX in
4690 [\\/]* | ?:[\\/]*)
4691 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4692 ;;
4693 *)
4694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4695for as_dir in notfound
4696do
4697 IFS=$as_save_IFS
4698 test -z "$as_dir" && as_dir=.
4699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004701 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4702 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 break 2
4704 fi
4705done
4706 done
4707IFS=$as_save_IFS
4708
4709 ;;
4710esac
4711fi
4712ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4713if test -n "$ac_pt_CXX"; then
4714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4715$as_echo "$ac_pt_CXX" >&6; }
4716else
4717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4718$as_echo "no" >&6; }
4719fi
4720
4721 if test "x$ac_pt_CXX" = x; then
4722 CXX="clang++"
4723 else
4724 case $cross_compiling:$ac_tool_warned in
4725yes:)
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4728ac_tool_warned=yes ;;
4729esac
4730 CXX=$ac_pt_CXX
4731 fi
4732else
4733 CXX="$ac_cv_path_CXX"
4734fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004735 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 esac
4737 if test "$CXX" = "notfound"
4738 then
4739 CXX=""
4740 fi
4741fi
4742if test -z "$CXX"
4743then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 if test -n "$ac_tool_prefix"; then
4745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4746 do
4747 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004751if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004752 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753else
4754 if test -n "$CXX"; then
4755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4756else
4757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in $PATH
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 break 2
4767 fi
4768done
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004770IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771
4772fi
4773fi
4774CXX=$ac_cv_prog_CXX
4775if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4777$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778else
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4780$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004781fi
4782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 test -n "$CXX" && break
4785 done
4786fi
4787if test -z "$CXX"; then
4788 ac_ct_CXX=$CXX
4789 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4790do
4791 # Extract the first word of "$ac_prog", so it can be a program name with args.
4792set dummy $ac_prog; ac_word=$2
4793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4796 $as_echo_n "(cached) " >&6
4797else
4798 if test -n "$ac_ct_CXX"; then
4799 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4800else
4801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in $PATH
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_prog_ac_ct_CXX="$ac_prog"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 done
4814IFS=$as_save_IFS
4815
4816fi
4817fi
4818ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4819if test -n "$ac_ct_CXX"; then
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4821$as_echo "$ac_ct_CXX" >&6; }
4822else
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827
4828 test -n "$ac_ct_CXX" && break
4829done
4830
4831 if test "x$ac_ct_CXX" = x; then
4832 CXX="notfound"
4833 else
4834 case $cross_compiling:$ac_tool_warned in
4835yes:)
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4838ac_tool_warned=yes ;;
4839esac
4840 CXX=$ac_ct_CXX
4841 fi
4842fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004843
4844 if test "$CXX" = "notfound"
4845 then
4846 CXX=""
4847 fi
4848fi
4849if test "$preset_cxx" != "$CXX"
4850then
Christian Heimesfe32aec2013-11-20 01:18:26 +01004851 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852
4853 By default, distutils will build C++ extension modules with \"$CXX\".
4854 If this is not intended, then set CXX on the configure command line.
4855 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01004856$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857
4858 By default, distutils will build C++ extension modules with \"$CXX\".
4859 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01004860 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861fi
4862
4863
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4865$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4866save_LDFLAGS="$LDFLAGS"
4867LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004868
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4870/* end confdefs.h. */
4871
4872int
4873main ()
4874{
4875
4876 ;
4877 return 0;
4878}
4879_ACEOF
4880if ac_fn_c_try_link "$LINENO"; then :
4881 NO_AS_NEEDED="-Wl,--no-as-needed"
4882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4883$as_echo "yes" >&6; }
4884else
4885 NO_AS_NEEDED=""
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4887$as_echo "no" >&6; }
4888fi
4889rm -f core conftest.err conftest.$ac_objext \
4890 conftest$ac_exeext conftest.$ac_ext
4891LDFLAGS="$save_LDFLAGS"
4892
4893
4894
4895# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004896ac_ext=c
4897ac_cpp='$CPP $CPPFLAGS'
4898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4900ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4902$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004903# On Suns, sometimes $CPP names a directory.
4904if test -n "$CPP" && test -d "$CPP"; then
4905 CPP=
4906fi
4907if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004908 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004910else
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 # Double quotes because CPP needs to be expanded
4912 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4913 do
4914 ac_preproc_ok=false
4915for ac_c_preproc_warn_flag in '' yes
4916do
4917 # Use a header file that comes with gcc, so configuring glibc
4918 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004919 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4920 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004921 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004924/* end confdefs.h. */
4925#ifdef __STDC__
4926# include <limits.h>
4927#else
4928# include <assert.h>
4929#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004930 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004932if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004933
Matthias Kloseb9621712010-04-24 17:59:49 +00004934else
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # Broken: fails on valid input.
4936continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004937fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004938rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004939
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004940 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004941 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004944#include <ac_nonexistent.h>
4945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 # Broken: success on invalid input.
4948continue
4949else
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 # Passes both tests.
4951ac_preproc_ok=:
4952break
4953fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004954rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004955
4956done
4957# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004959if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004960 break
4961fi
4962
4963 done
4964 ac_cv_prog_CPP=$CPP
4965
4966fi
4967 CPP=$ac_cv_prog_CPP
4968else
4969 ac_cv_prog_CPP=$CPP
4970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4972$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004973ac_preproc_ok=false
4974for ac_c_preproc_warn_flag in '' yes
4975do
4976 # Use a header file that comes with gcc, so configuring glibc
4977 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004978 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4979 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 # On the NeXT, cc -E runs the code through the compiler's parser,
4981 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004983/* end confdefs.h. */
4984#ifdef __STDC__
4985# include <limits.h>
4986#else
4987# include <assert.h>
4988#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004989 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004991if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004992
Matthias Kloseb9621712010-04-24 17:59:49 +00004993else
Martin v. Löwis11437992002-04-12 09:54:03 +00004994 # Broken: fails on valid input.
4995continue
4996fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004997rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004998
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004999 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00005000 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00005001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00005002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005003#include <ac_nonexistent.h>
5004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00005005if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00005006 # Broken: success on invalid input.
5007continue
5008else
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 # Passes both tests.
5010ac_preproc_ok=:
5011break
5012fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005013rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005014
5015done
5016# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005017rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00005018if $ac_preproc_ok; then :
5019
Martin v. Löwis11437992002-04-12 09:54:03 +00005020else
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005023as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02005024See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005025fi
5026
5027ac_ext=c
5028ac_cpp='$CPP $CPPFLAGS'
5029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5031ac_compiler_gnu=$ac_cv_c_compiler_gnu
5032
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5035$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005036if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00005038else
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 # Loop through the user's path and test for each of PROGNAME-LIST
5042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 for ac_prog in grep ggrep; do
5048 for ac_exec_ext in '' $ac_executable_extensions; do
5049 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005050 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005051# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052 # Check for GNU $ac_path_GREP
5053case `"$ac_path_GREP" --version 2>&1` in
5054*GNU*)
5055 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5056*)
5057 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 while :
5060 do
5061 cat "conftest.in" "conftest.in" >"conftest.tmp"
5062 mv "conftest.tmp" "conftest.in"
5063 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005064 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5066 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005067 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005068 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5069 # Best one so far, save it but keep looking for a better one
5070 ac_cv_path_GREP="$ac_path_GREP"
5071 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005072 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # 10*(2^10) chars as input seems more than enough
5074 test $ac_count -gt 10 && break
5075 done
5076 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5077esac
5078
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $ac_path_GREP_found && break 3
5080 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005081 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005082 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005083IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005084 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005085 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 +00005086 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087else
5088 ac_cv_path_GREP=$GREP
5089fi
5090
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5093$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094 GREP="$ac_cv_path_GREP"
5095
5096
Matthias Kloseb9621712010-04-24 17:59:49 +00005097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5098$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005099if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101else
5102 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5103 then ac_cv_path_EGREP="$GREP -E"
5104 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 # Loop through the user's path and test for each of PROGNAME-LIST
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005109for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5110do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005113 for ac_prog in egrep; do
5114 for ac_exec_ext in '' $ac_executable_extensions; do
5115 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005116 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005117# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005118 # Check for GNU $ac_path_EGREP
5119case `"$ac_path_EGREP" --version 2>&1` in
5120*GNU*)
5121 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5122*)
5123 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005124 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005125 while :
5126 do
5127 cat "conftest.in" "conftest.in" >"conftest.tmp"
5128 mv "conftest.tmp" "conftest.in"
5129 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005131 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5132 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005134 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5135 # Best one so far, save it but keep looking for a better one
5136 ac_cv_path_EGREP="$ac_path_EGREP"
5137 ac_path_EGREP_max=$ac_count
5138 fi
5139 # 10*(2^10) chars as input seems more than enough
5140 test $ac_count -gt 10 && break
5141 done
5142 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5143esac
5144
Matthias Kloseb9621712010-04-24 17:59:49 +00005145 $ac_path_EGREP_found && break 3
5146 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005147 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005148 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005149IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005151 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 +00005152 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005153else
5154 ac_cv_path_EGREP=$EGREP
5155fi
5156
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005157 fi
5158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5160$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005161 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005162
5163
Matthias Kloseb9621712010-04-24 17:59:49 +00005164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5165$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005166if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 $as_echo_n "(cached) " >&6
5168else
5169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005170/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005171#include <stdlib.h>
5172#include <stdarg.h>
5173#include <string.h>
5174#include <float.h>
5175
5176int
5177main ()
5178{
5179
5180 ;
5181 return 0;
5182}
5183_ACEOF
5184if ac_fn_c_try_compile "$LINENO"; then :
5185 ac_cv_header_stdc=yes
5186else
5187 ac_cv_header_stdc=no
5188fi
5189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5190
5191if test $ac_cv_header_stdc = yes; then
5192 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5194/* end confdefs.h. */
5195#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005196
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005197_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005199 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005200
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005201else
Matthias Kloseb9621712010-04-24 17:59:49 +00005202 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005203fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005204rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005205
Matthias Kloseb9621712010-04-24 17:59:49 +00005206fi
5207
5208if test $ac_cv_header_stdc = yes; then
5209 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211/* end confdefs.h. */
5212#include <stdlib.h>
5213
5214_ACEOF
5215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5216 $EGREP "free" >/dev/null 2>&1; then :
5217
5218else
5219 ac_cv_header_stdc=no
5220fi
5221rm -f conftest*
5222
5223fi
5224
5225if test $ac_cv_header_stdc = yes; then
5226 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5227 if test "$cross_compiling" = yes; then :
5228 :
5229else
5230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5231/* end confdefs.h. */
5232#include <ctype.h>
5233#include <stdlib.h>
5234#if ((' ' & 0x0FF) == 0x020)
5235# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5236# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5237#else
5238# define ISLOWER(c) \
5239 (('a' <= (c) && (c) <= 'i') \
5240 || ('j' <= (c) && (c) <= 'r') \
5241 || ('s' <= (c) && (c) <= 'z'))
5242# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5243#endif
5244
5245#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5246int
5247main ()
5248{
5249 int i;
5250 for (i = 0; i < 256; i++)
5251 if (XOR (islower (i), ISLOWER (i))
5252 || toupper (i) != TOUPPER (i))
5253 return 2;
5254 return 0;
5255}
5256_ACEOF
5257if ac_fn_c_try_run "$LINENO"; then :
5258
5259else
5260 ac_cv_header_stdc=no
5261fi
5262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5263 conftest.$ac_objext conftest.beam conftest.$ac_ext
5264fi
5265
5266fi
5267fi
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5269$as_echo "$ac_cv_header_stdc" >&6; }
5270if test $ac_cv_header_stdc = yes; then
5271
5272$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5273
5274fi
5275
5276# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5277for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5278 inttypes.h stdint.h unistd.h
5279do :
5280 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5281ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5282"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005283if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005284 cat >>confdefs.h <<_ACEOF
5285#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5286_ACEOF
5287
5288fi
5289
5290done
5291
5292
5293
5294 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 +02005295if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005296 MINIX=yes
5297else
5298 MINIX=
5299fi
5300
5301
5302 if test "$MINIX" = yes; then
5303
5304$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5305
5306
5307$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5308
5309
5310$as_echo "#define _MINIX 1" >>confdefs.h
5311
5312 fi
5313
5314
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5316$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005317if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005318 $as_echo_n "(cached) " >&6
5319else
5320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005323# define __EXTENSIONS__ 1
5324 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005325int
5326main ()
5327{
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333if ac_fn_c_try_compile "$LINENO"; then :
5334 ac_cv_safe_to_define___extensions__=yes
5335else
5336 ac_cv_safe_to_define___extensions__=no
5337fi
5338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5339fi
5340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5341$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5342 test $ac_cv_safe_to_define___extensions__ = yes &&
5343 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5344
5345 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5346
5347 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5348
5349 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5350
5351 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5352
5353
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355# Check for unsupported systems
5356case $ac_sys_system/$ac_sys_release in
5357atheos*|Linux*/1*)
5358 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5359 echo See README for details.
5360 exit 1;;
5361esac
5362
5363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5365$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366
5367# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005368if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369 withval=$with_suffix;
5370 case $withval in
5371 no) EXEEXT=;;
5372 yes) EXEEXT=.exe;;
5373 *) EXEEXT=$withval;;
5374 esac
5375fi
5376
Matthias Kloseb9621712010-04-24 17:59:49 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5378$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005379
5380# Test whether we're running on a non-case-sensitive system, in which
5381# case we give a warning if no ext is given
5382
Matthias Kloseb9621712010-04-24 17:59:49 +00005383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5384$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005385if test ! -d CaseSensitiveTestDir; then
5386mkdir CaseSensitiveTestDir
5387fi
5388
5389if test -d casesensitivetestdir
5390then
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5392$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005393 BUILDEXEEXT=.exe
5394else
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5396$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397 BUILDEXEEXT=$EXEEXT
5398fi
5399rmdir CaseSensitiveTestDir
5400
5401case $MACHDEP in
5402bsdos*)
5403 case $CC in
5404 gcc) CC="$CC -D_HAVE_BSDI";;
5405 esac;;
5406esac
5407
5408case $ac_sys_system in
5409hp*|HP*)
5410 case $CC in
5411 cc|*/cc) CC="$CC -Ae";;
5412 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413esac
5414
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005415MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5416
5417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005418
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5421$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005422if test -z "$LIBRARY"
5423then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005424 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5427$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005428
5429# LDLIBRARY is the name of the library to link against (as opposed to the
5430# name of the library into which to insert object files). BLDLIBRARY is also
5431# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5432# is blank as the main program is not linked directly against LDLIBRARY.
5433# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5434# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5435# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5436# DLLLIBRARY is the shared (i.e., DLL) library.
5437#
5438# RUNSHARED is used to run shared python without installed libraries
5439#
5440# INSTSONAME is the name of the shared library that will be use to install
5441# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005442#
5443# LDVERSION is the shared library version number, normally the Python version
5444# with the ABI build flags appended.
5445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005446
5447
5448
5449
5450
5451
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453LDLIBRARY="$LIBRARY"
5454BLDLIBRARY='$(LDLIBRARY)'
5455INSTSONAME='$(LDLIBRARY)'
5456DLLLIBRARY=''
5457LDLIBRARYDIR=''
5458RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005459LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
5461# LINKCC is the command that links the python executable -- default is $(CC).
5462# If CXX is set, and if it is needed to link a main function that was
5463# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5464# python might then depend on the C++ runtime
5465# This is altered for AIX in order to build the export list before
5466# linking.
5467
Matthias Kloseb9621712010-04-24 17:59:49 +00005468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5469$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005470if test -z "$LINKCC"
5471then
5472 LINKCC='$(PURIFY) $(MAINCC)'
5473 case $ac_sys_system in
5474 AIX*)
5475 exp_extra="\"\""
5476 if test $ac_sys_release -ge 5 -o \
5477 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5478 exp_extra="."
5479 fi
5480 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005481 QNX*)
5482 # qcc must be used because the other compilers do not
5483 # support -N.
5484 LINKCC=qcc;;
5485 esac
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5488$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005489
5490# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5491# make sure we default having it set to "no": this is used by
5492# distutils.unixccompiler to know if it should add --enable-new-dtags
5493# to linker command lines, and failing to detect GNU ld simply results
5494# in the same bahaviour as before.
5495
Matthias Kloseb9621712010-04-24 17:59:49 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5497$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498ac_prog=ld
5499if test "$GCC" = yes; then
5500 ac_prog=`$CC -print-prog-name=ld`
5501fi
5502case `"$ac_prog" -V 2>&1 < /dev/null` in
5503 *GNU*)
5504 GNULD=yes;;
5505 *)
5506 GNULD=no;;
5507esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5509$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5512$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005513if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005514 $as_echo_n "(cached) " >&6
5515else
5516 ac_cv_c_inline=no
5517for ac_kw in inline __inline__ __inline; do
5518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5519/* end confdefs.h. */
5520#ifndef __cplusplus
5521typedef int foo_t;
5522static $ac_kw foo_t static_foo () {return 0; }
5523$ac_kw foo_t foo () {return 0; }
5524#endif
5525
5526_ACEOF
5527if ac_fn_c_try_compile "$LINENO"; then :
5528 ac_cv_c_inline=$ac_kw
5529fi
5530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5531 test "$ac_cv_c_inline" != no && break
5532done
5533
5534fi
5535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5536$as_echo "$ac_cv_c_inline" >&6; }
5537
5538case $ac_cv_c_inline in
5539 inline | yes) ;;
5540 *)
5541 case $ac_cv_c_inline in
5542 no) ac_val=;;
5543 *) ac_val=$ac_cv_c_inline;;
5544 esac
5545 cat >>confdefs.h <<_ACEOF
5546#ifndef __cplusplus
5547#define inline $ac_val
5548#endif
5549_ACEOF
5550 ;;
5551esac
5552
5553if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005554
5555$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005556
5557
5558fi
5559
5560
Matthias Kloseb9621712010-04-24 17:59:49 +00005561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5562$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005564if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565 enableval=$enable_shared;
5566fi
5567
5568
5569if test -z "$enable_shared"
5570then
5571 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005572 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573 enable_shared="yes";;
5574 *)
5575 enable_shared="no";;
5576 esac
5577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5579$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
Matthias Kloseb9621712010-04-24 17:59:49 +00005581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5582$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005584if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005585 enableval=$enable_profiling;
5586fi
5587
5588if test "x$enable_profiling" = xyes; then
5589 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005590 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592/* end confdefs.h. */
5593int main() { return 0; }
5594_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005595if ac_fn_c_try_link "$LINENO"; then :
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005598 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005600rm -f core conftest.err conftest.$ac_objext \
5601 conftest$ac_exeext conftest.$ac_ext
5602 CC="$ac_save_cc"
5603else
5604 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5607$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608
doko@ubuntu.comba015832012-06-30 16:52:05 +02005609if test "x$enable_profiling" = xyes; then
5610 BASECFLAGS="-pg $BASECFLAGS"
5611 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005612fi
5613
Matthias Kloseb9621712010-04-24 17:59:49 +00005614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5615$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616
5617# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5618# library that we build, but we do not want to link against it (we
5619# will find it with a -framework option). For this reason there is an
5620# extra variable BLDLIBRARY against which Python and the extension
5621# modules are linked, BLDLIBRARY. This is normally the same as
5622# LDLIBRARY, but empty for MacOSX framework builds.
5623if test "$enable_framework"
5624then
5625 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005626 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 BLDLIBRARY=''
5628else
5629 BLDLIBRARY='$(LDLIBRARY)'
5630fi
5631
5632# Other platforms follow
5633if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005634 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635
Matthias Kloseb9621712010-04-24 17:59:49 +00005636$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637
5638 case $ac_sys_system in
5639 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005640 LDLIBRARY='libpython$(LDVERSION).dll.a'
5641 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005642 ;;
5643 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005644 LDLIBRARY='libpython$(LDVERSION).so'
5645 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005646 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005648 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005649 then
5650 PY3LIBRARY=libpython3.so
5651 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005653 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005654 LDLIBRARY='libpython$(LDVERSION).so'
5655 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005656 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657 case $ac_sys_system in
5658 FreeBSD*)
5659 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5660 ;;
5661 esac
5662 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005663 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005664 then
5665 PY3LIBRARY=libpython3.so
5666 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 ;;
5668 hp*|HP*)
5669 case `uname -m` in
5670 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005671 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672 ;;
5673 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005674 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675 ;;
5676 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005677 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005678 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005681 LDLIBRARY='libpython$(LDVERSION).dylib'
5682 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005683 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005685 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005686 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005687 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005688 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
5690 esac
5691else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005692 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 case $ac_sys_system in
5694 CYGWIN*)
5695 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005696 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 ;;
5698 esac
5699fi
5700
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005701if test "$cross_compiling" = yes; then
5702 RUNSHARED=
5703fi
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5706$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708if test -n "$ac_tool_prefix"; then
5709 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5710set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005713if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715else
5716 if test -n "$RANLIB"; then
5717 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5718else
5719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722 IFS=$as_save_IFS
5723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 break 2
5729 fi
5730done
Matthias Kloseb9621712010-04-24 17:59:49 +00005731 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732IFS=$as_save_IFS
5733
5734fi
5735fi
5736RANLIB=$ac_cv_prog_RANLIB
5737if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5739$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740else
Matthias Kloseb9621712010-04-24 17:59:49 +00005741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743fi
5744
5745
5746fi
5747if test -z "$ac_cv_prog_RANLIB"; then
5748 ac_ct_RANLIB=$RANLIB
5749 # Extract the first word of "ranlib", so it can be a program name with args.
5750set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5752$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005753if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755else
5756 if test -n "$ac_ct_RANLIB"; then
5757 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5758else
5759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5760for as_dir in $PATH
5761do
5762 IFS=$as_save_IFS
5763 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005765 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005767 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768 break 2
5769 fi
5770done
Matthias Kloseb9621712010-04-24 17:59:49 +00005771 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772IFS=$as_save_IFS
5773
5774fi
5775fi
5776ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5777if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5779$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780else
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
5784
5785 if test "x$ac_ct_RANLIB" = x; then
5786 RANLIB=":"
5787 else
5788 case $cross_compiling:$ac_tool_warned in
5789yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792ac_tool_warned=yes ;;
5793esac
5794 RANLIB=$ac_ct_RANLIB
5795 fi
5796else
5797 RANLIB="$ac_cv_prog_RANLIB"
5798fi
5799
5800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005801if test -n "$ac_tool_prefix"; then
5802 for ac_prog in ar aal
5803 do
5804 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5805set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005808if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810else
5811 if test -n "$AR"; then
5812 ac_cv_prog_AR="$AR" # Let the user override the test.
5813else
5814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5815for as_dir in $PATH
5816do
5817 IFS=$as_save_IFS
5818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005821 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 break 2
5824 fi
5825done
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827IFS=$as_save_IFS
5828
5829fi
5830fi
5831AR=$ac_cv_prog_AR
5832if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5834$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835else
Matthias Kloseb9621712010-04-24 17:59:49 +00005836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5837$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838fi
5839
5840
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005841 test -n "$AR" && break
5842 done
5843fi
5844if test -z "$AR"; then
5845 ac_ct_AR=$AR
5846 for ac_prog in ar aal
5847do
5848 # Extract the first word of "$ac_prog", so it can be a program name with args.
5849set dummy $ac_prog; ac_word=$2
5850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5851$as_echo_n "checking for $ac_word... " >&6; }
5852if ${ac_cv_prog_ac_ct_AR+:} false; then :
5853 $as_echo_n "(cached) " >&6
5854else
5855 if test -n "$ac_ct_AR"; then
5856 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5857else
5858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5859for as_dir in $PATH
5860do
5861 IFS=$as_save_IFS
5862 test -z "$as_dir" && as_dir=.
5863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005865 ac_cv_prog_ac_ct_AR="$ac_prog"
5866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5867 break 2
5868 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005870 done
5871IFS=$as_save_IFS
5872
5873fi
5874fi
5875ac_ct_AR=$ac_cv_prog_ac_ct_AR
5876if test -n "$ac_ct_AR"; then
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5878$as_echo "$ac_ct_AR" >&6; }
5879else
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881$as_echo "no" >&6; }
5882fi
5883
5884
5885 test -n "$ac_ct_AR" && break
5886done
5887
5888 if test "x$ac_ct_AR" = x; then
5889 AR="ar"
5890 else
5891 case $cross_compiling:$ac_tool_warned in
5892yes:)
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5894$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5895ac_tool_warned=yes ;;
5896esac
5897 AR=$ac_ct_AR
5898 fi
5899fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
5901
5902# tweak ARFLAGS only if the user didn't set it on the command line
5903
5904if test -z "$ARFLAGS"
5905then
5906 ARFLAGS="rc"
5907fi
5908
doko@ubuntu.com58844492012-06-30 18:25:32 +02005909if test -n "$ac_tool_prefix"; then
5910 for ac_prog in readelf
5911 do
5912 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5913set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5915$as_echo_n "checking for $ac_word... " >&6; }
5916if ${ac_cv_prog_READELF+:} false; then :
5917 $as_echo_n "(cached) " >&6
5918else
5919 if test -n "$READELF"; then
5920 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5921else
5922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
5927 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005929 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5931 break 2
5932 fi
5933done
5934 done
5935IFS=$as_save_IFS
5936
5937fi
5938fi
5939READELF=$ac_cv_prog_READELF
5940if test -n "$READELF"; then
5941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5942$as_echo "$READELF" >&6; }
5943else
5944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
5946fi
5947
5948
5949 test -n "$READELF" && break
5950 done
5951fi
5952if test -z "$READELF"; then
5953 ac_ct_READELF=$READELF
5954 for ac_prog in readelf
5955do
5956 # Extract the first word of "$ac_prog", so it can be a program name with args.
5957set dummy $ac_prog; ac_word=$2
5958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959$as_echo_n "checking for $ac_word... " >&6; }
5960if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5961 $as_echo_n "(cached) " >&6
5962else
5963 if test -n "$ac_ct_READELF"; then
5964 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5965else
5966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5967for as_dir in $PATH
5968do
5969 IFS=$as_save_IFS
5970 test -z "$as_dir" && as_dir=.
5971 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005973 ac_cv_prog_ac_ct_READELF="$ac_prog"
5974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5975 break 2
5976 fi
5977done
5978 done
5979IFS=$as_save_IFS
5980
5981fi
5982fi
5983ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5984if test -n "$ac_ct_READELF"; then
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5986$as_echo "$ac_ct_READELF" >&6; }
5987else
5988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5989$as_echo "no" >&6; }
5990fi
5991
5992
5993 test -n "$ac_ct_READELF" && break
5994done
5995
5996 if test "x$ac_ct_READELF" = x; then
5997 READELF=":"
5998 else
5999 case $cross_compiling:$ac_tool_warned in
6000yes:)
6001{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6002$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6003ac_tool_warned=yes ;;
6004esac
6005 READELF=$ac_ct_READELF
6006 fi
6007fi
6008
6009if test "$cross_compiling" = yes; then
6010 case "$READELF" in
6011 readelf|:)
6012 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6013 ;;
6014 esac
6015fi
6016
6017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006018
Matthias Klosec4c48422012-10-21 23:05:35 +02006019for ac_prog in python$PACKAGE_VERSION python3 python
6020do
6021 # Extract the first word of "$ac_prog", so it can be a program name with args.
6022set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006025if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006026 $as_echo_n "(cached) " >&6
6027else
Matthias Klosec4c48422012-10-21 23:05:35 +02006028 if test -n "$PYTHON"; then
6029 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006030else
6031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6032for as_dir in $PATH
6033do
6034 IFS=$as_save_IFS
6035 test -z "$as_dir" && as_dir=.
6036 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006038 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6040 break 2
6041 fi
6042done
6043 done
6044IFS=$as_save_IFS
6045
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006046fi
6047fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006048PYTHON=$ac_cv_prog_PYTHON
6049if test -n "$PYTHON"; then
6050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6051$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006052else
6053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
6055fi
6056
6057
Matthias Klosec4c48422012-10-21 23:05:35 +02006058 test -n "$PYTHON" && break
6059done
6060test -n "$PYTHON" || PYTHON="not-found"
6061
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006062if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006063 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6064else
6065 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006066fi
6067
6068
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006069case $MACHDEP in
6070bsdos*|hp*|HP*)
6071 # install -d does not work on BSDI or HP-UX
6072 if test -z "$INSTALL"
6073 then
6074 INSTALL="${srcdir}/install-sh -c"
6075 fi
6076esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006077# Find a good install program. We prefer a C program (faster),
6078# so one script is as good as another. But avoid the broken or
6079# incompatible versions:
6080# SysV /etc/install, /usr/sbin/install
6081# SunOS /usr/etc/install
6082# IRIX /sbin/install
6083# AIX /bin/install
6084# AmigaOS /C/install, which installs bootblocks on floppy discs
6085# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6086# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6087# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6088# OS/2's system install, which has a completely different semantic
6089# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006090# Reject install programs that cannot install multiple files.
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6092$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006094if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096else
6097 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6098for as_dir in $PATH
6099do
6100 IFS=$as_save_IFS
6101 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 # Account for people who put trailing slashes in PATH elements.
6103case $as_dir/ in #((
6104 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006105 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006106 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107 /usr/ucb/* ) ;;
6108 *)
6109 # OSF1 and SCO ODT 3.0 have their own names for install.
6110 # Don't use installbsd from OSF since it installs stuff as root
6111 # by default.
6112 for ac_prog in ginstall scoinst install; do
6113 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006114 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006115 if test $ac_prog = install &&
6116 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6117 # AIX install. It has an incompatible calling convention.
6118 :
6119 elif test $ac_prog = install &&
6120 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6121 # program-specific install script used by HP pwplus--don't use.
6122 :
6123 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 rm -rf conftest.one conftest.two conftest.dir
6125 echo one > conftest.one
6126 echo two > conftest.two
6127 mkdir conftest.dir
6128 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6129 test -s conftest.one && test -s conftest.two &&
6130 test -s conftest.dir/conftest.one &&
6131 test -s conftest.dir/conftest.two
6132 then
6133 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6134 break 3
6135 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136 fi
6137 fi
6138 done
6139 done
6140 ;;
6141esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006142
6143 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144IFS=$as_save_IFS
6145
Matthias Kloseb9621712010-04-24 17:59:49 +00006146rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147
6148fi
6149 if test "${ac_cv_path_install+set}" = set; then
6150 INSTALL=$ac_cv_path_install
6151 else
6152 # As a last resort, use the slow shell script. Don't cache a
6153 # value for INSTALL within a source directory, because that will
6154 # break other packages using the cache if that directory is
6155 # removed, or if the value is a relative name.
6156 INSTALL=$ac_install_sh
6157 fi
6158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6160$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161
6162# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6163# It thinks the first close brace ends the variable substitution.
6164test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6165
6166test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6167
6168test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6169
Matthias Klose93a0ef12012-03-15 18:08:34 +01006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6171$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6172if test -z "$MKDIR_P"; then
6173 if ${ac_cv_path_mkdir+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175else
6176 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6178do
6179 IFS=$as_save_IFS
6180 test -z "$as_dir" && as_dir=.
6181 for ac_prog in mkdir gmkdir; do
6182 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006183 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006184 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6185 'mkdir (GNU coreutils) '* | \
6186 'mkdir (coreutils) '* | \
6187 'mkdir (fileutils) '4.1*)
6188 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6189 break 3;;
6190 esac
6191 done
6192 done
6193 done
6194IFS=$as_save_IFS
6195
6196fi
6197
6198 test -d ./--version && rmdir ./--version
6199 if test "${ac_cv_path_mkdir+set}" = set; then
6200 MKDIR_P="$ac_cv_path_mkdir -p"
6201 else
6202 # As a last resort, use the slow shell script. Don't cache a
6203 # value for MKDIR_P within a source directory, because that will
6204 # break other packages using the cache if that directory is
6205 # removed, or if the value is a relative name.
6206 MKDIR_P="$ac_install_sh -d"
6207 fi
6208fi
6209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6210$as_echo "$MKDIR_P" >&6; }
6211
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212
6213# Not every filesystem supports hard links
6214
6215if test -z "$LN" ; then
6216 case $ac_sys_system in
6217 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218 *) LN=ln;;
6219 esac
6220fi
6221
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006222# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006223
6224ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006225
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006226# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6228$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229
6230# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006231if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232 withval=$with_pydebug;
6233if test "$withval" != no
6234then
6235
Matthias Kloseb9621712010-04-24 17:59:49 +00006236$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
Matthias Kloseb9621712010-04-24 17:59:49 +00006238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6239$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006241 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006242else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6243$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244fi
6245else
Matthias Kloseb9621712010-04-24 17:59:49 +00006246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248fi
6249
6250
6251# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6252# merged with this chunk of code?
6253
6254# Optimizer/debugger flags
6255# ------------------------
6256# (The following bit of code is complicated enough - please keep things
6257# indented properly. Just pretend you're editing Python code. ;-)
6258
6259# There are two parallel sets of case statements below, one that checks to
6260# see if OPT was set and one that does BASECFLAGS setting based upon
6261# compiler and platform. BASECFLAGS tweaks need to be made even if the
6262# user set OPT.
6263
6264# tweak OPT based on compiler and platform, only if the user didn't set
6265# it on the command line
6266
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006267if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268then
6269 case $GCC in
6270 yes)
6271 if test "$CC" != 'g++' ; then
6272 STRICT_PROTO="-Wstrict-prototypes"
6273 fi
6274 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6275 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6276 WRAP="-fwrapv"
6277 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006278
6279 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006280 case $CC in
6281 *clang*) WRAP="-fwrapv"
6282 ;;
6283 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006284
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 case $ac_cv_prog_cc_g in
6286 yes)
6287 if test "$Py_DEBUG" = 'true' ; then
6288 # Optimization messes up debuggers, so turn it off for
6289 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006290 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6291 OPT="-g -Og -Wall $STRICT_PROTO"
6292 else
6293 OPT="-g -O0 -Wall $STRICT_PROTO"
6294 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295 else
6296 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6297 fi
6298 ;;
6299 *)
6300 OPT="-O3 -Wall $STRICT_PROTO"
6301 ;;
6302 esac
6303 case $ac_sys_system in
6304 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6305 ;;
6306 esac
6307 ;;
6308
6309 *)
6310 OPT="-O"
6311 ;;
6312 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313fi
6314
6315
6316
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318# The -arch flags for universal builds on OSX
6319UNIVERSAL_ARCH_FLAGS=
6320
6321
6322# tweak BASECFLAGS based on compiler and platform
6323case $GCC in
6324yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325 # Python doesn't violate C99 aliasing rules, but older versions of
6326 # GCC produce warnings for legal Python code. Enable
6327 # -fno-strict-aliasing on versions of GCC that support but produce
6328 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6330$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 ac_save_cc="$CC"
6332 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006333 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006334 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006336else
Matthias Kloseb9621712010-04-24 17:59:49 +00006337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006339
Matthias Kloseb159a552010-04-25 21:00:44 +00006340
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006341int
6342main ()
6343{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006344
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006345 ;
6346 return 0;
6347}
Matthias Kloseb159a552010-04-25 21:00:44 +00006348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006350if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006351
6352 CC="$ac_save_cc -fstrict-aliasing"
6353 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006355/* end confdefs.h. */
6356
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006357 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006358int
6359main ()
6360{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006361double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006362 ;
6363 return 0;
6364}
Matthias Kloseb159a552010-04-25 21:00:44 +00006365
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006367if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006368
6369 ac_cv_no_strict_aliasing=no
6370
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371else
Matthias Kloseb159a552010-04-25 21:00:44 +00006372
6373 ac_cv_no_strict_aliasing=yes
6374
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006375fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006377
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006378else
Matthias Kloseb159a552010-04-25 21:00:44 +00006379
6380 ac_cv_no_strict_aliasing=no
6381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006384fi
6385
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006386 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6389$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006390 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391 then
6392 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6393 fi
6394
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6396$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6397 ac_save_cc="$CC"
6398 CC="$CC -Wunused-result -Werror"
6399 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006400 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006401 $as_echo_n "(cached) " >&6
6402else
6403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404/* end confdefs.h. */
6405
6406
6407int
6408main ()
6409{
6410
6411 ;
6412 return 0;
6413}
6414
6415_ACEOF
6416if ac_fn_c_try_compile "$LINENO"; then :
6417
6418 ac_cv_disable_unused_result_warning=yes
6419
6420else
6421
6422 ac_cv_disable_unused_result_warning=no
6423
6424fi
6425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6426fi
6427
6428 CFLAGS="$save_CFLAGS"
6429 CC="$ac_save_cc"
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6431$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6432
6433 if test $ac_cv_disable_unused_result_warning = yes
6434 then
6435 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6436 fi
6437
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6439$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6440 ac_save_cc="$CC"
6441 CC="$CC -Werror=declaration-after-statement"
6442 save_CFLAGS="$CFLAGS"
6443 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445else
6446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447/* end confdefs.h. */
6448
6449
6450int
6451main ()
6452{
6453
6454 ;
6455 return 0;
6456}
6457
6458_ACEOF
6459if ac_fn_c_try_compile "$LINENO"; then :
6460
6461 ac_cv_declaration_after_statement_warning=yes
6462
6463else
6464
6465 ac_cv_declaration_after_statement_warning=no
6466
6467fi
6468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6469fi
6470
6471 CFLAGS="$save_CFLAGS"
6472 CC="$ac_save_cc"
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6474$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6475
6476 if test $ac_cv_declaration_after_statement_warning = yes
6477 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006478 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006479 fi
6480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6482 # support. Without this, treatment of subnormals doesn't follow
6483 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006484 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006485 alpha*)
6486 BASECFLAGS="$BASECFLAGS -mieee"
6487 ;;
6488 esac
6489
6490 case $ac_sys_system in
6491 SCO_SV*)
6492 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6493 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006494
6495 # is there any other compiler on Darwin besides gcc?
6496 Darwin*)
6497 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6498 # used to be here, but non-Apple gcc doesn't accept them.
6499 if test "${CC}" = gcc
6500 then
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006502$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006503 case "${UNIVERSALSDK}" in
6504 */MacOSX10.4u.sdk)
6505 # Build using 10.4 SDK, force usage of gcc when the
6506 # compiler is gcc, otherwise the user will get very
6507 # confusing error messages when building on OSX 10.6
6508 CC=gcc-4.0
6509 CPP=cpp-4.0
6510 ;;
6511 esac
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006513$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006514 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006515
Ned Deily87adb6e2013-10-18 21:09:56 -07006516 if test "${enable_universalsdk}"
6517 then
6518 case "$UNIVERSAL_ARCHS" in
6519 32-bit)
6520 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6521 LIPO_32BIT_FLAGS=""
6522 ARCH_RUN_32BIT=""
6523 ;;
6524 64-bit)
6525 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6526 LIPO_32BIT_FLAGS=""
6527 ARCH_RUN_32BIT="true"
6528 ;;
6529 all)
6530 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6531 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6532 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6533 ;;
6534 intel)
6535 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6536 LIPO_32BIT_FLAGS="-extract i386"
6537 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6538 ;;
6539 intel-32)
6540 UNIVERSAL_ARCH_FLAGS="-arch i386"
6541 LIPO_32BIT_FLAGS=""
6542 ARCH_RUN_32BIT=""
6543 ;;
6544 3-way)
6545 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6546 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6547 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6548 ;;
6549 *)
6550 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6551 ;;
6552 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Ned Deily87adb6e2013-10-18 21:09:56 -07006554 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6555 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6556 if test "${UNIVERSALSDK}" != "/"
6557 then
6558 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6559 fi
6560 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006561
Ned Deily87adb6e2013-10-18 21:09:56 -07006562 # Calculate an appropriate deployment target for this build:
6563 # The deployment target value is used explicitly to enable certain
6564 # features are enabled (such as builtin libedit support for readline)
6565 # through the use of Apple's Availabiliy Macros and is used as a
6566 # component of the string returned by distutils.get_platform().
6567 #
6568 # Use the value from:
6569 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6570 # 2. the operating system version of the build machine if >= 10.6
6571 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6572 # below to pick either 10.3, 10.4, or 10.5 as the target.
6573 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574
Ned Deily87adb6e2013-10-18 21:09:56 -07006575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6576$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07006577 cur_target_major=`sw_vers -productVersion | \
6578 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6579 cur_target_minor=`sw_vers -productVersion | \
6580 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6581 cur_target="${cur_target_major}.${cur_target_minor}"
6582 if test ${cur_target_major} -eq 10 && \
6583 test ${cur_target_minor} -ge 3 && \
6584 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07006585 then
Ned Deily36820b62014-06-25 13:44:22 -07006586 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07006587 cur_target=10.3
6588 if test ${enable_universalsdk}
6589 then
6590 case "$UNIVERSAL_ARCHS" in
6591 all|3-way|intel|64-bit)
6592 # These configurations were first supported in 10.5
6593 cur_target='10.5'
6594 ;;
6595 esac
6596 else
6597 if test `/usr/bin/arch` = "i386"
6598 then
6599 # 10.4 was the first release to support Intel archs
6600 cur_target="10.4"
6601 fi
6602 fi
6603 fi
6604 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006605
Ned Deily87adb6e2013-10-18 21:09:56 -07006606 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6607 # environment with a value that is the same as what we'll use
6608 # in the Makefile to ensure that we'll get the same compiler
6609 # environment during configure and build time.
6610 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6611 export MACOSX_DEPLOYMENT_TARGET
6612 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6614$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006615
Ned Deily87adb6e2013-10-18 21:09:56 -07006616 # end of Darwin* tests
6617 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618 esac
6619 ;;
6620
6621*)
6622 case $ac_sys_system in
6623 OpenUNIX*|UnixWare*)
6624 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6625 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626 SCO_SV*)
6627 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6628 ;;
6629 esac
6630 ;;
6631esac
6632
6633if test "$Py_DEBUG" = 'true'; then
6634 :
6635else
6636 OPT="-DNDEBUG $OPT"
6637fi
6638
6639if test "$ac_arch_flags"
6640then
6641 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6642fi
6643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644# On some compilers, pthreads are available without further options
6645# (e.g. MacOS X). On some of these systems, the compiler will not
6646# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6647# So we have to see first whether pthreads are available without
6648# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6650$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006651if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006652 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653else
Matthias Kloseb9621712010-04-24 17:59:49 +00006654 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655 ac_cv_pthread_is_default=no
6656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658/* end confdefs.h. */
6659
Stefan Krah7dba5942012-11-22 22:49:11 +01006660#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661#include <pthread.h>
6662
6663void* routine(void* p){return NULL;}
6664
6665int main(){
6666 pthread_t p;
6667 if(pthread_create(&p,NULL,routine,NULL)!=0)
6668 return 1;
6669 (void)pthread_detach(p);
6670 return 0;
6671}
6672
6673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006674if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675
6676 ac_cv_pthread_is_default=yes
6677 ac_cv_kthread=no
6678 ac_cv_pthread=no
6679
6680else
Matthias Kloseb9621712010-04-24 17:59:49 +00006681 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685fi
6686
6687
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688fi
6689
Matthias Kloseb9621712010-04-24 17:59:49 +00006690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6691$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692
6693
6694if test $ac_cv_pthread_is_default = yes
6695then
6696 ac_cv_kpthread=no
6697else
6698# -Kpthread, if available, provides the right #defines
6699# and linker options to make pthread_create available
6700# Some compilers won't report that they do not support -Kpthread,
6701# so we need to run a program to see whether it really made the
6702# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6704$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006705if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006706 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707else
6708 ac_save_cc="$CC"
6709CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006710if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711 ac_cv_kpthread=no
6712else
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714/* end confdefs.h. */
6715
Stefan Krah7dba5942012-11-22 22:49:11 +01006716#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717#include <pthread.h>
6718
6719void* routine(void* p){return NULL;}
6720
6721int main(){
6722 pthread_t p;
6723 if(pthread_create(&p,NULL,routine,NULL)!=0)
6724 return 1;
6725 (void)pthread_detach(p);
6726 return 0;
6727}
6728
6729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006730if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731 ac_cv_kpthread=yes
6732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6736 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737fi
6738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739CC="$ac_save_cc"
6740fi
6741
Matthias Kloseb9621712010-04-24 17:59:49 +00006742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6743$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744fi
6745
6746if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6747then
6748# -Kthread, if available, provides the right #defines
6749# and linker options to make pthread_create available
6750# Some compilers won't report that they do not support -Kthread,
6751# so we need to run a program to see whether it really made the
6752# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6754$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006755if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757else
6758 ac_save_cc="$CC"
6759CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006760if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761 ac_cv_kthread=no
6762else
Matthias Kloseb9621712010-04-24 17:59:49 +00006763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764/* end confdefs.h. */
6765
Stefan Krah7dba5942012-11-22 22:49:11 +01006766#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767#include <pthread.h>
6768
6769void* routine(void* p){return NULL;}
6770
6771int main(){
6772 pthread_t p;
6773 if(pthread_create(&p,NULL,routine,NULL)!=0)
6774 return 1;
6775 (void)pthread_detach(p);
6776 return 0;
6777}
6778
6779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 ac_cv_kthread=yes
6782else
Matthias Kloseb9621712010-04-24 17:59:49 +00006783 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787fi
6788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006789CC="$ac_save_cc"
6790fi
6791
Matthias Kloseb9621712010-04-24 17:59:49 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6793$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006794fi
6795
6796if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6797then
6798# -pthread, if available, provides the right #defines
6799# and linker options to make pthread_create available
6800# Some compilers won't report that they do not support -pthread,
6801# so we need to run a program to see whether it really made the
6802# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6804$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006805if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006806 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006807else
6808 ac_save_cc="$CC"
6809CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006810if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811 ac_cv_pthread=no
6812else
Matthias Kloseb9621712010-04-24 17:59:49 +00006813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814/* end confdefs.h. */
6815
Stefan Krah7dba5942012-11-22 22:49:11 +01006816#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817#include <pthread.h>
6818
6819void* routine(void* p){return NULL;}
6820
6821int main(){
6822 pthread_t p;
6823 if(pthread_create(&p,NULL,routine,NULL)!=0)
6824 return 1;
6825 (void)pthread_detach(p);
6826 return 0;
6827}
6828
6829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 ac_cv_pthread=yes
6832else
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837fi
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839CC="$ac_save_cc"
6840fi
6841
Matthias Kloseb9621712010-04-24 17:59:49 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6843$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006844fi
6845
6846# If we have set a CC compiler flag for thread support then
6847# check if it works for CXX, too.
6848ac_cv_cxx_thread=no
6849if test ! -z "$CXX"
6850then
Matthias Kloseb9621712010-04-24 17:59:49 +00006851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6852$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853ac_save_cxx="$CXX"
6854
6855if test "$ac_cv_kpthread" = "yes"
6856then
6857 CXX="$CXX -Kpthread"
6858 ac_cv_cxx_thread=yes
6859elif test "$ac_cv_kthread" = "yes"
6860then
6861 CXX="$CXX -Kthread"
6862 ac_cv_cxx_thread=yes
6863elif test "$ac_cv_pthread" = "yes"
6864then
6865 CXX="$CXX -pthread"
6866 ac_cv_cxx_thread=yes
6867fi
6868
6869if test $ac_cv_cxx_thread = yes
6870then
6871 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6872 $CXX -c conftest.$ac_ext 2>&5
6873 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6874 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6875 then
6876 ac_cv_cxx_thread=yes
6877 else
6878 ac_cv_cxx_thread=no
6879 fi
6880 rm -fr conftest*
6881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6883$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884fi
6885CXX="$ac_save_cxx"
6886
6887
6888# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6890$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006891if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006892 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893else
Matthias Kloseb9621712010-04-24 17:59:49 +00006894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895/* end confdefs.h. */
6896#include <stdlib.h>
6897#include <stdarg.h>
6898#include <string.h>
6899#include <float.h>
6900
6901int
6902main ()
6903{
6904
6905 ;
6906 return 0;
6907}
6908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006909if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910 ac_cv_header_stdc=yes
6911else
Matthias Kloseb9621712010-04-24 17:59:49 +00006912 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6915
6916if test $ac_cv_header_stdc = yes; then
6917 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919/* end confdefs.h. */
6920#include <string.h>
6921
6922_ACEOF
6923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006924 $EGREP "memchr" >/dev/null 2>&1; then :
6925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926else
6927 ac_cv_header_stdc=no
6928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006929rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930
6931fi
6932
6933if test $ac_cv_header_stdc = yes; then
6934 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006936/* end confdefs.h. */
6937#include <stdlib.h>
6938
6939_ACEOF
6940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006941 $EGREP "free" >/dev/null 2>&1; then :
6942
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006943else
6944 ac_cv_header_stdc=no
6945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006946rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947
6948fi
6949
6950if test $ac_cv_header_stdc = yes; then
6951 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953 :
6954else
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006956/* end confdefs.h. */
6957#include <ctype.h>
6958#include <stdlib.h>
6959#if ((' ' & 0x0FF) == 0x020)
6960# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6961# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6962#else
6963# define ISLOWER(c) \
6964 (('a' <= (c) && (c) <= 'i') \
6965 || ('j' <= (c) && (c) <= 'r') \
6966 || ('s' <= (c) && (c) <= 'z'))
6967# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6968#endif
6969
6970#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6971int
6972main ()
6973{
6974 int i;
6975 for (i = 0; i < 256; i++)
6976 if (XOR (islower (i), ISLOWER (i))
6977 || toupper (i) != TOUPPER (i))
6978 return 2;
6979 return 0;
6980}
6981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006982if ac_fn_c_try_run "$LINENO"; then :
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984else
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989fi
6990
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991fi
6992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6994$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995if test $ac_cv_header_stdc = yes; then
6996
Matthias Kloseb9621712010-04-24 17:59:49 +00006997$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006998
6999fi
7000
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007001for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007002fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007003ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007004sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007005unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007006poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007007sys/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 +01007008sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007009sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007010sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007011sys/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 -07007012libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007013bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7014sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007015do :
7016 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7017ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007018if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007019 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007020#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007021_ACEOF
7022
7023fi
7024
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025done
7026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007027ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007028for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007029 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7031$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007032if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007033 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007034else
Matthias Kloseb9621712010-04-24 17:59:49 +00007035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007036/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007037#include <sys/types.h>
7038#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007039
Martin v. Löwis11437992002-04-12 09:54:03 +00007040int
7041main ()
7042{
7043if ((DIR *) 0)
7044return 0;
7045 ;
7046 return 0;
7047}
7048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007049if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007050 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007051else
Matthias Kloseb9621712010-04-24 17:59:49 +00007052 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007056eval ac_res=\$$as_ac_Header
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7058$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007059if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007061#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007062_ACEOF
7063
7064ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007066
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007067done
7068# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7069if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7071$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007072if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074else
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079/* Override any GCC internal prototype to avoid an error.
7080 Use char because int might match the return type of a GCC
7081 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007082#ifdef __cplusplus
7083extern "C"
7084#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007085char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007086int
7087main ()
7088{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007090 ;
7091 return 0;
7092}
7093_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094for ac_lib in '' dir; do
7095 if test -z "$ac_lib"; then
7096 ac_res="none required"
7097 else
7098 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007099 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007100 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007102 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104rm -f core conftest.err conftest.$ac_objext \
7105 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007106 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007107 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007109done
Victor Stinnere0be4232011-10-25 13:06:09 +02007110if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112else
7113 ac_cv_search_opendir=no
7114fi
7115rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007116LIBS=$ac_func_search_save_LIBS
7117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7119$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007120ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007121if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007122 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007123
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007125
Michael W. Hudson54241132001-12-07 15:38:26 +00007126else
Matthias Kloseb9621712010-04-24 17:59:49 +00007127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7128$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007129if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007131else
7132 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007136/* Override any GCC internal prototype to avoid an error.
7137 Use char because int might match the return type of a GCC
7138 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007139#ifdef __cplusplus
7140extern "C"
7141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007142char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007143int
7144main ()
7145{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 ;
7148 return 0;
7149}
7150_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151for ac_lib in '' x; do
7152 if test -z "$ac_lib"; then
7153 ac_res="none required"
7154 else
7155 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007156 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007157 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007160fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007161rm -f core conftest.err conftest.$ac_objext \
7162 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007163 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007164 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007166done
Victor Stinnere0be4232011-10-25 13:06:09 +02007167if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007168
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007169else
7170 ac_cv_search_opendir=no
7171fi
7172rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007173LIBS=$ac_func_search_save_LIBS
7174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7176$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007177ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007178if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007179 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007180
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007181fi
7182
7183fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007184
Matthias Kloseb9621712010-04-24 17:59:49 +00007185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7186$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007187if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007188 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007191/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007192#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007193int
7194main ()
7195{
7196return makedev(0, 0);
7197 ;
7198 return 0;
7199}
7200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007201if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007202 ac_cv_header_sys_types_h_makedev=yes
7203else
Matthias Kloseb9621712010-04-24 17:59:49 +00007204 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007206rm -f core conftest.err conftest.$ac_objext \
7207 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007208
7209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7211$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007212
7213if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007214ac_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 +02007215if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007216
Matthias Kloseb9621712010-04-24 17:59:49 +00007217$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007218
7219fi
7220
7221
7222
7223 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 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 +02007225if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007226
Matthias Kloseb9621712010-04-24 17:59:49 +00007227$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228
7229fi
7230
7231
7232 fi
7233fi
7234
Michael W. Hudson54241132001-12-07 15:38:26 +00007235
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007236# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7237for ac_header in net/if.h
7238do :
7239 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7240#ifdef STDC_HEADERS
7241# include <stdlib.h>
7242# include <stddef.h>
7243#else
7244# ifdef HAVE_STDLIB_H
7245# include <stdlib.h>
7246# endif
7247#endif
7248#ifdef HAVE_SYS_SOCKET_H
7249# include <sys/socket.h>
7250#endif
7251
7252"
Victor Stinnere0be4232011-10-25 13:06:09 +02007253if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007254 cat >>confdefs.h <<_ACEOF
7255#define HAVE_NET_IF_H 1
7256_ACEOF
7257
7258fi
7259
7260done
7261
7262
Martin v. Löwis11017b12006-01-14 18:12:57 +00007263# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007264for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007265do :
7266 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 +00007267#ifdef HAVE_ASM_TYPES_H
7268#include <asm/types.h>
7269#endif
7270#ifdef HAVE_SYS_SOCKET_H
7271#include <sys/socket.h>
7272#endif
7273
Matthias Kloseb9621712010-04-24 17:59:49 +00007274"
Victor Stinnere0be4232011-10-25 13:06:09 +02007275if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007276 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007277#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007278_ACEOF
7279
7280fi
7281
7282done
7283
7284
Charles-François Natali47413c12011-10-06 19:47:44 +02007285# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007286for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007287do :
7288 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7289ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7290#ifdef HAVE_SYS_SOCKET_H
7291#include <sys/socket.h>
7292#endif
7293
7294"
7295if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7296 cat >>confdefs.h <<_ACEOF
7297#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7298_ACEOF
7299
7300fi
7301
7302done
7303
7304
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007306was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7308$as_echo_n "checking for clock_t in time.h... " >&6; }
7309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007310/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007311#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007312
7313_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007316 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007317else
Martin v. Löwis11437992002-04-12 09:54:03 +00007318
7319
Matthias Kloseb9621712010-04-24 17:59:49 +00007320$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007321
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007322
Guido van Rossum627b2d71993-12-24 10:39:16 +00007323fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007324rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007325
Matthias Kloseb9621712010-04-24 17:59:49 +00007326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7327$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007328
Matthias Kloseb9621712010-04-24 17:59:49 +00007329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7330$as_echo_n "checking for makedev... " >&6; }
7331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007332/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007333
Jesus Cea740f53a2010-04-28 11:35:30 +00007334#if defined(MAJOR_IN_MKDEV)
7335#include <sys/mkdev.h>
7336#elif defined(MAJOR_IN_SYSMACROS)
7337#include <sys/sysmacros.h>
7338#else
7339#include <sys/types.h>
7340#endif
7341
Neal Norwitz11690112002-07-30 01:08:28 +00007342int
7343main ()
7344{
Jesus Cea740f53a2010-04-28 11:35:30 +00007345
7346 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007347 ;
7348 return 0;
7349}
Matthias Kloseb159a552010-04-25 21:00:44 +00007350
Neal Norwitz11690112002-07-30 01:08:28 +00007351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007352if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007353 ac_cv_has_makedev=yes
7354else
Matthias Kloseb9621712010-04-24 17:59:49 +00007355 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007357rm -f core conftest.err conftest.$ac_objext \
7358 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7360$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007361if test "$ac_cv_has_makedev" = "yes"; then
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007364
7365fi
7366
Christian Heimes985ecdc2013-11-20 11:46:18 +01007367# byte swapping
7368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7369$as_echo_n "checking for le64toh... " >&6; }
7370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7371/* end confdefs.h. */
7372
7373#ifdef HAVE_ENDIAN_H
7374#include <endian.h>
7375#elif defined(HAVE_SYS_ENDIAN_H)
7376#include <sys/endian.h>
7377#endif
7378
7379int
7380main ()
7381{
7382
7383 le64toh(1)
7384 ;
7385 return 0;
7386}
7387
7388_ACEOF
7389if ac_fn_c_try_link "$LINENO"; then :
7390 ac_cv_has_le64toh=yes
7391else
7392 ac_cv_has_le64toh=no
7393fi
7394rm -f core conftest.err conftest.$ac_objext \
7395 conftest$ac_exeext conftest.$ac_ext
7396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7397$as_echo "$ac_cv_has_le64toh" >&6; }
7398if test "$ac_cv_has_le64toh" = "yes"; then
7399
7400$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7401
7402fi
7403
Martin v. Löwis399a6892002-10-04 10:22:02 +00007404# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7405# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7406# defined, but the compiler does not support pragma redefine_extname,
7407# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7408# structures (such as rlimit64) without declaring them. As a
7409# work-around, disable LFS on such configurations
7410
7411use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7413$as_echo_n "checking Solaris LFS bug... " >&6; }
7414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007415/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007416
7417#define _LARGEFILE_SOURCE 1
7418#define _FILE_OFFSET_BITS 64
7419#include <sys/resource.h>
7420
Martin v. Löwis399a6892002-10-04 10:22:02 +00007421int
7422main ()
7423{
7424struct rlimit foo;
7425 ;
7426 return 0;
7427}
7428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007430 sol_lfs_bug=no
7431else
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7436$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007437if test "$sol_lfs_bug" = "yes"; then
7438 use_lfs=no
7439fi
7440
7441if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007442# Two defines needed to enable largefile support on various platforms
7443# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007444case $ac_sys_system/$ac_sys_release in
7445AIX*)
7446
7447$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7448
7449 ;;
7450esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007451
Matthias Kloseb9621712010-04-24 17:59:49 +00007452$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454
Matthias Kloseb9621712010-04-24 17:59:49 +00007455$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007456
Martin v. Löwis399a6892002-10-04 10:22:02 +00007457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007458
Guido van Rossum84e7b241996-08-19 21:59:00 +00007459# Add some code to confdefs.h so that the test for off_t works on SCO
7460cat >> confdefs.h <<\EOF
7461#if defined(SCO_DS)
7462#undef _OFF_T
7463#endif
7464EOF
7465
Guido van Rossumef2255b2000-03-10 22:30:29 +00007466# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007467ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007468if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007470else
Martin v. Löwis11437992002-04-12 09:54:03 +00007471
7472cat >>confdefs.h <<_ACEOF
7473#define mode_t int
7474_ACEOF
7475
7476fi
7477
Matthias Kloseb9621712010-04-24 17:59:49 +00007478ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007479if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007481else
Martin v. Löwis11437992002-04-12 09:54:03 +00007482
7483cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007484#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007485_ACEOF
7486
7487fi
7488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007490if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007491
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007492else
Martin v. Löwis11437992002-04-12 09:54:03 +00007493
7494cat >>confdefs.h <<_ACEOF
7495#define pid_t int
7496_ACEOF
7497
7498fi
7499
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007500
Martin v. Löwis11437992002-04-12 09:54:03 +00007501cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007502#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007503_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007504
Matthias Kloseb9621712010-04-24 17:59:49 +00007505ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007506if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508else
Martin v. Löwis11437992002-04-12 09:54:03 +00007509
7510cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007511#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
7513
7514fi
7515
Matthias Kloseb9621712010-04-24 17:59:49 +00007516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7517$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007518if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007519 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007522/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007523#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007524
7525_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007527 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007528 ac_cv_type_uid_t=yes
7529else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007530 ac_cv_type_uid_t=no
7531fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007532rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007533
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7536$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007537if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538
Matthias Kloseb9621712010-04-24 17:59:49 +00007539$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007543
7544fi
7545
Mark Dickinson983bc162012-12-02 12:11:38 +00007546
7547# There are two separate checks for each of the exact-width integer types we
7548# need. First we check whether the type is available using the usual
7549# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7550# and <stdint.h> where available). We then also use the special type checks of
7551# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7552# directly, #define's uint32_t to be a suitable type.
7553
7554ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7555if test "x$ac_cv_type_uint32_t" = xyes; then :
7556
7557$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7558
7559fi
7560
Matthias Kloseb9621712010-04-24 17:59:49 +00007561ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7562case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007563 no|yes) ;; #(
7564 *)
7565
Matthias Kloseb9621712010-04-24 17:59:49 +00007566$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007567
7568
7569cat >>confdefs.h <<_ACEOF
7570#define uint32_t $ac_cv_c_uint32_t
7571_ACEOF
7572;;
7573 esac
7574
Mark Dickinson983bc162012-12-02 12:11:38 +00007575
7576ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7577if test "x$ac_cv_type_uint64_t" = xyes; then :
7578
7579$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7580
7581fi
7582
Matthias Kloseb9621712010-04-24 17:59:49 +00007583ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7584case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007585 no|yes) ;; #(
7586 *)
7587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007589
7590
7591cat >>confdefs.h <<_ACEOF
7592#define uint64_t $ac_cv_c_uint64_t
7593_ACEOF
7594;;
7595 esac
7596
Mark Dickinson983bc162012-12-02 12:11:38 +00007597
7598ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7599if test "x$ac_cv_type_int32_t" = xyes; then :
7600
7601$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7602
7603fi
7604
Matthias Kloseb9621712010-04-24 17:59:49 +00007605ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7606case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007607 no|yes) ;; #(
7608 *)
7609
7610cat >>confdefs.h <<_ACEOF
7611#define int32_t $ac_cv_c_int32_t
7612_ACEOF
7613;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007614esac
7615
Mark Dickinson983bc162012-12-02 12:11:38 +00007616
7617ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7618if test "x$ac_cv_type_int64_t" = xyes; then :
7619
7620$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7621
7622fi
7623
Matthias Kloseb9621712010-04-24 17:59:49 +00007624ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7625case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007626 no|yes) ;; #(
7627 *)
7628
7629cat >>confdefs.h <<_ACEOF
7630#define int64_t $ac_cv_c_int64_t
7631_ACEOF
7632;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007633esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007634
Mark Dickinson983bc162012-12-02 12:11:38 +00007635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007637if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638
Matthias Kloseb9621712010-04-24 17:59:49 +00007639$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007640
7641fi
7642
Stefan Krah1919b7e2012-03-21 18:25:23 +01007643ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7644if test "x$ac_cv_type___uint128_t" = xyes; then :
7645
7646$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7647
7648fi
7649
Jack Jansendd19cf82001-12-06 22:36:17 +00007650
Michael W. Hudson54241132001-12-07 15:38:26 +00007651# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007652# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653# The cast to long int works around a bug in the HP C Compiler
7654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7658$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007659if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 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 +00007663
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 if test "$ac_cv_type_int" = yes; then
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007668as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 else
7671 ac_cv_sizeof_int=0
7672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7677$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678
7679
7680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007682#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007683_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007684
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686# The cast to long int works around a bug in the HP C Compiler
7687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7691$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 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 +00007696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 if test "$ac_cv_type_long" = yes; then
7699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007701as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 else
7704 ac_cv_sizeof_long=0
7705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7710$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711
7712
7713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007715#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007717
7718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719# The cast to long int works around a bug in the HP C Compiler
7720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7724$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007725if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 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 +00007729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 if test "$ac_cv_type_void_p" = yes; then
7732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007734as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 else
7737 ac_cv_sizeof_void_p=0
7738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740
Martin v. Löwis11437992002-04-12 09:54:03 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7743$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744
7745
7746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007748#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007749_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007750
7751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752# The cast to long int works around a bug in the HP C Compiler
7753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7757$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007758if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 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 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if test "$ac_cv_type_short" = yes; then
7765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007767as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007768See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 else
7770 ac_cv_sizeof_short=0
7771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007773
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7776$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777
7778
7779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007781#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007782_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007783
7784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785# The cast to long int works around a bug in the HP C Compiler
7786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7790$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007791if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 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 +00007795
Martin v. Löwis11437992002-04-12 09:54:03 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 if test "$ac_cv_type_float" = yes; then
7798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007800as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007801See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 else
7803 ac_cv_sizeof_float=0
7804 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806
Martin v. Löwis11437992002-04-12 09:54:03 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7809$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810
7811
7812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007814#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007815_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007816
7817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818# The cast to long int works around a bug in the HP C Compiler
7819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7823$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 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 +00007828
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if test "$ac_cv_type_double" = yes; then
7831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007833as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007834See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835 else
7836 ac_cv_sizeof_double=0
7837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839
Martin v. Löwis11437992002-04-12 09:54:03 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7842$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843
7844
7845
Martin v. Löwis11437992002-04-12 09:54:03 +00007846cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007847#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007848_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007849
7850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007851# The cast to long int works around a bug in the HP C Compiler
7852# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7853# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7854# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7856$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007857if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007859else
Matthias Kloseb9621712010-04-24 17:59:49 +00007860 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 +00007861
Martin v. Löwis11437992002-04-12 09:54:03 +00007862else
Matthias Kloseb9621712010-04-24 17:59:49 +00007863 if test "$ac_cv_type_fpos_t" = yes; then
7864 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007866as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007867See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868 else
7869 ac_cv_sizeof_fpos_t=0
7870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872
Martin v. Löwis11437992002-04-12 09:54:03 +00007873fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7875$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007876
7877
7878
Martin v. Löwis11437992002-04-12 09:54:03 +00007879cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007880#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007881_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007882
Michael W. Hudson54241132001-12-07 15:38:26 +00007883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884# The cast to long int works around a bug in the HP C Compiler
7885# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7886# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7887# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7889$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007892else
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 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 +00007894
Martin v. Löwis18e16552006-02-15 17:27:45 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 if test "$ac_cv_type_size_t" = yes; then
7897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007899as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007900See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 else
7902 ac_cv_sizeof_size_t=0
7903 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007905
Martin v. Löwis18e16552006-02-15 17:27:45 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7908$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007909
7910
7911
Martin v. Löwis18e16552006-02-15 17:27:45 +00007912cat >>confdefs.h <<_ACEOF
7913#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7914_ACEOF
7915
7916
Christian Heimes400adb02008-02-01 08:12:03 +00007917# The cast to long int works around a bug in the HP C Compiler
7918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7922$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007925else
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 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 +00007927
Christian Heimes400adb02008-02-01 08:12:03 +00007928else
Matthias Kloseb9621712010-04-24 17:59:49 +00007929 if test "$ac_cv_type_pid_t" = yes; then
7930 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7931$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007932as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007933See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007934 else
7935 ac_cv_sizeof_pid_t=0
7936 fi
7937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007938
Christian Heimes400adb02008-02-01 08:12:03 +00007939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7941$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007942
7943
7944
7945cat >>confdefs.h <<_ACEOF
7946#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7947_ACEOF
7948
7949
Michael W. Hudson54241132001-12-07 15:38:26 +00007950
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7952$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007953have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007955/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956
Martin v. Löwis11437992002-04-12 09:54:03 +00007957int
7958main ()
7959{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007960long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007961 ;
7962 return 0;
7963}
7964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007965if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007966
7967
Matthias Kloseb9621712010-04-24 17:59:49 +00007968$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007970 have_long_long=yes
7971
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7975$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007976if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977# The cast to long int works around a bug in the HP C Compiler
7978# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7979# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7980# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7982$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007983if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007984 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007985else
Matthias Kloseb9621712010-04-24 17:59:49 +00007986 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 +00007987
Martin v. Löwis11437992002-04-12 09:54:03 +00007988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 if test "$ac_cv_type_long_long" = yes; then
7990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007992as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007993See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994 else
7995 ac_cv_sizeof_long_long=0
7996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998
Martin v. Löwis11437992002-04-12 09:54:03 +00007999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8001$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002
8003
8004
Martin v. Löwis11437992002-04-12 09:54:03 +00008005cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008006#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008007_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008008
Michael W. Hudson54241132001-12-07 15:38:26 +00008009
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008010fi
8011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8013$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008014have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008016/* end confdefs.h. */
8017
8018int
8019main ()
8020{
8021long double x; x = (long double)0;
8022 ;
8023 return 0;
8024}
8025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008026if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008027
8028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008030
8031 have_long_double=yes
8032
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008033fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8036$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008037if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008038# The cast to long int works around a bug in the HP C Compiler
8039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8041# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8043$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008045 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008046else
Matthias Kloseb9621712010-04-24 17:59:49 +00008047 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 +00008048
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008049else
Matthias Kloseb9621712010-04-24 17:59:49 +00008050 if test "$ac_cv_type_long_double" = yes; then
8051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008053as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008054See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008055 else
8056 ac_cv_sizeof_long_double=0
8057 fi
8058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8062$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008063
8064
8065
8066cat >>confdefs.h <<_ACEOF
8067#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8068_ACEOF
8069
8070
8071fi
8072
8073
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8075$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008076have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008078/* end confdefs.h. */
8079
8080int
8081main ()
8082{
8083_Bool x; x = (_Bool)0;
8084 ;
8085 return 0;
8086}
8087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008088if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008089
8090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008092
8093 have_c99_bool=yes
8094
Thomas Woutersb2137042007-02-01 18:02:27 +00008095fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8098$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008099if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008100# The cast to long int works around a bug in the HP C Compiler
8101# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8102# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8103# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8105$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008106if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008107 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008108else
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 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 +00008110
Thomas Woutersb2137042007-02-01 18:02:27 +00008111else
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 if test "$ac_cv_type__Bool" = yes; then
8113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008115as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008116See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008117 else
8118 ac_cv_sizeof__Bool=0
8119 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121
Thomas Woutersb2137042007-02-01 18:02:27 +00008122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8124$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008125
8126
8127
Thomas Woutersb2137042007-02-01 18:02:27 +00008128cat >>confdefs.h <<_ACEOF
8129#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8130_ACEOF
8131
8132
8133fi
8134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008136 #include <stdint.h>
8137 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008138 #ifdef HAVE_INTTYPES_H
8139 #include <inttypes.h>
8140 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008141"
Victor Stinnere0be4232011-10-25 13:06:09 +02008142if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008143
8144cat >>confdefs.h <<_ACEOF
8145#define HAVE_UINTPTR_T 1
8146_ACEOF
8147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148# The cast to long int works around a bug in the HP C Compiler
8149# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8150# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8151# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8153$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008154if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008155 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 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 +00008158
Martin v. Löwis11437992002-04-12 09:54:03 +00008159else
Matthias Kloseb9621712010-04-24 17:59:49 +00008160 if test "$ac_cv_type_uintptr_t" = yes; then
8161 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8162$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008163as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008164See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008165 else
8166 ac_cv_sizeof_uintptr_t=0
8167 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8172$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008173
8174
8175
Martin v. Löwis11437992002-04-12 09:54:03 +00008176cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008177#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008178_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008179
Michael W. Hudson54241132001-12-07 15:38:26 +00008180
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008181fi
8182
Thomas Wouters89f507f2006-12-13 04:49:30 +00008183
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008184# The cast to long int works around a bug in the HP C Compiler
8185# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8186# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8187# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8189$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008190if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008191 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192else
Matthias Kloseb9621712010-04-24 17:59:49 +00008193 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008194#ifdef HAVE_SYS_TYPES_H
8195#include <sys/types.h>
8196#endif
8197
Matthias Kloseb9621712010-04-24 17:59:49 +00008198"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008199
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008200else
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 if test "$ac_cv_type_off_t" = yes; then
8202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008204as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008205See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008206 else
8207 ac_cv_sizeof_off_t=0
8208 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008210
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8213$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008214
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008215
8216
Martin v. Löwis11437992002-04-12 09:54:03 +00008217cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008218#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008219_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008220
Michael W. Hudson54241132001-12-07 15:38:26 +00008221
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008222
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8224$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008225if test "$have_long_long" = yes
8226then
8227if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008228 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8233$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008234else
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008237fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008238else
Matthias Kloseb9621712010-04-24 17:59:49 +00008239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8240$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008241fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243# The cast to long int works around a bug in the HP C Compiler
8244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8248$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008249if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008251else
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008253#ifdef HAVE_SYS_TYPES_H
8254#include <sys/types.h>
8255#endif
8256#ifdef HAVE_TIME_H
8257#include <time.h>
8258#endif
8259
Matthias Kloseb9621712010-04-24 17:59:49 +00008260"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008262else
Matthias Kloseb9621712010-04-24 17:59:49 +00008263 if test "$ac_cv_type_time_t" = yes; then
8264 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8265$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008266as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008267See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008268 else
8269 ac_cv_sizeof_time_t=0
8270 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008272
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008273fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8275$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008277
8278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008280#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008281_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008282
Michael W. Hudson54241132001-12-07 15:38:26 +00008283
8284
Trent Mick635f6fb2000-08-23 21:33:05 +00008285# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008286ac_save_cc="$CC"
8287if test "$ac_cv_kpthread" = "yes"
8288then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008289elif test "$ac_cv_kthread" = "yes"
8290then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008291elif test "$ac_cv_pthread" = "yes"
8292then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008293fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008294
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8296$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008297have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008299/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008300
8301 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008302int
8303main ()
8304{
Guido van Rossum12580492000-09-24 16:47:19 +00008305pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008306 ;
8307 return 0;
8308}
Matthias Kloseb159a552010-04-25 21:00:44 +00008309
Martin v. Löwis11437992002-04-12 09:54:03 +00008310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008311if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008312 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8316$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008317if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8323$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008324if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008326else
Matthias Kloseb9621712010-04-24 17:59:49 +00008327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008328#ifdef HAVE_PTHREAD_H
8329#include <pthread.h>
8330#endif
8331
Matthias Kloseb9621712010-04-24 17:59:49 +00008332"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008333
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008334else
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 if test "$ac_cv_type_pthread_t" = yes; then
8336 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008338as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008339See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008340 else
8341 ac_cv_sizeof_pthread_t=0
8342 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008344
Trent Mick635f6fb2000-08-23 21:33:05 +00008345fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8347$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008349
8350
Martin v. Löwis11437992002-04-12 09:54:03 +00008351cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008352#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008353_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008354
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008355
Trent Mick635f6fb2000-08-23 21:33:05 +00008356fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008357CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008358
Michael W. Hudson54241132001-12-07 15:38:26 +00008359
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008360case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008361 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008362 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8363 ;;
8364 Darwin/*)
8365 OTHER_LIBTOOL_OPT=""
8366 ;;
8367esac
8368
8369
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008371case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008372 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008373 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8374 if test "${enable_universalsdk}"; then
8375 :
8376 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008377 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008378 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008379 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008380 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008381 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008382 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008383 if test ${gcc_version} '<' 4.0
8384 then
8385 LIBTOOL_CRUFT="-lcc_dynamic"
8386 else
8387 LIBTOOL_CRUFT=""
8388 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008389 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008390 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008391else
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008393/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008394
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008395 #include <unistd.h>
8396 int main(int argc, char*argv[])
8397 {
8398 if (sizeof(long) == 4) {
8399 return 0;
8400 } else {
8401 return 1;
8402 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008403 }
8404
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008406if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008407 ac_osx_32bit=yes
8408else
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8412 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008413fi
8414
8415
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008416 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008417 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008418 i386)
8419 MACOSX_DEFAULT_ARCH="i386"
8420 ;;
8421 ppc)
8422 MACOSX_DEFAULT_ARCH="ppc"
8423 ;;
8424 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008425 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008426 ;;
8427 esac
8428 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008429 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008430 i386)
8431 MACOSX_DEFAULT_ARCH="x86_64"
8432 ;;
8433 ppc)
8434 MACOSX_DEFAULT_ARCH="ppc64"
8435 ;;
8436 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008437 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008438 ;;
8439 esac
8440
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008441 fi
8442
8443 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008444 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008445 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008446esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8448$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008449if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008450then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008451 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008452 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008453 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008454
Matthias Kloseb9621712010-04-24 17:59:49 +00008455$as_echo "#define WITH_NEXT_FRAMEWORK 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: yes" >&5
8458$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008459 if test $enable_shared = "yes"
8460 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008461 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 +00008462 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008466fi
8467
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8469$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008470case $ac_sys_system/$ac_sys_release in
8471 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008472
Matthias Kloseb9621712010-04-24 17:59:49 +00008473$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8476$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008477 ;;
8478 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8480$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008481 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008482esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008483
Guido van Rossum0a516c91994-09-12 10:58:40 +00008484# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008485
Michael W. Hudson54241132001-12-07 15:38:26 +00008486
8487
8488
8489
Benjamin Peterson99f03762010-04-11 22:15:28 +00008490
Thomas Wouters477c8d52006-05-27 19:21:47 +00008491
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008492# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8493# -- usually .so, .sl on HP-UX, .dll on Cygwin
8494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8495$as_echo_n "checking the extension of shared libraries... " >&6; }
8496if test -z "$SHLIB_SUFFIX"; then
8497 case $ac_sys_system in
8498 hp*|HP*)
8499 case `uname -m` in
8500 ia64) SHLIB_SUFFIX=.so;;
8501 *) SHLIB_SUFFIX=.sl;;
8502 esac
8503 ;;
8504 CYGWIN*) SHLIB_SUFFIX=.dll;;
8505 *) SHLIB_SUFFIX=.so;;
8506 esac
8507fi
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8509$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008510
Guido van Rossum0a516c91994-09-12 10:58:40 +00008511# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008512# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008513# (Shared libraries in this instance are shared modules to be loaded into
8514# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8516$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008517if test -z "$LDSHARED"
8518then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008519 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008520 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008521 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008522 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008523 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008524 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008525 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008527 if test "$GCC" = "yes" ; then
8528 LDSHARED='$(CC) -shared'
8529 LDCXXSHARED='$(CXX) -shared'
8530 else
8531 LDSHARED='$(CC) -G'
8532 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008533 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008534 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008535 if test "$GCC" = "yes" ; then
8536 LDSHARED='$(CC) -shared'
8537 LDCXXSHARED='$(CXX) -shared'
8538 else
8539 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008540 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008541 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008542 LDSHARED='$(CC) -bundle'
8543 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008544 if test "$enable_framework" ; then
8545 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008546 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8547 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008548 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008549 else
8550 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008551 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008552 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008553 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008554 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008555 LDSHARED='$(CC) -bundle'
8556 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008557 if test "$enable_framework" ; then
8558 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008559 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8560 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008561 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008562 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008563 # No framework, use the Python app as bundle-loader
8564 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008565 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008566 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008567 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008568 Darwin/*)
8569 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8570 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008571
Ned Deily36820b62014-06-25 13:44:22 -07008572 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8573 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8574 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8575 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8576 if test ${dep_target_major} -eq 10 && \
8577 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008578 then
Ned Deily36820b62014-06-25 13:44:22 -07008579 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008580 LDSHARED='$(CC) -bundle'
8581 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008582 if test "$enable_framework" ; then
8583 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008584 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8585 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008586 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008587 else
8588 # No framework, use the Python app as bundle-loader
8589 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8590 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008591 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008592 fi
Ned Deily36820b62014-06-25 13:44:22 -07008593 else
8594 # building for OS X 10.3 and later
8595 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8596 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8597 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008598 fi
8599 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008600 Linux*|GNU*|QNX*)
8601 LDSHARED='$(CC) -shared'
8602 LDCXXSHARED='$(CXX) -shared';;
8603 BSD/OS*/4*)
8604 LDSHARED="gcc -shared"
8605 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008606 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008607 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008608 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008609 LDSHARED='$(CC) -shared'
8610 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008611 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008612 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008613 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008614 OpenBSD*)
8615 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8616 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008617 LDSHARED='$(CC) -shared $(CCSHARED)'
8618 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008619 else
8620 case `uname -r` in
8621 [01].* | 2.[0-7] | 2.[0-7].*)
8622 LDSHARED="ld -Bshareable ${LDFLAGS}"
8623 ;;
8624 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008625 LDSHARED='$(CC) -shared $(CCSHARED)'
8626 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008627 ;;
8628 esac
8629 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008630 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008631 LDSHARED='$(CC) -shared'
8632 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008633 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008634 if test "$GCC" = "yes" ; then
8635 LDSHARED='$(CC) -shared'
8636 LDCXXSHARED='$(CXX) -shared'
8637 else
8638 LDSHARED='$(CC) -G'
8639 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008640 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008641 SCO_SV*)
8642 LDSHARED='$(CC) -Wl,-G,-Bexport'
8643 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8644 CYGWIN*)
8645 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8646 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008647 *) LDSHARED="ld";;
8648 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8651$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008652LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008653BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008654# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008655# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8657$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008658if test -z "$CCSHARED"
8659then
Guido van Rossum07397971997-04-29 21:49:50 +00008660 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008661 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008662 then CCSHARED="-fPIC";
8663 elif test `uname -p` = sparc;
8664 then CCSHARED="-xcode=pic32";
8665 else CCSHARED="-Kpic";
8666 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008667 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008668 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008669 else CCSHARED="+z";
8670 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008671 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008672 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008673 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008674 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008675 if test "$GCC" = "yes"
8676 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008677 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008678 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008679 SCO_SV*)
8680 if test "$GCC" = "yes"
8681 then CCSHARED="-fPIC"
8682 else CCSHARED="-Kpic -belf"
8683 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008684 IRIX*/6*) case $CC in
8685 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008686 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008687 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008688 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8691$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008692# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008693# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8695$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008696if test -z "$LINKFORSHARED"
8697then
Guido van Rossum07397971997-04-29 21:49:50 +00008698 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008699 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008700 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008701 LINKFORSHARED="-Wl,-E -Wl,+s";;
8702# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008703 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008704 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008705 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008706 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008707 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008708
8709 # Issue #18075: the default maximum stack size (8MBytes) is too
8710 # small for the default recursion limit. Increase the stack size
8711 # to ensure that tests don't crash
8712 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8713
Jack Jansene578a632001-08-15 01:27:14 +00008714 if test "$enable_framework"
8715 then
Jack Jansenda49e192005-01-07 13:08:22 +00008716 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008717 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008718 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008719 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008720 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008721 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008722 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008723 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8724 then
8725 LINKFORSHARED="-Wl,--export-dynamic"
8726 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008727 SunOS/5*) case $CC in
8728 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008729 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008730 then
8731 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008732 fi;;
8733 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008734 CYGWIN*)
8735 if test $enable_shared = "no"
8736 then
8737 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8738 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008739 QNX*)
8740 # -Wl,-E causes the symbols to be added to the dynamic
8741 # symbol table so that they can be found when a module
8742 # is loaded. -N 2048K causes the stack size to be set
8743 # to 2048 kilobytes so that the stack doesn't overflow
8744 # when running test_compile.py.
8745 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008746 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8749$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008750
Michael W. Hudson54241132001-12-07 15:38:26 +00008751
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8754$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008755if test ! "$LIBRARY" = "$LDLIBRARY"
8756then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008757 case $ac_sys_system in
8758 CYGWIN*)
8759 # Cygwin needs CCSHARED when building extension DLLs
8760 # but not when building the interpreter DLL.
8761 CFLAGSFORSHARED='';;
8762 *)
8763 CFLAGSFORSHARED='$(CCSHARED)'
8764 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8767$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008768
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008769# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8770# library (with --enable-shared).
8771# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008772# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8773# if it is not required, since it creates a dependency of the shared library
8774# to LIBS. This, in turn, means that applications linking the shared libpython
8775# don't need to link LIBS explicitly. The default should be only changed
8776# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008777
Matthias Kloseb9621712010-04-24 17:59:49 +00008778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8779$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008780case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008781 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008782 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008783esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8785$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008786
8787
Guido van Rossum627b2d71993-12-24 10:39:16 +00008788# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8790$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008791if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008792 $as_echo_n "(cached) " >&6
8793else
8794 ac_check_lib_save_LIBS=$LIBS
8795LIBS="-lsendfile $LIBS"
8796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8797/* end confdefs.h. */
8798
8799/* Override any GCC internal prototype to avoid an error.
8800 Use char because int might match the return type of a GCC
8801 builtin and then its argument prototype would still apply. */
8802#ifdef __cplusplus
8803extern "C"
8804#endif
8805char sendfile ();
8806int
8807main ()
8808{
8809return sendfile ();
8810 ;
8811 return 0;
8812}
8813_ACEOF
8814if ac_fn_c_try_link "$LINENO"; then :
8815 ac_cv_lib_sendfile_sendfile=yes
8816else
8817 ac_cv_lib_sendfile_sendfile=no
8818fi
8819rm -f core conftest.err conftest.$ac_objext \
8820 conftest$ac_exeext conftest.$ac_ext
8821LIBS=$ac_check_lib_save_LIBS
8822fi
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8824$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008825if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008826 cat >>confdefs.h <<_ACEOF
8827#define HAVE_LIBSENDFILE 1
8828_ACEOF
8829
8830 LIBS="-lsendfile $LIBS"
8831
8832fi
8833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8835$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008836if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008838else
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008840LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008844/* Override any GCC internal prototype to avoid an error.
8845 Use char because int might match the return type of a GCC
8846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008847#ifdef __cplusplus
8848extern "C"
8849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008850char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008851int
8852main ()
8853{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008854return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ;
8856 return 0;
8857}
8858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008859if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008861else
Matthias Kloseb9621712010-04-24 17:59:49 +00008862 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864rm -f core conftest.err conftest.$ac_objext \
8865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008866LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008867fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8869$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008870if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 cat >>confdefs.h <<_ACEOF
8872#define HAVE_LIBDL 1
8873_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008875 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008876
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008877fi
8878 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8880$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008881if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008883else
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008885LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008889/* Override any GCC internal prototype to avoid an error.
8890 Use char because int might match the return type of a GCC
8891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008892#ifdef __cplusplus
8893extern "C"
8894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008895char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ;
8901 return 0;
8902}
8903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008904if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008909rm -f core conftest.err conftest.$ac_objext \
8910 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008911LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8914$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008915if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 cat >>confdefs.h <<_ACEOF
8917#define HAVE_LIBDLD 1
8918_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008919
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008920 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008921
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008922fi
8923 # Dynamic linking for HP-UX
Victor Stinnerfcfed192015-01-06 13:54:58 +01008924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8925$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8926if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8927 $as_echo_n "(cached) " >&6
8928else
8929 ac_check_lib_save_LIBS=$LIBS
8930LIBS="-lcrypto $LIBS"
8931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8932/* end confdefs.h. */
8933
8934/* Override any GCC internal prototype to avoid an error.
8935 Use char because int might match the return type of a GCC
8936 builtin and then its argument prototype would still apply. */
8937#ifdef __cplusplus
8938extern "C"
8939#endif
8940char RAND_egd ();
8941int
8942main ()
8943{
8944return RAND_egd ();
8945 ;
8946 return 0;
8947}
8948_ACEOF
8949if ac_fn_c_try_link "$LINENO"; then :
8950 ac_cv_lib_crypto_RAND_egd=yes
8951else
8952 ac_cv_lib_crypto_RAND_egd=no
8953fi
8954rm -f core conftest.err conftest.$ac_objext \
8955 conftest$ac_exeext conftest.$ac_ext
8956LIBS=$ac_check_lib_save_LIBS
8957fi
8958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8959$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8960if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8961
8962$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8963
8964fi
8965
Martin v. Löwis519adae2003-09-20 10:47:47 +00008966
Georg Brandlb1441c72009-01-03 22:33:39 +00008967# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008968if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8970$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008973else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008974 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008978/* Override any GCC internal prototype to avoid an error.
8979 Use char because int might match the return type of a GCC
8980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981#ifdef __cplusplus
8982extern "C"
8983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008984char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008988return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ;
8990 return 0;
8991}
8992_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993for ac_lib in '' pthread rt posix4; do
8994 if test -z "$ac_lib"; then
8995 ac_res="none required"
8996 else
8997 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008998 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008999 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009002fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009003rm -f core conftest.err conftest.$ac_objext \
9004 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009005 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008done
Victor Stinnere0be4232011-10-25 13:06:09 +02009009if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011else
9012 ac_cv_search_sem_init=no
9013fi
9014rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009015LIBS=$ac_func_search_save_LIBS
9016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9018$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009019ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009020if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009022
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009023fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009024 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009025 # posix4 on Solaris 2.6
9026 # pthread (first!) on Linux
9027fi
9028
Martin v. Löwis19d17342003-06-14 21:03:05 +00009029# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9031$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009032if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009034else
9035 ac_check_lib_save_LIBS=$LIBS
9036LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040/* Override any GCC internal prototype to avoid an error.
9041 Use char because int might match the return type of a GCC
9042 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043#ifdef __cplusplus
9044extern "C"
9045#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009046char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009047int
9048main ()
9049{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009050return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009051 ;
9052 return 0;
9053}
9054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009055if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009056 ac_cv_lib_intl_textdomain=yes
9057else
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009060rm -f core conftest.err conftest.$ac_objext \
9061 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009062LIBS=$ac_check_lib_save_LIBS
9063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9065$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009066if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009069
Brett Cannonc6d936e2009-06-07 20:09:53 +00009070 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009071fi
9072
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009073
9074# checks for system dependent C++ extensions support
9075case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9077$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009079/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009080
Georg Brandl59e87bd2011-02-15 19:48:59 +00009081 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009082int
9083main ()
9084{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009085loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 ;
9087 return 0;
9088}
Matthias Kloseb159a552010-04-25 21:00:44 +00009089
Martin v. Löwis11437992002-04-12 09:54:03 +00009090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009091if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009092
Matthias Kloseb159a552010-04-25 21:00:44 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009095
Matthias Kloseb159a552010-04-25 21:00:44 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009097$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009098
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009099else
Matthias Kloseb159a552010-04-25 21:00:44 +00009100
9101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009103
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105rm -f core conftest.err conftest.$ac_objext \
9106 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009107 *) ;;
9108esac
9109
Christian Heimes985ecdc2013-11-20 11:46:18 +01009110# check for systems that require aligned memory access
9111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9112$as_echo_n "checking aligned memory access is required... " >&6; }
9113if test "$cross_compiling" = yes; then :
9114 aligned_required=yes
9115else
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
9118
9119int main()
9120{
9121 char s[16];
9122 int i, *p1, *p2;
9123 for (i=0; i < 16; i++)
9124 s[i] = i;
9125 p1 = (int*)(s+1);
9126 p2 = (int*)(s+2);
9127 if (*p1 == *p2)
9128 return 1;
9129 return 0;
9130}
9131
9132_ACEOF
9133if ac_fn_c_try_run "$LINENO"; then :
9134 aligned_required=no
9135else
9136 aligned_required=yes
9137fi
9138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9139 conftest.$ac_objext conftest.beam conftest.$ac_ext
9140fi
9141
9142
9143if test "$aligned_required" = yes ; then
9144
9145$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9146
9147fi
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9149$as_echo "$aligned_required" >&6; }
9150
9151
9152# str, bytes and memoryview hash algorithm
9153
9154
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9156$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9157
9158# Check whether --with-hash_algorithm was given.
9159if test "${with_hash_algorithm+set}" = set; then :
9160 withval=$with_hash_algorithm;
9161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9162$as_echo "$withval" >&6; }
9163case "$withval" in
9164 siphash24)
9165 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9166
9167 ;;
9168 fnv)
9169 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9170
9171 ;;
9172 *)
9173 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9174 ;;
9175esac
9176
9177else
9178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9179$as_echo "default" >&6; }
9180fi
9181
9182
Guido van Rossum70c7f481998-03-26 18:44:10 +00009183# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9185$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009186if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009188else
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009190LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009194/* Override any GCC internal prototype to avoid an error.
9195 Use char because int might match the return type of a GCC
9196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197#ifdef __cplusplus
9198extern "C"
9199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009200char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009201int
9202main ()
9203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009204return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ;
9206 return 0;
9207}
9208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009211else
Matthias Kloseb9621712010-04-24 17:59:49 +00009212 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009214rm -f core conftest.err conftest.$ac_objext \
9215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009216LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9219$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009220if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009221 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009222fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009223 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9225$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009226if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009227 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009228else
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009230LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234/* Override any GCC internal prototype to avoid an error.
9235 Use char because int might match the return type of a GCC
9236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009237#ifdef __cplusplus
9238extern "C"
9239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009240char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
9243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009244return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009245 ;
9246 return 0;
9247}
9248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009249if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254rm -f core conftest.err conftest.$ac_objext \
9255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009256LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9259$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009260if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009261 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009262fi
9263 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9266$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009269if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9272$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009273LIBS="$withval $LIBS"
9274
9275else
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9277$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278fi
9279
Guido van Rossum7f43da71994-08-01 12:15:30 +00009280
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009281
9282
9283
9284
9285
9286
9287
9288if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9289 if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009290 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9291set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9293$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009294if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009296else
9297 case $PKG_CONFIG in
9298 [\\/]* | ?:[\\/]*)
9299 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9300 ;;
9301 *)
9302 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9303for as_dir in $PATH
9304do
9305 IFS=$as_save_IFS
9306 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009308 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009309 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009310 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009311 break 2
9312 fi
9313done
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009315IFS=$as_save_IFS
9316
9317 ;;
9318esac
9319fi
9320PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9321if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9323$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009324else
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9326$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009327fi
9328
9329
9330fi
9331if test -z "$ac_cv_path_PKG_CONFIG"; then
9332 ac_pt_PKG_CONFIG=$PKG_CONFIG
9333 # Extract the first word of "pkg-config", so it can be a program name with args.
9334set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9336$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009337if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009338 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009339else
9340 case $ac_pt_PKG_CONFIG in
9341 [\\/]* | ?:[\\/]*)
9342 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9343 ;;
9344 *)
9345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9346for as_dir in $PATH
9347do
9348 IFS=$as_save_IFS
9349 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009350 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009352 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009354 break 2
9355 fi
9356done
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009358IFS=$as_save_IFS
9359
9360 ;;
9361esac
9362fi
9363ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9364if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9366$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009367else
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9369$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009370fi
9371
9372 if test "x$ac_pt_PKG_CONFIG" = x; then
9373 PKG_CONFIG=""
9374 else
9375 case $cross_compiling:$ac_tool_warned in
9376yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9378$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009379ac_tool_warned=yes ;;
9380esac
9381 PKG_CONFIG=$ac_pt_PKG_CONFIG
9382 fi
9383else
9384 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9385fi
9386
Benjamin Peterson0f3cde12014-12-15 00:00:23 -05009387fi
9388if test -n "$PKG_CONFIG"; then
9389 _pkg_min_version=0.9.0
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9391$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9392 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9394$as_echo "yes" >&6; }
9395 else
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9397$as_echo "no" >&6; }
9398 PKG_CONFIG=""
9399 fi
9400fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009401
9402# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9404$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009405
9406# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009407if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009408 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009409else
9410 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009411fi
9412
9413
Matthias Kloseb9621712010-04-24 17:59:49 +00009414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9415$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009416
9417# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9419$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009420
9421# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009422if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009423 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009424else
9425 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009426fi
9427
9428
9429if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009430 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9431else
9432 LIBFFI_INCLUDEDIR=""
9433fi
9434
9435
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9437$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009438
Stefan Krah60187b52012-03-23 19:06:27 +01009439# Check for use of the system libmpdec library
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9441$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9442
9443# Check whether --with-system_libmpdec was given.
9444if test "${with_system_libmpdec+set}" = set; then :
9445 withval=$with_system_libmpdec;
9446else
9447 with_system_libmpdec="no"
9448fi
9449
9450
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9452$as_echo "$with_system_libmpdec" >&6; }
9453
Benjamin Peterson076ed002010-10-31 17:11:02 +00009454# Check for support for loadable sqlite extensions
9455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9456$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9457# Check whether --enable-loadable-sqlite-extensions was given.
9458if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9459 enableval=$enable_loadable_sqlite_extensions;
9460else
9461 enable_loadable_sqlite_extensions="no"
9462fi
9463
9464
9465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9466$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9467
Ned Deilyd819b932013-09-06 01:07:05 -07009468# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9469
9470
9471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9472$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9473
9474# Check whether --with-tcltk-includes was given.
9475if test "${with_tcltk_includes+set}" = set; then :
9476 withval=$with_tcltk_includes;
9477else
9478 with_tcltk_includes="default"
9479fi
9480
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9482$as_echo "$with_tcltk_includes" >&6; }
9483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9484$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9485
9486# Check whether --with-tcltk-libs was given.
9487if test "${with_tcltk_libs+set}" = set; then :
9488 withval=$with_tcltk_libs;
9489else
9490 with_tcltk_libs="default"
9491fi
9492
9493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9494$as_echo "$with_tcltk_libs" >&6; }
9495if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9496then
9497 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9498 then
9499 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9500 fi
9501 TCLTK_INCLUDES=""
9502 TCLTK_LIBS=""
9503else
9504 TCLTK_INCLUDES="$with_tcltk_includes"
9505 TCLTK_LIBS="$with_tcltk_libs"
9506fi
9507
Matthias Klose55708cc2009-04-30 08:06:49 +00009508# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9510$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009511
9512# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009513if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009514 withval=$with_dbmliborder;
9515if test x$with_dbmliborder = xyes
9516then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009517as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009518else
9519 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9520 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9521 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009522 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009523 fi
9524 done
9525fi
9526fi
9527
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9529$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009530
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009531# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009532
9533
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9535$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539 withval=$with_signal_module;
9540fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009541
9542
9543if test -z "$with_signal_module"
9544then with_signal_module="yes"
9545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9547$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009548
9549if test "${with_signal_module}" = "yes"; then
9550 USE_SIGNAL_MODULE=""
9551 SIGNAL_OBJS=""
9552else
9553 USE_SIGNAL_MODULE="#"
9554 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9555fi
9556
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009557# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009558
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009559USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
9563# Templates for things AC_DEFINEd more than once.
9564# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009565
9566
Martin v. Löwis11437992002-04-12 09:54:03 +00009567
Matthias Kloseb9621712010-04-24 17:59:49 +00009568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9569$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009572if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009573 withval=$with_threads;
9574fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009575
9576
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009577# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009579# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009580if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581 withval=$with_thread; with_threads=$with_thread
9582fi
9583
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009584
9585if test -z "$with_threads"
9586then with_threads="yes"
9587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9589$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009590
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009591
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009592if test "$with_threads" = "no"
9593then
9594 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009595elif test "$ac_cv_pthread_is_default" = yes
9596then
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009598
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009599 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009601
9602 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009604elif test "$ac_cv_kpthread" = "yes"
9605then
9606 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009607 if test "$ac_cv_cxx_thread" = "yes"; then
9608 CXX="$CXX -Kpthread"
9609 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009611
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009612 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009613 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009614elif test "$ac_cv_kthread" = "yes"
9615then
9616 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009617 if test "$ac_cv_cxx_thread" = "yes"; then
9618 CXX="$CXX -Kthread"
9619 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009621
9622 posix_threads=yes
9623 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009624elif test "$ac_cv_pthread" = "yes"
9625then
9626 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009627 if test "$ac_cv_cxx_thread" = "yes"; then
9628 CXX="$CXX -pthread"
9629 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009631
9632 posix_threads=yes
9633 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009634else
9635 if test ! -z "$with_threads" -a -d "$with_threads"
9636 then LDFLAGS="$LDFLAGS -L$with_threads"
9637 fi
9638 if test ! -z "$withval" -a -d "$withval"
9639 then LDFLAGS="$LDFLAGS -L$withval"
9640 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009641
9642 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009643 # define _POSIX_THREADS in unistd.h. Some apparently don't
9644 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9646$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009648/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009650#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009651#ifdef _POSIX_THREADS
9652yes
9653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009654
9655_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009658 unistd_defines_pthreads=yes
9659else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009660 unistd_defines_pthreads=no
9661fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009662rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009663
Matthias Kloseb9621712010-04-24 17:59:49 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9665$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009666
Matthias Kloseb9621712010-04-24 17:59:49 +00009667 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009668
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009669 # Just looking for pthread_create in libpthread is not enough:
9670 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9671 # So we really have to include pthread.h, and then link.
9672 _libs=$LIBS
9673 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9675$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009678
9679#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009680#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009681
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009682void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009686
9687pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ;
9689 return 0;
9690}
9691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9695$as_echo "yes" >&6; }
9696 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009697
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009698 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009699 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009700else
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009702 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009704if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009706
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009707 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009708 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009709else
Guido van Rossumad678af1998-10-02 14:42:15 +00009710
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9712$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009713if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715else
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009717LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721/* Override any GCC internal prototype to avoid an error.
9722 Use char because int might match the return type of a GCC
9723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724#ifdef __cplusplus
9725extern "C"
9726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009727char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728int
9729main ()
9730{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009731return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009738else
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009741rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9746$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009747if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009750 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009751 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009752 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009753else
Greg Steinadf63d62000-07-05 10:38:09 +00009754
Matthias Kloseb9621712010-04-24 17:59:49 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9756$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009757if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009759else
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009761LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765/* Override any GCC internal prototype to avoid an error.
9766 Use char because int might match the return type of a GCC
9767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009768#ifdef __cplusplus
9769extern "C"
9770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009771char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009775return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ;
9777 return 0;
9778}
9779_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009782else
Matthias Kloseb9621712010-04-24 17:59:49 +00009783 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009785rm -f core conftest.err conftest.$ac_objext \
9786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9790$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009791if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009793
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009794 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009795 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009796 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009797else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9800$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009801if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009805LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009809/* Override any GCC internal prototype to avoid an error.
9810 Use char because int might match the return type of a GCC
9811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef __cplusplus
9813extern "C"
9814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009815char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ;
9821 return 0;
9822}
9823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829rm -f core conftest.err conftest.$ac_objext \
9830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9834$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009835if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009837
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009838 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009839 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009840 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009841else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009842
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9844$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009845if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009846 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009849LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853/* Override any GCC internal prototype to avoid an error.
9854 Use char because int might match the return type of a GCC
9855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856#ifdef __cplusplus
9857extern "C"
9858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009859char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009868if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009870else
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009872fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009873rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009875LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9878$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009879if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009881
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009882 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009883 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009884 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009885else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009886
Martin v. Löwis130fb172001-07-19 11:00:41 +00009887 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009888fi
9889
Guido van Rossum627b2d71993-12-24 10:39:16 +00009890
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009891fi
9892
Guido van Rossum0be3e491997-05-22 20:33:33 +00009893fi
9894
Guido van Rossum49545951997-12-02 19:28:29 +00009895fi
9896
Guido van Rossumb93a8621998-05-07 13:27:32 +00009897fi
9898
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009900rm -f core conftest.err conftest.$ac_objext \
9901 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009902
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9904$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009907else
Martin v. Löwis11437992002-04-12 09:54:03 +00009908 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009909LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913/* Override any GCC internal prototype to avoid an error.
9914 Use char because int might match the return type of a GCC
9915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009916#ifdef __cplusplus
9917extern "C"
9918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009919char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009920int
9921main ()
9922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 ;
9925 return 0;
9926}
9927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009929 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009930else
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933rm -f core conftest.err conftest.$ac_objext \
9934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009935LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9938$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009939if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009940 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009941
Martin v. Löwis130fb172001-07-19 11:00:41 +00009942 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009943 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009944 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009945fi
9946
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009947
Neal Norwitza978ab02002-11-02 16:58:05 +00009948 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9950$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009951if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009953else
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009955LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959/* Override any GCC internal prototype to avoid an error.
9960 Use char because int might match the return type of a GCC
9961 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009962#ifdef __cplusplus
9963extern "C"
9964#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009965char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009966int
9967main ()
9968{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009969return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009970 ;
9971 return 0;
9972}
9973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009974if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009976else
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009979rm -f core conftest.err conftest.$ac_objext \
9980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009981LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9984$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009985if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009987
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009988 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009989 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009990 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009991fi
9992
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009993 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009994fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009995
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009996if test "$posix_threads" = "yes"; then
9997 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010000
10001 fi
10002
10003 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10004 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010005 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010006$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008 ;;
10009 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010010$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010011
10012 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010013 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010014$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010015
10016 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017 esac
10018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10020$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010021 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010022 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023else
Matthias Kloseb9621712010-04-24 17:59:49 +000010024 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025 ac_cv_pthread_system_supported=no
10026else
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010028/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010029
10030 #include <stdio.h>
10031 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010032 void *foo(void *parm) {
10033 return NULL;
10034 }
10035 main() {
10036 pthread_attr_t attr;
10037 pthread_t id;
10038 if (pthread_attr_init(&attr)) exit(-1);
10039 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10040 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10041 exit(0);
10042 }
10043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010045 ac_cv_pthread_system_supported=yes
10046else
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10050 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010051fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053
Guido van Rossum627b2d71993-12-24 10:39:16 +000010054fi
10055
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10057$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010058 if test "$ac_cv_pthread_system_supported" = "yes"; then
10059
Matthias Kloseb9621712010-04-24 17:59:49 +000010060$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010061
10062 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010063 for ac_func in pthread_sigmask
10064do :
10065 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010066if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010067 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010069_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010070 case $ac_sys_system in
10071 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010072
Matthias Kloseb9621712010-04-24 17:59:49 +000010073$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010074
10075 ;;
10076 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010077fi
10078done
10079
Christian Heimesf77b4b22013-08-21 13:26:05 +020010080 for ac_func in pthread_atfork
10081do :
10082 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10083if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10084 cat >>confdefs.h <<_ACEOF
10085#define HAVE_PTHREAD_ATFORK 1
10086_ACEOF
10087
10088fi
10089done
10090
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010091fi
10092
10093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10097$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010099if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104 ipv6=no
10105 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10107$as_echo "yes" >&6; }
10108 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109
10110 ipv6=yes
10111 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010112 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113else
Martin v. Löwis11437992002-04-12 09:54:03 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010116/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117 /* AF_INET6 available check */
10118#include <sys/types.h>
10119#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010120int
10121main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010123int domain = AF_INET6;
10124 ;
10125 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126}
Martin v. Löwis11437992002-04-12 09:54:03 +000010127_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010128if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10131$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134else
Matthias Kloseb159a552010-04-25 21:00:44 +000010135
Matthias Kloseb9621712010-04-24 17:59:49 +000010136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010139
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010140fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010143if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10145$as_echo_n "checking if RFC2553 API is available... " >&6; }
10146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010148
10149 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010150#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010154struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010155 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ;
10157 return 0;
10158}
Matthias Kloseb159a552010-04-25 21:00:44 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010161if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010162
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010164$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010165 ipv6=yes
10166
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010167else
Matthias Kloseb159a552010-04-25 21:00:44 +000010168
10169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010170$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010171 ipv6=no
10172
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010175fi
10176
10177if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010179
10180fi
10181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182fi
10183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010184
10185ipv6type=unknown
10186ipv6lib=none
10187ipv6trylibc=no
10188
10189if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10191$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010192 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10193 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194 case $i in
10195 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010197/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010198
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199#include <netinet/in.h>
10200#ifdef IPV6_INRIA_VERSION
10201yes
10202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010203_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010205 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010206 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010208rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209
10210 ;;
10211 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010213/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010214
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215#include <netinet/in.h>
10216#ifdef __KAME__
10217yes
10218#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010219_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222 ipv6type=$i;
10223 ipv6lib=inet6
10224 ipv6libdir=/usr/local/v6/lib
10225 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010226fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010227rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228
10229 ;;
10230 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010232/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010233
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234#include <features.h>
10235#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10236yes
10237#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010238_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010241 ipv6type=$i;
10242 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010243fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010244rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245
10246 ;;
10247 linux-inet6)
10248 if test -d /usr/inet6; then
10249 ipv6type=$i
10250 ipv6lib=inet6
10251 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010252 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253 fi
10254 ;;
10255 solaris)
10256 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010257 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010258 ipv6type=$i
10259 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010260 fi
10261 fi
10262 ;;
10263 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010266
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267#include <sys/param.h>
10268#ifdef _TOSHIBA_INET6
10269yes
10270#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010271_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274 ipv6type=$i;
10275 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010276 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010277fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010278rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279
10280 ;;
10281 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010283/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010284
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285#include </usr/local/v6/include/sys/v6config.h>
10286#ifdef __V6D__
10287yes
10288#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010289_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010291 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010292 ipv6type=$i;
10293 ipv6lib=v6;
10294 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010295 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010296fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010297rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298
10299 ;;
10300 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010302/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010303
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304#include <sys/param.h>
10305#ifdef _ZETA_MINAMI_INET6
10306yes
10307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010308_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010310 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010311 ipv6type=$i;
10312 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010313 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010314fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010315rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010316
10317 ;;
10318 esac
10319 if test "$ipv6type" != "unknown"; then
10320 break
10321 fi
10322 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10324$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010325fi
10326
10327if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10328 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10329 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10330 echo "using lib$ipv6lib"
10331 else
10332 if test $ipv6trylibc = "yes"; then
10333 echo "using libc"
10334 else
10335 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10336 echo "You need to fetch lib$ipv6lib.a from appropriate"
10337 echo 'ipv6 kit and compile beforehand.'
10338 exit 1
10339 fi
10340 fi
10341fi
10342
Matthias Kloseb9621712010-04-24 17:59:49 +000010343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10344$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010346/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010347
10348 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010349int
10350main ()
10351{
10352FSIORefNum fRef = 0
10353 ;
10354 return 0;
10355}
Matthias Kloseb159a552010-04-25 21:00:44 +000010356
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010359
Matthias Kloseb159a552010-04-25 21:00:44 +000010360
Matthias Kloseb9621712010-04-24 17:59:49 +000010361$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010362
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10364$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010365
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010366else
Matthias Kloseb159a552010-04-25 21:00:44 +000010367
Matthias Kloseb9621712010-04-24 17:59:49 +000010368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010370
10371fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10373
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010374# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10376$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010378# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010379if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380 withval=$with_doc_strings;
10381fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010382
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010383
10384if test -z "$with_doc_strings"
10385then with_doc_strings="yes"
10386fi
10387if test "$with_doc_strings" != "no"
10388then
10389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010391
10392fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10394$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010395
Antoine Pitrou042b1282010-08-13 21:15:58 +000010396# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10398$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010402 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010403if test "$withval" != no
10404then
10405
Matthias Kloseb9621712010-04-24 17:59:49 +000010406$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010407
Matthias Kloseb9621712010-04-24 17:59:49 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10409$as_echo "yes" >&6; }
10410else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10411$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010412fi
10413else
Matthias Kloseb9621712010-04-24 17:59:49 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10415$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416fi
10417
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010418
10419# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10421$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010423# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010424if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425 withval=$with_pymalloc;
10426fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010427
Neil Schemenauera35c6882001-02-27 04:45:05 +000010428
Neil Schemenauer16c22972002-03-22 15:34:49 +000010429if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010430then
10431 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010432fi
10433if test "$with_pymalloc" != "no"
10434then
Martin v. Löwis11437992002-04-12 09:54:03 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010437
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010438 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10441$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010442
Benjamin Peterson05159c42009-12-03 03:01:27 +000010443# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10445$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010446
10447# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010449 withval=$with_valgrind;
10450else
10451 with_valgrind=no
10452fi
10453
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10455$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010456if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 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 +020010458if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010459
Matthias Kloseb9621712010-04-24 17:59:49 +000010460$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010461
10462else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010463 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010464
10465fi
10466
10467
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010468 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010469fi
10470
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010471# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010472
Guido van Rossum98935bf2001-09-05 19:13:16 +000010473DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010474
Guido van Rossume97ee181999-12-20 21:27:22 +000010475# the dlopen() function means we might want to use dynload_shlib.o. some
10476# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010477for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010478do :
10479 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010480if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010482#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010483_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010484
Guido van Rossume97ee181999-12-20 21:27:22 +000010485fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010486done
Guido van Rossume97ee181999-12-20 21:27:22 +000010487
Michael W. Hudson54241132001-12-07 15:38:26 +000010488
Guido van Rossume97ee181999-12-20 21:27:22 +000010489# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10490# loading of modules.
10491
Matthias Kloseb9621712010-04-24 17:59:49 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10493$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010494if test -z "$DYNLOADFILE"
10495then
10496 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010497 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10498 if test "$ac_cv_func_dlopen" = yes
10499 then DYNLOADFILE="dynload_shlib.o"
10500 else DYNLOADFILE="dynload_aix.o"
10501 fi
10502 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010503 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010504 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10505 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010506 *)
10507 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10508 # out any dynamic loading
10509 if test "$ac_cv_func_dlopen" = yes
10510 then DYNLOADFILE="dynload_shlib.o"
10511 else DYNLOADFILE="dynload_stub.o"
10512 fi
10513 ;;
10514 esac
10515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10517$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010518if test "$DYNLOADFILE" != "dynload_stub.o"
10519then
Martin v. Löwis11437992002-04-12 09:54:03 +000010520
Matthias Kloseb9621712010-04-24 17:59:49 +000010521$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010522
10523fi
10524
Neil Schemenauer4e425612001-06-19 15:44:15 +000010525# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10526
Michael W. Hudson54241132001-12-07 15:38:26 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10529$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010530if test -z "$MACHDEP_OBJS"
10531then
Jack Jansene578a632001-08-15 01:27:14 +000010532 MACHDEP_OBJS=$extra_machdep_objs
10533else
10534 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010535fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010536if test -z "$MACHDEP_OBJS"; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10538$as_echo "none" >&6; }
10539else
10540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10541$as_echo "$MACHDEP_OBJS" >&6; }
10542fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010543
Guido van Rossum627b2d71993-12-24 10:39:16 +000010544# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010545for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010546 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010547 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinnerfe02e392014-12-21 01:16:38 +010010548 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010549 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010550 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010551 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010552 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10553 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010554 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010555 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010556 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010557 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010558 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010559 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010560 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10561 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010562 sigaction sigaltstack siginterrupt sigpending sigrelse \
10563 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010564 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010565 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010566 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010567do :
10568 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10569ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010570if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010571 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010573_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010574
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010575fi
10576done
10577
Michael W. Hudson54241132001-12-07 15:38:26 +000010578
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010579ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10580 #include <dirent.h>
10581"
10582if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10583
10584$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10585
10586fi
10587
10588
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010589# For some functions, having a definition is not sufficient, since
10590# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10592$as_echo_n "checking for chroot... " >&6; }
10593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010594/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010595#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010596int
10597main ()
10598{
10599void *x=chroot
10600 ;
10601 return 0;
10602}
10603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010607
Matthias Kloseb159a552010-04-25 21:00:44 +000010608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010609$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010610else
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613
10614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10617$as_echo_n "checking for link... " >&6; }
10618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010620#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010621int
10622main ()
10623{
10624void *x=link
10625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010632
Matthias Kloseb159a552010-04-25 21:00:44 +000010633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010635else
Matthias Kloseb9621712010-04-24 17:59:49 +000010636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10637$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010638
10639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10642$as_echo_n "checking for symlink... " >&6; }
10643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010645#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010646int
10647main ()
10648{
10649void *x=symlink
10650 ;
10651 return 0;
10652}
10653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010654if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010657
Matthias Kloseb159a552010-04-25 21:00:44 +000010658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010659$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10662$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010663
10664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10667$as_echo_n "checking for fchdir... " >&6; }
10668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010670#include <unistd.h>
10671int
10672main ()
10673{
10674void *x=fchdir
10675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010682
Matthias Kloseb159a552010-04-25 21:00:44 +000010683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010684$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010685else
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10687$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010688
10689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10692$as_echo_n "checking for fsync... " >&6; }
10693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010695#include <unistd.h>
10696int
10697main ()
10698{
10699void *x=fsync
10700 ;
10701 return 0;
10702}
10703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705
Matthias Kloseb9621712010-04-24 17:59:49 +000010706$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010707
Matthias Kloseb159a552010-04-25 21:00:44 +000010708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010709$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010710else
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010713
10714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10717$as_echo_n "checking for fdatasync... " >&6; }
10718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010719/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010720#include <unistd.h>
10721int
10722main ()
10723{
10724void *x=fdatasync
10725 ;
10726 return 0;
10727}
10728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010729if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010730
Matthias Kloseb9621712010-04-24 17:59:49 +000010731$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010732
Matthias Kloseb159a552010-04-25 21:00:44 +000010733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010734$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010735else
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010738
10739fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10742$as_echo_n "checking for epoll... " >&6; }
10743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010744/* end confdefs.h. */
10745#include <sys/epoll.h>
10746int
10747main ()
10748{
10749void *x=epoll_create
10750 ;
10751 return 0;
10752}
10753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010754if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010755
Matthias Kloseb9621712010-04-24 17:59:49 +000010756$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010757
Matthias Kloseb159a552010-04-25 21:00:44 +000010758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010759$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010760else
Matthias Kloseb9621712010-04-24 17:59:49 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10762$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010763
10764fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10767$as_echo_n "checking for epoll_create1... " >&6; }
10768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10769/* end confdefs.h. */
10770#include <sys/epoll.h>
10771int
10772main ()
10773{
10774void *x=epoll_create1
10775 ;
10776 return 0;
10777}
10778_ACEOF
10779if ac_fn_c_try_compile "$LINENO"; then :
10780
10781$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10782
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10784$as_echo "yes" >&6; }
10785else
10786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10787$as_echo "no" >&6; }
10788
10789fi
10790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10792$as_echo_n "checking for kqueue... " >&6; }
10793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010794/* end confdefs.h. */
10795
10796#include <sys/types.h>
10797#include <sys/event.h>
10798
10799int
10800main ()
10801{
10802int x=kqueue()
10803 ;
10804 return 0;
10805}
10806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010807if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010808
Matthias Kloseb9621712010-04-24 17:59:49 +000010809$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010810
Matthias Kloseb159a552010-04-25 21:00:44 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010813else
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010816
10817fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020010819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
10820$as_echo_n "checking for prlimit... " >&6; }
10821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10822/* end confdefs.h. */
10823
10824#include <sys/time.h>
10825#include <sys/resource.h>
10826
10827int
10828main ()
10829{
10830void *x=prlimit
10831 ;
10832 return 0;
10833}
10834_ACEOF
10835if ac_fn_c_try_compile "$LINENO"; then :
10836
10837$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
10838
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10840$as_echo "yes" >&6; }
10841else
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
10844
10845fi
10846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10847
Martin v. Löwisd5843682002-11-21 20:41:28 +000010848# On some systems (eg. FreeBSD 5), we would find a definition of the
10849# functions ctermid_r, setgroups in the library, but no prototype
10850# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10851# address to avoid compiler warnings and potential miscompilations
10852# because of the missing prototypes.
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10855$as_echo_n "checking for ctermid_r... " >&6; }
10856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010858
Martin v. Löwisd5843682002-11-21 20:41:28 +000010859#include <stdio.h>
10860
Martin v. Löwisd5843682002-11-21 20:41:28 +000010861int
10862main ()
10863{
10864void* p = ctermid_r
10865 ;
10866 return 0;
10867}
10868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010869if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010872
Matthias Kloseb159a552010-04-25 21:00:44 +000010873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10877$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010878
10879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10881
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10883$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010884if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010885 $as_echo_n "(cached) " >&6
10886else
10887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010888/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010889#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010890int
10891main ()
10892{
10893void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010894
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010895 ;
10896 return 0;
10897}
10898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010899if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010900 ac_cv_flock_decl=yes
10901else
10902 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010903
10904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010906
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010907fi
10908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10909$as_echo "$ac_cv_flock_decl" >&6; }
10910if test "x${ac_cv_flock_decl}" = xyes; then
10911 for ac_func in flock
10912do :
10913 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010914if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010915 cat >>confdefs.h <<_ACEOF
10916#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010917_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010918
Antoine Pitroua3000072010-09-07 14:52:42 +000010919else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010921$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010922if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010923 $as_echo_n "(cached) " >&6
10924else
10925 ac_check_lib_save_LIBS=$LIBS
10926LIBS="-lbsd $LIBS"
10927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10928/* end confdefs.h. */
10929
10930/* Override any GCC internal prototype to avoid an error.
10931 Use char because int might match the return type of a GCC
10932 builtin and then its argument prototype would still apply. */
10933#ifdef __cplusplus
10934extern "C"
10935#endif
10936char flock ();
10937int
10938main ()
10939{
10940return flock ();
10941 ;
10942 return 0;
10943}
10944_ACEOF
10945if ac_fn_c_try_link "$LINENO"; then :
10946 ac_cv_lib_bsd_flock=yes
10947else
10948 ac_cv_lib_bsd_flock=no
10949fi
10950rm -f core conftest.err conftest.$ac_objext \
10951 conftest$ac_exeext conftest.$ac_ext
10952LIBS=$ac_check_lib_save_LIBS
10953fi
10954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10955$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010956if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010957 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010958
10959
10960$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10961
10962
10963fi
10964
10965
10966fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010967done
10968
Antoine Pitroua3000072010-09-07 14:52:42 +000010969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10972$as_echo_n "checking for getpagesize... " >&6; }
10973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010975
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010976#include <unistd.h>
10977
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010978int
10979main ()
10980{
10981void* p = getpagesize
10982 ;
10983 return 0;
10984}
10985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010989
Matthias Kloseb159a552010-04-25 21:00:44 +000010990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010992else
Matthias Kloseb9621712010-04-24 17:59:49 +000010993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10994$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010995
10996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010998
Victor Stinner984890f2011-11-24 13:53:38 +010010999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11000$as_echo_n "checking for broken unsetenv... " >&6; }
11001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11002/* end confdefs.h. */
11003
11004#include <stdlib.h>
11005
11006int
11007main ()
11008{
11009int res = unsetenv("DUMMY")
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014if ac_fn_c_try_compile "$LINENO"; then :
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11016$as_echo "no" >&6; }
11017else
11018
11019$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11020
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11022$as_echo "yes" >&6; }
11023
11024fi
11025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11026
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011027for ac_prog in true
11028do
11029 # Extract the first word of "$ac_prog", so it can be a program name with args.
11030set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11032$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011033if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011035else
11036 if test -n "$TRUE"; then
11037 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11038else
11039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11040for as_dir in $PATH
11041do
11042 IFS=$as_save_IFS
11043 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011044 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011046 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 $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 +000011048 break 2
11049 fi
11050done
Matthias Kloseb9621712010-04-24 17:59:49 +000011051 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011053
11054fi
11055fi
11056TRUE=$ac_cv_prog_TRUE
11057if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11059$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011060else
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11062$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011063fi
11064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011065
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011066 test -n "$TRUE" && break
11067done
11068test -n "$TRUE" || TRUE="/bin/true"
11069
11070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11072$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011073if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011075else
11076 ac_check_lib_save_LIBS=$LIBS
11077LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011079/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011081/* Override any GCC internal prototype to avoid an error.
11082 Use char because int might match the return type of a GCC
11083 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084#ifdef __cplusplus
11085extern "C"
11086#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011087char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088int
11089main ()
11090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011092 ;
11093 return 0;
11094}
11095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011097 ac_cv_lib_c_inet_aton=yes
11098else
Matthias Kloseb9621712010-04-24 17:59:49 +000011099 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011101rm -f core conftest.err conftest.$ac_objext \
11102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011103LIBS=$ac_check_lib_save_LIBS
11104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11106$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011107if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011108 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011109else
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11111$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011114else
11115 ac_check_lib_save_LIBS=$LIBS
11116LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011120/* Override any GCC internal prototype to avoid an error.
11121 Use char because int might match the return type of a GCC
11122 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011123#ifdef __cplusplus
11124extern "C"
11125#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011126char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011127int
11128main ()
11129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011131 ;
11132 return 0;
11133}
11134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011135if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011136 ac_cv_lib_resolv_inet_aton=yes
11137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011140rm -f core conftest.err conftest.$ac_objext \
11141 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011142LIBS=$ac_check_lib_save_LIBS
11143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11145$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011146if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011147 cat >>confdefs.h <<_ACEOF
11148#define HAVE_LIBRESOLV 1
11149_ACEOF
11150
11151 LIBS="-lresolv $LIBS"
11152
11153fi
11154
11155
11156fi
11157
11158
Christian Heimesd0764e22007-12-04 15:00:33 +000011159# On Tru64, chflags seems to be present, but calling it will
11160# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11162$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011163if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011164 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011165else
Matthias Kloseb9621712010-04-24 17:59:49 +000011166 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011167 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011168else
Matthias Kloseb9621712010-04-24 17:59:49 +000011169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011170/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011171
Christian Heimesd0764e22007-12-04 15:00:33 +000011172#include <sys/stat.h>
11173#include <unistd.h>
11174int main(int argc, char*argv[])
11175{
11176 if(chflags(argv[0], 0) != 0)
11177 return 1;
11178 return 0;
11179}
Ned Deily3eb67d52011-06-28 00:00:28 -070011180
Christian Heimesd0764e22007-12-04 15:00:33 +000011181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011182if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011183 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011184else
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011189fi
11190
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011191
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11194$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011195if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011196 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011197if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011198 ac_cv_have_chflags="yes"
11199else
11200 ac_cv_have_chflags="no"
11201fi
11202
11203fi
11204if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011205
Matthias Kloseb9621712010-04-24 17:59:49 +000011206$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011207
11208fi
11209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11211$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011212if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011213 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011214else
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011216 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011217else
Matthias Kloseb9621712010-04-24 17:59:49 +000011218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011219/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011220
Christian Heimesd0764e22007-12-04 15:00:33 +000011221#include <sys/stat.h>
11222#include <unistd.h>
11223int main(int argc, char*argv[])
11224{
11225 if(lchflags(argv[0], 0) != 0)
11226 return 1;
11227 return 0;
11228}
Ned Deily3eb67d52011-06-28 00:00:28 -070011229
Christian Heimesd0764e22007-12-04 15:00:33 +000011230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011232 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011233else
Matthias Kloseb9621712010-04-24 17:59:49 +000011234 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011236rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11237 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011238fi
11239
11240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11243$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011244if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011245 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011246if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011247 ac_cv_have_lchflags="yes"
11248else
11249 ac_cv_have_lchflags="no"
11250fi
11251
11252fi
11253if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011256
11257fi
11258
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011259case $ac_sys_system/$ac_sys_release in
11260Darwin/*)
11261 _CUR_CFLAGS="${CFLAGS}"
11262 _CUR_LDFLAGS="${LDFLAGS}"
11263 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11264 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11265 ;;
11266esac
11267
Matthias Kloseb9621712010-04-24 17:59:49 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11269$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011270if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011271 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011272else
11273 ac_check_lib_save_LIBS=$LIBS
11274LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011276/* end confdefs.h. */
11277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011278/* Override any GCC internal prototype to avoid an error.
11279 Use char because int might match the return type of a GCC
11280 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011281#ifdef __cplusplus
11282extern "C"
11283#endif
11284char inflateCopy ();
11285int
11286main ()
11287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011288return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011289 ;
11290 return 0;
11291}
11292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011293if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011294 ac_cv_lib_z_inflateCopy=yes
11295else
Matthias Kloseb9621712010-04-24 17:59:49 +000011296 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011297fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011298rm -f core conftest.err conftest.$ac_objext \
11299 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011300LIBS=$ac_check_lib_save_LIBS
11301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11303$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011304if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011305
Matthias Kloseb9621712010-04-24 17:59:49 +000011306$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011307
11308fi
11309
11310
11311case $ac_sys_system/$ac_sys_release in
11312Darwin/*)
11313 CFLAGS="${_CUR_CFLAGS}"
11314 LDFLAGS="${_CUR_LDFLAGS}"
11315 ;;
11316esac
11317
Matthias Kloseb9621712010-04-24 17:59:49 +000011318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11319$as_echo_n "checking for hstrerror... " >&6; }
11320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011321/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011322
Martin v. Löwise9416172003-05-03 10:12:45 +000011323#include <netdb.h>
11324
Martin v. Löwise9416172003-05-03 10:12:45 +000011325int
11326main ()
11327{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011328void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011342
11343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011344rm -f core conftest.err conftest.$ac_objext \
11345 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346
Matthias Kloseb9621712010-04-24 17:59:49 +000011347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11348$as_echo_n "checking for inet_aton... " >&6; }
11349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011350/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011351
Martin v. Löwis86d66262006-02-17 08:40:11 +000011352#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011353#include <sys/socket.h>
11354#include <netinet/in.h>
11355#include <arpa/inet.h>
11356
Martin v. Löwise9416172003-05-03 10:12:45 +000011357int
11358main ()
11359{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011360void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011361 ;
11362 return 0;
11363}
11364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011366
Matthias Kloseb9621712010-04-24 17:59:49 +000011367$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011368
Matthias Kloseb159a552010-04-25 21:00:44 +000011369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011371else
Matthias Kloseb9621712010-04-24 17:59:49 +000011372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11373$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011374
11375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11380$as_echo_n "checking for inet_pton... " >&6; }
11381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011382/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011383
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011384#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011385#include <sys/socket.h>
11386#include <netinet/in.h>
11387#include <arpa/inet.h>
11388
Martin v. Löwise9416172003-05-03 10:12:45 +000011389int
11390main ()
11391{
11392void* p = inet_pton
11393 ;
11394 return 0;
11395}
11396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011398
Matthias Kloseb9621712010-04-24 17:59:49 +000011399$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011400
Matthias Kloseb159a552010-04-25 21:00:44 +000011401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011402$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011403else
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11405$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011406
11407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011409
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011410# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11412$as_echo_n "checking for setgroups... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011416#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011417#ifdef HAVE_GRP_H
11418#include <grp.h>
11419#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011420
Martin v. Löwisd5843682002-11-21 20:41:28 +000011421int
11422main ()
11423{
11424void* p = setgroups
11425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011432
Matthias Kloseb159a552010-04-25 21:00:44 +000011433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011434$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011435else
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11437$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011438
11439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011441
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011442# check for openpty and forkpty
11443
11444for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011445do :
11446 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011447if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011450_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011451
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011452else
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11454$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011455if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011457else
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011459LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463/* Override any GCC internal prototype to avoid an error.
11464 Use char because int might match the return type of a GCC
11465 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011466#ifdef __cplusplus
11467extern "C"
11468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011469char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011470int
11471main ()
11472{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011473return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011474 ;
11475 return 0;
11476}
11477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011483rm -f core conftest.err conftest.$ac_objext \
11484 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011485LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11488$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011489if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011490 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011492else
Matthias Kloseb9621712010-04-24 17:59:49 +000011493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11494$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011495if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011496 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011497else
11498 ac_check_lib_save_LIBS=$LIBS
11499LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011501/* end confdefs.h. */
11502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011503/* Override any GCC internal prototype to avoid an error.
11504 Use char because int might match the return type of a GCC
11505 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011506#ifdef __cplusplus
11507extern "C"
11508#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011509char openpty ();
11510int
11511main ()
11512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011519 ac_cv_lib_bsd_openpty=yes
11520else
Matthias Kloseb9621712010-04-24 17:59:49 +000011521 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011522fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011523rm -f core conftest.err conftest.$ac_objext \
11524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011525LIBS=$ac_check_lib_save_LIBS
11526fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11528$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011529if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011530 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011531 LIBS="$LIBS -lbsd"
11532fi
11533
11534
11535fi
11536
Fred Drake8cef4cf2000-06-28 16:40:38 +000011537
11538fi
11539done
11540
11541for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011542do :
11543 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011547_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549else
Matthias Kloseb9621712010-04-24 17:59:49 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11551$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011552if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011554else
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011556LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011558/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011560/* Override any GCC internal prototype to avoid an error.
11561 Use char because int might match the return type of a GCC
11562 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011563#ifdef __cplusplus
11564extern "C"
11565#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011566char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011567int
11568main ()
11569{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011571 ;
11572 return 0;
11573}
11574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011575if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011577else
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011580rm -f core conftest.err conftest.$ac_objext \
11581 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011582LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11585$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011586if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011588 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011589else
Matthias Kloseb9621712010-04-24 17:59:49 +000011590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11591$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011593 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011594else
11595 ac_check_lib_save_LIBS=$LIBS
11596LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011598/* end confdefs.h. */
11599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011600/* Override any GCC internal prototype to avoid an error.
11601 Use char because int might match the return type of a GCC
11602 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011603#ifdef __cplusplus
11604extern "C"
11605#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011606char forkpty ();
11607int
11608main ()
11609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011611 ;
11612 return 0;
11613}
11614_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011615if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011616 ac_cv_lib_bsd_forkpty=yes
11617else
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620rm -f core conftest.err conftest.$ac_objext \
11621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011622LIBS=$ac_check_lib_save_LIBS
11623fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11625$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011626if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011628 LIBS="$LIBS -lbsd"
11629fi
11630
11631
11632fi
11633
Fred Drake8cef4cf2000-06-28 16:40:38 +000011634
11635fi
11636done
11637
Jack Jansendd19cf82001-12-06 22:36:17 +000011638
Christian Heimesb186d002008-03-18 15:15:01 +000011639# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011640for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011641do :
11642 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011643if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011644 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011645#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011646_ACEOF
11647
11648fi
11649done
11650
11651
Michael W. Hudson54241132001-12-07 15:38:26 +000011652# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011653for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011654do :
11655 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11656ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011657if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011658 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011660_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011661
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011662fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011663done
11664
Michael W. Hudson54241132001-12-07 15:38:26 +000011665
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011666ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011667if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011668 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011669
Martin v. Löwis1142de32002-03-29 16:28:31 +000011670else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011671 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011672 *" dup2.$ac_objext "* ) ;;
11673 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011675esac
11676
Martin v. Löwis1142de32002-03-29 16:28:31 +000011677fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011678
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011679ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011680if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011681 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11682
11683else
11684 case " $LIBOBJS " in
11685 *" strdup.$ac_objext "* ) ;;
11686 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11687 ;;
11688esac
11689
11690fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011691
11692
11693for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011694do :
11695 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011696if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011697 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011698#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011702#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011703int
11704main ()
11705{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011706getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011714
Guido van Rossum627b2d71993-12-24 10:39:16 +000011715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011717
Guido van Rossum627b2d71993-12-24 10:39:16 +000011718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011719done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011720
Jack Jansen150753c2003-03-29 22:07:47 +000011721for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011722do :
11723 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011724if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011725 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011726#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011729/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011730#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011731int
11732main ()
11733{
11734setpgrp(0,0);
11735 ;
11736 return 0;
11737}
11738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011742
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011745
11746fi
11747done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011748
Thomas Wouters3a584202000-08-05 23:28:51 +000011749for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011750do :
11751 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011752if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011753 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011754#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011757/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011758#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011759int
11760main ()
11761{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ;
11764 return 0;
11765}
11766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011767if ac_fn_c_try_compile "$LINENO"; then :
11768
Guido van Rossum627b2d71993-12-24 10:39:16 +000011769else
Skip Montanaro6dead952003-09-25 14:50:04 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011772
Martin v. Löwis11437992002-04-12 09:54:03 +000011773
Guido van Rossum627b2d71993-12-24 10:39:16 +000011774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011776
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011777fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011778done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779
Michael W. Hudson54241132001-12-07 15:38:26 +000011780
Victor Stinnere0be4232011-10-25 13:06:09 +020011781for ac_func in clock_gettime
11782do :
11783 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11784if test "x$ac_cv_func_clock_gettime" = xyes; then :
11785 cat >>confdefs.h <<_ACEOF
11786#define HAVE_CLOCK_GETTIME 1
11787_ACEOF
11788
11789else
11790
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11792$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11793if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11794 $as_echo_n "(cached) " >&6
11795else
11796 ac_check_lib_save_LIBS=$LIBS
11797LIBS="-lrt $LIBS"
11798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11799/* end confdefs.h. */
11800
11801/* Override any GCC internal prototype to avoid an error.
11802 Use char because int might match the return type of a GCC
11803 builtin and then its argument prototype would still apply. */
11804#ifdef __cplusplus
11805extern "C"
11806#endif
11807char clock_gettime ();
11808int
11809main ()
11810{
11811return clock_gettime ();
11812 ;
11813 return 0;
11814}
11815_ACEOF
11816if ac_fn_c_try_link "$LINENO"; then :
11817 ac_cv_lib_rt_clock_gettime=yes
11818else
11819 ac_cv_lib_rt_clock_gettime=no
11820fi
11821rm -f core conftest.err conftest.$ac_objext \
11822 conftest$ac_exeext conftest.$ac_ext
11823LIBS=$ac_check_lib_save_LIBS
11824fi
11825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11826$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11827if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11828
11829 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11830
11831
11832$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11833
11834
11835fi
11836
11837
11838fi
11839done
11840
11841
11842for ac_func in clock_getres
11843do :
11844 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11845if test "x$ac_cv_func_clock_getres" = xyes; then :
11846 cat >>confdefs.h <<_ACEOF
11847#define HAVE_CLOCK_GETRES 1
11848_ACEOF
11849
11850else
11851
11852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11853$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11854if ${ac_cv_lib_rt_clock_getres+:} false; then :
11855 $as_echo_n "(cached) " >&6
11856else
11857 ac_check_lib_save_LIBS=$LIBS
11858LIBS="-lrt $LIBS"
11859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11860/* end confdefs.h. */
11861
11862/* Override any GCC internal prototype to avoid an error.
11863 Use char because int might match the return type of a GCC
11864 builtin and then its argument prototype would still apply. */
11865#ifdef __cplusplus
11866extern "C"
11867#endif
11868char clock_getres ();
11869int
11870main ()
11871{
11872return clock_getres ();
11873 ;
11874 return 0;
11875}
11876_ACEOF
11877if ac_fn_c_try_link "$LINENO"; then :
11878 ac_cv_lib_rt_clock_getres=yes
11879else
11880 ac_cv_lib_rt_clock_getres=no
11881fi
11882rm -f core conftest.err conftest.$ac_objext \
11883 conftest$ac_exeext conftest.$ac_ext
11884LIBS=$ac_check_lib_save_LIBS
11885fi
11886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11887$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11888if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11889
11890 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11891
11892
11893fi
11894
11895
11896fi
11897done
11898
11899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11901$as_echo_n "checking for major... " >&6; }
11902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011903/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011904
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011905#if defined(MAJOR_IN_MKDEV)
11906#include <sys/mkdev.h>
11907#elif defined(MAJOR_IN_SYSMACROS)
11908#include <sys/sysmacros.h>
11909#else
11910#include <sys/types.h>
11911#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011912
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011913int
11914main ()
11915{
11916
11917 makedev(major(0),minor(0));
11918
11919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011924
11925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011927
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11929$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011930
11931else
Skip Montanaro6dead952003-09-25 14:50:04 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011935
11936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011937rm -f core conftest.err conftest.$ac_objext \
11938 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011939
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011940# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011941# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11943$as_echo_n "checking for getaddrinfo... " >&6; }
11944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011945/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011946
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011947#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011948#include <sys/socket.h>
11949#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011950#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951
Martin v. Löwis11437992002-04-12 09:54:03 +000011952int
11953main ()
11954{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011955getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011961 have_getaddrinfo=yes
11962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011965rm -f core conftest.err conftest.$ac_objext \
11966 conftest$ac_exeext conftest.$ac_ext
11967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11968$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011969if test $have_getaddrinfo = yes
11970then
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11972$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011973 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011977
11978if test "${enable_ipv6+set}" = set; then
11979 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11980else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011981 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011982fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011983else
Matthias Kloseb9621712010-04-24 17:59:49 +000011984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011985/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011986
Stefan Krah19c21392012-11-22 23:47:32 +010011987#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011988#include <sys/types.h>
11989#include <netdb.h>
11990#include <string.h>
11991#include <sys/socket.h>
11992#include <netinet/in.h>
11993
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011994int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011995{
11996 int passive, gaierr, inet4 = 0, inet6 = 0;
11997 struct addrinfo hints, *ai, *aitop;
11998 char straddr[INET6_ADDRSTRLEN], strport[16];
11999
12000 for (passive = 0; passive <= 1; passive++) {
12001 memset(&hints, 0, sizeof(hints));
12002 hints.ai_family = AF_UNSPEC;
12003 hints.ai_flags = passive ? AI_PASSIVE : 0;
12004 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012005 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012006 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12007 (void)gai_strerror(gaierr);
12008 goto bad;
12009 }
12010 for (ai = aitop; ai; ai = ai->ai_next) {
12011 if (ai->ai_addr == NULL ||
12012 ai->ai_addrlen == 0 ||
12013 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12014 straddr, sizeof(straddr), strport, sizeof(strport),
12015 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12016 goto bad;
12017 }
12018 switch (ai->ai_family) {
12019 case AF_INET:
12020 if (strcmp(strport, "54321") != 0) {
12021 goto bad;
12022 }
12023 if (passive) {
12024 if (strcmp(straddr, "0.0.0.0") != 0) {
12025 goto bad;
12026 }
12027 } else {
12028 if (strcmp(straddr, "127.0.0.1") != 0) {
12029 goto bad;
12030 }
12031 }
12032 inet4++;
12033 break;
12034 case AF_INET6:
12035 if (strcmp(strport, "54321") != 0) {
12036 goto bad;
12037 }
12038 if (passive) {
12039 if (strcmp(straddr, "::") != 0) {
12040 goto bad;
12041 }
12042 } else {
12043 if (strcmp(straddr, "::1") != 0) {
12044 goto bad;
12045 }
12046 }
12047 inet6++;
12048 break;
12049 case AF_UNSPEC:
12050 goto bad;
12051 break;
12052 default:
12053 /* another family support? */
12054 break;
12055 }
12056 }
12057 }
12058
12059 if (!(inet4 == 0 || inet4 == 2))
12060 goto bad;
12061 if (!(inet6 == 0 || inet6 == 2))
12062 goto bad;
12063
12064 if (aitop)
12065 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012066 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067
12068 bad:
12069 if (aitop)
12070 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012071 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072}
12073
Martin v. Löwis11437992002-04-12 09:54:03 +000012074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012075if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012076 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012084fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012087
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12089$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12090
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012091if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012092then
12093 if test $ipv6 = yes
12094 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095 echo 'Fatal: You must get working getaddrinfo() function.'
12096 echo ' or you can specify "--disable-ipv6"'.
12097 exit 1
12098 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012099else
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012102
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012103fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012104
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012105for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012106do :
12107 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012111_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012112
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113fi
12114done
12115
Michael W. Hudson54241132001-12-07 15:38:26 +000012116
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012117# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12119$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012120if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012121 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012124/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125#include <sys/types.h>
12126#include <sys/time.h>
12127#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012128
Martin v. Löwis11437992002-04-12 09:54:03 +000012129int
12130main ()
12131{
12132if ((struct tm *) 0)
12133return 0;
12134 ;
12135 return 0;
12136}
12137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012138if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012140else
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12146$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012147if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012148
Matthias Kloseb9621712010-04-24 17:59:49 +000012149$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012150
12151fi
12152
Matthias Kloseb9621712010-04-24 17:59:49 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12154$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012155if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012159/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012160#include <sys/types.h>
12161#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166struct tm tm;
12167 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 ;
12170 return 0;
12171}
12172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174 ac_cv_struct_tm=time.h
12175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12181$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012182if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012183
Matthias Kloseb9621712010-04-24 17:59:49 +000012184$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185
12186fi
12187
Matthias Kloseb9621712010-04-24 17:59:49 +000012188ac_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 +000012189#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Matthias Kloseb9621712010-04-24 17:59:49 +000012191"
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193
12194cat >>confdefs.h <<_ACEOF
12195#define HAVE_STRUCT_TM_TM_ZONE 1
12196_ACEOF
12197
12198
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012199fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012200
Martin v. Löwis11437992002-04-12 09:54:03 +000012201if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204
12205else
Matthias Kloseb9621712010-04-24 17:59:49 +000012206 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12207"
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210else
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212fi
12213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216_ACEOF
12217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12219$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012220if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012221 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222else
Matthias Kloseb9621712010-04-24 17:59:49 +000012223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012224/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226#if !HAVE_DECL_TZNAME
12227extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012229
Martin v. Löwis11437992002-04-12 09:54:03 +000012230int
12231main ()
12232{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012234 ;
12235 return 0;
12236}
12237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239 ac_cv_var_tzname=yes
12240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243rm -f core conftest.err conftest.$ac_objext \
12244 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12247$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012248 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012249
Matthias Kloseb9621712010-04-24 17:59:49 +000012250$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012251
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252 fi
12253fi
12254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255ac_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 +020012256if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
12258cat >>confdefs.h <<_ACEOF
12259#define HAVE_STRUCT_STAT_ST_RDEV 1
12260_ACEOF
12261
12262
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012263fi
12264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265ac_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 +020012266if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268cat >>confdefs.h <<_ACEOF
12269#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12270_ACEOF
12271
12272
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012273fi
12274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275ac_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 +020012276if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012277
12278cat >>confdefs.h <<_ACEOF
12279#define HAVE_STRUCT_STAT_ST_FLAGS 1
12280_ACEOF
12281
12282
12283fi
12284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285ac_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 +020012286if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012287
12288cat >>confdefs.h <<_ACEOF
12289#define HAVE_STRUCT_STAT_ST_GEN 1
12290_ACEOF
12291
12292
12293fi
12294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295ac_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 +020012296if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012297
12298cat >>confdefs.h <<_ACEOF
12299#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12300_ACEOF
12301
12302
12303fi
12304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305ac_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 +020012306if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308cat >>confdefs.h <<_ACEOF
12309#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12310_ACEOF
12311
12312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012314
12315else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012317 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12319 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012320esac
12321
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012322fi
12323
Michael W. Hudson54241132001-12-07 15:38:26 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325
Matthias Kloseb9621712010-04-24 17:59:49 +000012326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12327$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012329 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012330else
Matthias Kloseb159a552010-04-25 21:00:44 +000012331
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012334#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344 ac_cv_header_time_altzone=yes
12345else
Matthias Kloseb9621712010-04-24 17:59:49 +000012346 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012350fi
12351
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12353$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012355
Matthias Kloseb9621712010-04-24 17:59:49 +000012356$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357
12358fi
12359
Guido van Rossumda88dad1995-01-26 00:46:29 +000012360was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12362$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012364/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012365
12366#include <sys/types.h>
12367#include <sys/select.h>
12368#include <sys/time.h>
12369
Martin v. Löwis11437992002-04-12 09:54:03 +000012370int
12371main ()
12372{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373;
Martin v. Löwis11437992002-04-12 09:54:03 +000012374 ;
12375 return 0;
12376}
12377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012378if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
12380
Matthias Kloseb9621712010-04-24 17:59:49 +000012381$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012382
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012383 was_it_defined=yes
12384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12388$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12391$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012392if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012394else
Matthias Kloseb9621712010-04-24 17:59:49 +000012395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012396/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012397#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012398int
12399main ()
12400{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012402 ;
12403 return 0;
12404}
12405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407 ac_cv_struct_addrinfo=yes
12408else
Matthias Kloseb9621712010-04-24 17:59:49 +000012409 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12412fi
12413
Matthias Kloseb9621712010-04-24 17:59:49 +000012414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12415$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012417
Matthias Kloseb9621712010-04-24 17:59:49 +000012418$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012419
12420fi
12421
Matthias Kloseb9621712010-04-24 17:59:49 +000012422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12423$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012424if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012425 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012428/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012429
12430# include <sys/types.h>
12431# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012435struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012441 ac_cv_struct_sockaddr_storage=yes
12442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12446fi
12447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12449$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012450if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012453
12454fi
12455
Guido van Rossum627b2d71993-12-24 10:39:16 +000012456# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012457
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12459$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012460if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012461 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012462else
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012465$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012466int
12467main ()
12468{
12469static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012470test_array [0] = 0;
12471return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
12473 ;
12474 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012475}
Martin v. Löwis11437992002-04-12 09:54:03 +000012476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012477if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012478 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012479else
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012483fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12485$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012486if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488
12489fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12492$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012493if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498
Martin v. Löwis11437992002-04-12 09:54:03 +000012499int
12500main ()
12501{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012502
Martin v. Löwis11437992002-04-12 09:54:03 +000012503#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012504 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012506 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508 char const *const *pcpcc;
12509 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 /* NEC SVR4.0.2 mips cc rejects this. */
12511 struct point {int x, y;};
12512 static struct point const zero = {0,0};
12513 /* AIX XL C 1.02.0.0 rejects this.
12514 It does not let you subtract one const X* pointer from another in
12515 an arm of an if-expression whose if-part is not a constant
12516 expression */
12517 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012519 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012520 ++pcpcc;
12521 ppc = (char**) pcpcc;
12522 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012523 { /* SCO 3.2v4 cc rejects this sort of thing. */
12524 char tx;
12525 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012526 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012530 }
12531 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12532 int x[] = {25, 17};
12533 const int *foo = &x[0];
12534 ++foo;
12535 }
12536 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12537 typedef const int *iptr;
12538 iptr p = 0;
12539 ++p;
12540 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012541 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012543 struct s { int j; const int *ap[3]; } bx;
12544 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012545 }
12546 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12547 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012549 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012550 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012551#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012552
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ;
12554 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012555}
Martin v. Löwis11437992002-04-12 09:54:03 +000012556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012557if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012558 ac_cv_c_const=yes
12559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12565$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012566if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569
12570fi
12571
Michael W. Hudson54241132001-12-07 15:38:26 +000012572
Guido van Rossumda88dad1995-01-26 00:46:29 +000012573works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12575$as_echo_n "checking for working volatile... " >&6; }
12576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012578
Martin v. Löwis11437992002-04-12 09:54:03 +000012579int
12580main ()
12581{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012582volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 ;
12584 return 0;
12585}
12586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012587if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012588 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012589else
Skip Montanaro6dead952003-09-25 14:50:04 +000012590
Matthias Kloseb9621712010-04-24 17:59:49 +000012591$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012592
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012593
Guido van Rossum627b2d71993-12-24 10:39:16 +000012594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12597$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012598
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12601$as_echo_n "checking for working signed char... " >&6; }
12602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012603/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012604
Martin v. Löwis11437992002-04-12 09:54:03 +000012605int
12606main ()
12607{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012608signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ;
12610 return 0;
12611}
12612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012613if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012614 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012615else
Skip Montanaro6dead952003-09-25 14:50:04 +000012616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012618
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012619
Guido van Rossum7f43da71994-08-01 12:15:30 +000012620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12623$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012624
Guido van Rossumda88dad1995-01-26 00:46:29 +000012625have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12627$as_echo_n "checking for prototypes... " >&6; }
12628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012629/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012630int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012631int
12632main ()
12633{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Kloseb9621712010-04-24 17:59:49 +000012641$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Matthias Kloseb159a552010-04-25 21:00:44 +000012643 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12647$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
Guido van Rossumda88dad1995-01-26 00:46:29 +000012649works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12651$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012653/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012654
12655#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012656int foo(int x, ...) {
12657 va_list va;
12658 va_start(va, x);
12659 va_arg(va, int);
12660 va_arg(va, char *);
12661 va_arg(va, double);
12662 return 0;
12663}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012664
Martin v. Löwis11437992002-04-12 09:54:03 +000012665int
12666main ()
12667{
Guido van Rossum90eea071996-08-30 20:58:57 +000012668return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 ;
12670 return 0;
12671}
12672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
12675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012678 works=yes
12679
Guido van Rossum627b2d71993-12-24 10:39:16 +000012680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12683$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684
Martin v. Löwisd6320502004-08-12 13:45:08 +000012685# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12687$as_echo_n "checking for socketpair... " >&6; }
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012689/* end confdefs.h. */
12690
12691#include <sys/types.h>
12692#include <sys/socket.h>
12693
12694int
12695main ()
12696{
12697void *x=socketpair
12698 ;
12699 return 0;
12700}
12701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012705
Matthias Kloseb159a552010-04-25 21:00:44 +000012706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012707$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012708else
Matthias Kloseb9621712010-04-24 17:59:49 +000012709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12710$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012711
12712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012714
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012715# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12717$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012719/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012720#include <sys/types.h>
12721#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012722int
12723main ()
12724{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012725struct sockaddr x;
12726x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ;
12728 return 0;
12729}
12730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731if ac_fn_c_try_compile "$LINENO"; then :
12732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12733$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Matthias Kloseb9621712010-04-24 17:59:49 +000012735$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012736
12737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12739$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012740
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012743
Guido van Rossumda88dad1995-01-26 00:46:29 +000012744va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12746$as_echo_n "checking whether va_list is an array... " >&6; }
12747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012748/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749
12750#ifdef HAVE_STDARG_PROTOTYPES
12751#include <stdarg.h>
12752#else
12753#include <varargs.h>
12754#endif
12755
Martin v. Löwis11437992002-04-12 09:54:03 +000012756int
12757main ()
12758{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012759va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 ;
12761 return 0;
12762}
12763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012764if ac_fn_c_try_compile "$LINENO"; then :
12765
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766else
Skip Montanaro6dead952003-09-25 14:50:04 +000012767
Martin v. Löwis11437992002-04-12 09:54:03 +000012768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012770
Guido van Rossumda88dad1995-01-26 00:46:29 +000012771 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012772
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012773fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12776$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012778# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012779
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012782if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012785
Matthias Kloseb9621712010-04-24 17:59:49 +000012786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12787$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012788 OLD_CFLAGS=$CFLAGS
12789 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012791/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012792
12793# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795int
12796main ()
12797{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012798
12799 char *name;
12800 struct hostent *he, *res;
12801 char buffer[2048];
12802 int buflen = 2048;
12803 int h_errnop;
12804
12805 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
12807 ;
12808 return 0;
12809}
12810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012814
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12819$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012820
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012821else
Skip Montanaro6dead952003-09-25 14:50:04 +000012822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12824$as_echo "no" >&6; }
12825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12826$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012828/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012829
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012830# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
Martin v. Löwis11437992002-04-12 09:54:03 +000012832int
12833main ()
12834{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012835
12836 char *name;
12837 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012838 char buffer[2048];
12839 int buflen = 2048;
12840 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012841
Matthias Kloseb159a552010-04-25 21:00:44 +000012842 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012843
12844 ;
12845 return 0;
12846}
12847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012848if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012851
Martin v. Löwis11437992002-04-12 09:54:03 +000012852
Matthias Kloseb159a552010-04-25 21:00:44 +000012853$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12856$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012858else
Skip Montanaro6dead952003-09-25 14:50:04 +000012859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12861$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12863$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12865/* end confdefs.h. */
12866
12867# include <netdb.h>
12868
12869int
12870main ()
12871{
12872
12873 char *name;
12874 struct hostent *he;
12875 struct hostent_data data;
12876
12877 (void) gethostbyname_r(name, he, &data);
12878
12879 ;
12880 return 0;
12881}
12882_ACEOF
12883if ac_fn_c_try_compile "$LINENO"; then :
12884
12885 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12886
12887
12888$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12889
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12891$as_echo "yes" >&6; }
12892
12893else
12894
12895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12896$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012900
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012906 CFLAGS=$OLD_CFLAGS
12907
12908else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 for ac_func in gethostbyname
12911do :
12912 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012913if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012914 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012916_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012917
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012918fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012919done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012920
Michael W. Hudson54241132001-12-07 15:38:26 +000012921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012922fi
12923
Michael W. Hudson54241132001-12-07 15:38:26 +000012924
12925
12926
12927
12928
12929
Guido van Rossum627b2d71993-12-24 10:39:16 +000012930# checks for system services
12931# (none yet)
12932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012934ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012936
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012937else
Matthias Kloseb9621712010-04-24 17:59:49 +000012938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12939$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012940if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012942else
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012944LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012948/* Override any GCC internal prototype to avoid an error.
12949 Use char because int might match the return type of a GCC
12950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012951#ifdef __cplusplus
12952extern "C"
12953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012954char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012955int
12956main ()
12957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 ;
12960 return 0;
12961}
12962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012965else
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012968rm -f core conftest.err conftest.$ac_objext \
12969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012970LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12973$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012974if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 cat >>confdefs.h <<_ACEOF
12976#define HAVE_LIBIEEE 1
12977_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012979 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980
Guido van Rossum627b2d71993-12-24 10:39:16 +000012981fi
12982
Michael W. Hudson54241132001-12-07 15:38:26 +000012983
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012984fi
12985
Michael W. Hudson54241132001-12-07 15:38:26 +000012986
Guido van Rossum7f253911997-05-09 02:42:48 +000012987# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12989$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012991# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012992if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012994if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012995then
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13000$as_echo "yes" >&6; }
13001else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13002$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013003fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013004else
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13006$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007fi
13008
Guido van Rossum7f253911997-05-09 02:42:48 +000013009
Guido van Rossum7f43da71994-08-01 12:15:30 +000013010# check for --with-libm=...
13011
Guido van Rossum563e7081996-09-10 18:20:48 +000013012case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013013Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013014*) LIBM=-lm
13015esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13017$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013020if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013021 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013022if test "$withval" = no
13023then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13025$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013026elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013027then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13029$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013030else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013031fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13034$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035fi
13036
Guido van Rossum7f43da71994-08-01 12:15:30 +000013037
13038# check for --with-libc=...
13039
Matthias Kloseb9621712010-04-24 17:59:49 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13041$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013044if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013046if test "$withval" = no
13047then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13049$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013050elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013051then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13053$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013054else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013055fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013056else
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13058$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013059fi
13060
Guido van Rossum7f43da71994-08-01 12:15:30 +000013061
Stefan Krah1919b7e2012-03-21 18:25:23 +010013062# **************************************
13063# * Check for gcc x64 inline assembler *
13064# **************************************
13065
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13067$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069/* end confdefs.h. */
13070
13071int
13072main ()
13073{
13074
13075 __asm__ __volatile__ ("movq %rcx, %rax");
13076
13077 ;
13078 return 0;
13079}
13080_ACEOF
13081if ac_fn_c_try_compile "$LINENO"; then :
13082 have_gcc_asm_for_x64=yes
13083else
13084 have_gcc_asm_for_x64=no
13085fi
13086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13088$as_echo "$have_gcc_asm_for_x64" >&6; }
13089if test "$have_gcc_asm_for_x64" = yes
13090then
13091
13092$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13093
13094fi
13095
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013096# **************************************************
13097# * Check for various properties of floating point *
13098# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13101$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013102if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013103 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013104else
13105
Matthias Kloseb9621712010-04-24 17:59:49 +000013106if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013107 ac_cv_little_endian_double=no
13108else
Matthias Kloseb9621712010-04-24 17:59:49 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013110/* end confdefs.h. */
13111
13112#include <string.h>
13113int main() {
13114 double x = 9006104071832581.0;
13115 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13116 return 0;
13117 else
13118 return 1;
13119}
13120
13121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013122if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013123 ac_cv_little_endian_double=yes
13124else
Matthias Kloseb9621712010-04-24 17:59:49 +000013125 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013129fi
13130
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013131fi
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13134$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013135if test "$ac_cv_little_endian_double" = yes
13136then
13137
Matthias Kloseb9621712010-04-24 17:59:49 +000013138$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013139
13140fi
13141
Matthias Kloseb9621712010-04-24 17:59:49 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13143$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013144if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013145 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013146else
13147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013149 ac_cv_big_endian_double=no
13150else
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013152/* end confdefs.h. */
13153
13154#include <string.h>
13155int main() {
13156 double x = 9006104071832581.0;
13157 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13158 return 0;
13159 else
13160 return 1;
13161}
13162
13163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013164if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013165 ac_cv_big_endian_double=yes
13166else
Matthias Kloseb9621712010-04-24 17:59:49 +000013167 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013171fi
13172
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013173fi
13174
Matthias Kloseb9621712010-04-24 17:59:49 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13176$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013177if test "$ac_cv_big_endian_double" = yes
13178then
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013181
13182fi
13183
13184# Some ARM platforms use a mixed-endian representation for doubles.
13185# While Python doesn't currently have full support for these platforms
13186# (see e.g., issue 1762561), we can at least make sure that float <-> string
13187# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13189$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013190if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013192else
13193
Matthias Kloseb9621712010-04-24 17:59:49 +000013194if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013195 ac_cv_mixed_endian_double=no
13196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013198/* end confdefs.h. */
13199
13200#include <string.h>
13201int main() {
13202 double x = 9006104071832581.0;
13203 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13204 return 0;
13205 else
13206 return 1;
13207}
13208
13209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013210if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013211 ac_cv_mixed_endian_double=yes
13212else
Matthias Kloseb9621712010-04-24 17:59:49 +000013213 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013217fi
13218
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013219fi
13220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13222$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013223if test "$ac_cv_mixed_endian_double" = yes
13224then
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013227
13228fi
13229
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013230# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013231# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013232# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013233# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013234# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013235# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013236
13237# This inline assembler syntax may also work for suncc and icc,
13238# so we try it on all platforms.
13239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13241$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013243/* end confdefs.h. */
13244
13245int
13246main ()
13247{
13248
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013249 unsigned short cw;
13250 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13251 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013252
13253 ;
13254 return 0;
13255}
13256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013257if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013258 have_gcc_asm_for_x87=yes
13259else
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013261fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13264$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013265if test "$have_gcc_asm_for_x87" = yes
13266then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013267
Matthias Kloseb9621712010-04-24 17:59:49 +000013268$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013269
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013270fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013271
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013272# Detect whether system arithmetic is subject to x87-style double
13273# rounding issues. The result of this test has little meaning on non
13274# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13275# mode is round-to-nearest and double rounding issues are present, and
13276# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13278$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013279# $BASECFLAGS may affect the result
13280ac_save_cc="$CC"
13281CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013282if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013283 ac_cv_x87_double_rounding=no
13284else
Matthias Kloseb9621712010-04-24 17:59:49 +000013285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013286/* end confdefs.h. */
13287
13288#include <stdlib.h>
13289#include <math.h>
13290int main() {
13291 volatile double x, y, z;
13292 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13293 x = 0.99999999999999989; /* 1-2**-53 */
13294 y = 1./x;
13295 if (y != 1.)
13296 exit(0);
13297 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13298 x = 1e16;
13299 y = 2.99999;
13300 z = x + y;
13301 if (z != 1e16+4.)
13302 exit(0);
13303 /* both tests show evidence of double rounding */
13304 exit(1);
13305}
13306
13307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013308if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013309 ac_cv_x87_double_rounding=no
13310else
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013315fi
13316
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013317CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13319$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013320if test "$ac_cv_x87_double_rounding" = yes
13321then
13322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013324
13325fi
13326
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013327# ************************************
13328# * Check for mathematical functions *
13329# ************************************
13330
13331LIBS_SAVE=$LIBS
13332LIBS="$LIBS $LIBM"
13333
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013334for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13335do :
13336 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13337ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013338if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013339 cat >>confdefs.h <<_ACEOF
13340#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13341_ACEOF
13342
13343fi
13344done
13345
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013346for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013347do :
13348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013351 cat >>confdefs.h <<_ACEOF
13352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13353_ACEOF
13354
13355fi
13356done
13357
13358ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13359"
Victor Stinnere0be4232011-10-25 13:06:09 +020013360if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013361 ac_have_decl=1
13362else
13363 ac_have_decl=0
13364fi
13365
13366cat >>confdefs.h <<_ACEOF
13367#define HAVE_DECL_ISINF $ac_have_decl
13368_ACEOF
13369ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13370"
Victor Stinnere0be4232011-10-25 13:06:09 +020013371if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013372 ac_have_decl=1
13373else
13374 ac_have_decl=0
13375fi
13376
13377cat >>confdefs.h <<_ACEOF
13378#define HAVE_DECL_ISNAN $ac_have_decl
13379_ACEOF
13380ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13381"
Victor Stinnere0be4232011-10-25 13:06:09 +020013382if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013383 ac_have_decl=1
13384else
13385 ac_have_decl=0
13386fi
13387
13388cat >>confdefs.h <<_ACEOF
13389#define HAVE_DECL_ISFINITE $ac_have_decl
13390_ACEOF
13391
13392
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013393# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13394# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13396$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013397if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013398 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013399else
13400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013402 ac_cv_tanh_preserves_zero_sign=no
13403else
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013405/* end confdefs.h. */
13406
13407#include <math.h>
13408#include <stdlib.h>
13409int main() {
13410 /* return 0 if either negative zeros don't exist
13411 on this platform or if negative zeros exist
13412 and tanh(-0.) == -0. */
13413 if (atan2(0., -1.) == atan2(-0., -1.) ||
13414 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13415 else exit(1);
13416}
13417
13418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013419if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013420 ac_cv_tanh_preserves_zero_sign=yes
13421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013426fi
13427
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13431$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013432if test "$ac_cv_tanh_preserves_zero_sign" = yes
13433then
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013436
13437fi
13438
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013439if test "$ac_cv_func_log1p" = yes
13440then
13441 # On some versions of AIX, log1p(-0.) returns 0. instead of
13442 # -0. See issue #9920.
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13444$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013445 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013446 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013447else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013448
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013449 if test "$cross_compiling" = yes; then :
13450 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013451else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013454
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013455 #include <math.h>
13456 #include <stdlib.h>
13457 int main() {
13458 /* Fail if the signs of log1p(-0.) and -0. can be
13459 distinguished. */
13460 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13461 return 0;
13462 else
13463 return 1;
13464 }
13465
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013466_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013467if ac_fn_c_try_run "$LINENO"; then :
13468 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013469else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013470 ac_cv_log1p_drops_zero_sign=yes
13471fi
13472rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13473 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013474fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013475
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013476fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013477
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13479$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13480fi
13481if test "$ac_cv_log1p_drops_zero_sign" = yes
13482then
13483
13484$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13485
13486fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013487
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013488LIBS=$LIBS_SAVE
13489
Mark Dickinsona614f042009-11-28 12:48:43 +000013490# For multiprocessing module, check that sem_open
13491# actually works. For FreeBSD versions <= 7.2,
13492# the kernel module that provides POSIX semaphores
13493# isn't loaded by default, so an attempt to call
13494# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13496$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013497if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013499else
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013501 ac_cv_posix_semaphores_enabled=yes
13502else
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013504/* end confdefs.h. */
13505
13506#include <unistd.h>
13507#include <fcntl.h>
13508#include <stdio.h>
13509#include <semaphore.h>
13510#include <sys/stat.h>
13511
13512int main(void) {
13513 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13514 if (a == SEM_FAILED) {
13515 perror("sem_open");
13516 return 1;
13517 }
13518 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013519 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013520 return 0;
13521}
13522
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013525 ac_cv_posix_semaphores_enabled=yes
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013531fi
13532
13533
Mark Dickinsona614f042009-11-28 12:48:43 +000013534fi
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13537$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013538if test $ac_cv_posix_semaphores_enabled = no
13539then
13540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013542
13543fi
13544
Mark Dickinson10683072009-04-18 21:18:19 +000013545# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13547$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013548if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013550else
Matthias Kloseb9621712010-04-24 17:59:49 +000013551 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013552 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013553else
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013555/* end confdefs.h. */
13556
13557#include <unistd.h>
13558#include <fcntl.h>
13559#include <stdio.h>
13560#include <semaphore.h>
13561#include <sys/stat.h>
13562
13563int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013564 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013565 int count;
13566 int res;
13567 if(a==SEM_FAILED){
13568 perror("sem_open");
13569 return 1;
13570
13571 }
13572 res = sem_getvalue(a, &count);
13573 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013574 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013575 return res==-1 ? 1 : 0;
13576}
13577
Mark Dickinson10683072009-04-18 21:18:19 +000013578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013586fi
13587
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013588
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589fi
13590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13592$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013593if test $ac_cv_broken_sem_getvalue = yes
13594then
13595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013597
13598fi
13599
Mark Dickinsonbd792642009-03-18 20:06:12 +000013600# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13602$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013603# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013604if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013605 enableval=$enable_big_digits; case $enable_big_digits in
13606yes)
13607 enable_big_digits=30 ;;
13608no)
13609 enable_big_digits=15 ;;
1361015|30)
13611 ;;
13612*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013613 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 +000013614esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13616$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013617
13618cat >>confdefs.h <<_ACEOF
13619#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13620_ACEOF
13621
13622
13623else
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13625$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013626fi
13627
13628
Guido van Rossumef2255b2000-03-10 22:30:29 +000013629# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013630ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013631if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
13633
Matthias Kloseb9621712010-04-24 17:59:49 +000013634$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013636 wchar_h="yes"
13637
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638else
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013640
13641fi
13642
Michael W. Hudson54241132001-12-07 15:38:26 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013645# determine wchar_t size
13646if test "$wchar_h" = yes
13647then
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13653$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013654if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13658"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013659
Martin v. Löwis11437992002-04-12 09:54:03 +000013660else
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 if test "$ac_cv_type_wchar_t" = yes; then
13662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013664as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666 else
13667 ac_cv_sizeof_wchar_t=0
13668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13673$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013674
13675
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013678#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013679_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013680
Michael W. Hudson54241132001-12-07 15:38:26 +000013681
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013682fi
13683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13685$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013686have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013688/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013689
13690#include <tcl.h>
13691#if TCL_UTF_MAX != 6
13692# error "NOT UCS4_TCL"
13693#endif
13694int
13695main ()
13696{
13697
13698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013703
13704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013706
13707 have_ucs4_tcl=yes
13708
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13712$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013713
Skip Montanaro6dead952003-09-25 14:50:04 +000013714# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013715if test "$wchar_h" = yes
13716then
13717 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13719$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013720 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013722else
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013725 ac_cv_wchar_t_signed=yes
13726else
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013728/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013729
13730 #include <wchar.h>
13731 int main()
13732 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013733 /* Success: exit code 0 */
13734 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013735 }
13736
13737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013738if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013739 ac_cv_wchar_t_signed=yes
13740else
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013743rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13744 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013745fi
13746
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013747fi
13748
Matthias Kloseb9621712010-04-24 17:59:49 +000013749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13750$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751fi
13752
Georg Brandl52d168a2008-01-07 18:10:24 +000013753# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013754if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013755 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013756then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013757 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Georg Brandl52d168a2008-01-07 18:10:24 +000013761else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013762 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013763fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13765$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013766
13767# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13769$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013770if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013771 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013772else
Matthias Kloseb9621712010-04-24 17:59:49 +000013773 ac_cv_c_bigendian=unknown
13774 # See if we're dealing with a universal compiler.
13775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13776/* end confdefs.h. */
13777#ifndef __APPLE_CC__
13778 not a universal capable compiler
13779 #endif
13780 typedef int dummy;
13781
Skip Montanaro6dead952003-09-25 14:50:04 +000013782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013783if ac_fn_c_try_compile "$LINENO"; then :
13784
13785 # Check for potential -arch flags. It is not universal unless
13786 # there are at least two -arch flags with different values.
13787 ac_arch=
13788 ac_prev=
13789 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13790 if test -n "$ac_prev"; then
13791 case $ac_word in
13792 i?86 | x86_64 | ppc | ppc64)
13793 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13794 ac_arch=$ac_word
13795 else
13796 ac_cv_c_bigendian=universal
13797 break
13798 fi
13799 ;;
13800 esac
13801 ac_prev=
13802 elif test "x$ac_word" = "x-arch"; then
13803 ac_prev=arch
13804 fi
13805 done
13806fi
13807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13808 if test $ac_cv_c_bigendian = unknown; then
13809 # See if sys/param.h defines the BYTE_ORDER macro.
13810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013812#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013813 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013814
Martin v. Löwis11437992002-04-12 09:54:03 +000013815int
13816main ()
13817{
Matthias Kloseb9621712010-04-24 17:59:49 +000013818#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13819 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13820 && LITTLE_ENDIAN)
13821 bogus endian macros
13822 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013823
13824 ;
13825 return 0;
13826}
13827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013829 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013831/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013832#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013834
Martin v. Löwis11437992002-04-12 09:54:03 +000013835int
13836main ()
13837{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013838#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013839 not big endian
13840 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
13842 ;
13843 return 0;
13844}
13845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013846if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013847 ac_cv_c_bigendian=yes
13848else
Matthias Kloseb9621712010-04-24 17:59:49 +000013849 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013852fi
13853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13854 fi
13855 if test $ac_cv_c_bigendian = unknown; then
13856 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013858/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013859#include <limits.h>
13860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861int
13862main ()
13863{
Matthias Kloseb9621712010-04-24 17:59:49 +000013864#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13865 bogus endian macros
13866 #endif
13867
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 ;
13869 return 0;
13870}
13871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013872if ac_fn_c_try_compile "$LINENO"; then :
13873 # It does; now see whether it defined to _BIG_ENDIAN or not.
13874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13875/* end confdefs.h. */
13876#include <limits.h>
13877
13878int
13879main ()
13880{
13881#ifndef _BIG_ENDIAN
13882 not big endian
13883 #endif
13884
13885 ;
13886 return 0;
13887}
13888_ACEOF
13889if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13895fi
13896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897 fi
13898 if test $ac_cv_c_bigendian = unknown; then
13899 # Compile a test program.
13900 if test "$cross_compiling" = yes; then :
13901 # Try to guess by grepping values from an object file.
13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903/* end confdefs.h. */
13904short int ascii_mm[] =
13905 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13906 short int ascii_ii[] =
13907 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13908 int use_ascii (int i) {
13909 return ascii_mm[i] + ascii_ii[i];
13910 }
13911 short int ebcdic_ii[] =
13912 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13913 short int ebcdic_mm[] =
13914 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13915 int use_ebcdic (int i) {
13916 return ebcdic_mm[i] + ebcdic_ii[i];
13917 }
13918 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920int
13921main ()
13922{
13923return use_ascii (foo) == use_ebcdic (foo);
13924 ;
13925 return 0;
13926}
13927_ACEOF
13928if ac_fn_c_try_compile "$LINENO"; then :
13929 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13930 ac_cv_c_bigendian=yes
13931 fi
13932 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13933 if test "$ac_cv_c_bigendian" = unknown; then
13934 ac_cv_c_bigendian=no
13935 else
13936 # finding both strings is unlikely to happen, but who knows?
13937 ac_cv_c_bigendian=unknown
13938 fi
13939 fi
13940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013942else
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013944/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013945$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013946int
13947main ()
13948{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 /* Are we little or big endian? From Harbison&Steele. */
13951 union
13952 {
13953 long int l;
13954 char c[sizeof (long int)];
13955 } u;
13956 u.l = 1;
13957 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958
13959 ;
13960 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013961}
Martin v. Löwis11437992002-04-12 09:54:03 +000013962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013963if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013964 ac_cv_c_bigendian=no
13965else
Matthias Kloseb9621712010-04-24 17:59:49 +000013966 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013973fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13975$as_echo "$ac_cv_c_bigendian" >&6; }
13976 case $ac_cv_c_bigendian in #(
13977 yes)
13978 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13979;; #(
13980 no)
13981 ;; #(
13982 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ;; #(
13987 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013988 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013989 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013991
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013993# ABI version string for Python extension modules. This appears between the
13994# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13995# from the following attributes which affect the ABI of this Python build (in
13996# this order):
13997#
13998# * The Python implementation (always 'cpython-' for us)
13999# * The major and minor version numbers
14000# * --with-pydebug (adds a 'd')
14001# * --with-pymalloc (adds a 'm')
14002# * --with-wide-unicode (adds a 'u')
14003#
14004# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014005# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14006# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014007
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14009$as_echo_n "checking ABIFLAGS... " >&6; }
14010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14011$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14013$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014014SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14016$as_echo "$SOABI" >&6; }
14017
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014018
14019case $ac_sys_system in
14020 Linux*|GNU*)
14021 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14022 *)
14023 EXT_SUFFIX=${SHLIB_SUFFIX};;
14024esac
14025
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14027$as_echo_n "checking LDVERSION... " >&6; }
14028LDVERSION='$(VERSION)$(ABIFLAGS)'
14029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14030$as_echo "$LDVERSION" >&6; }
14031
doko@python.org87421192013-01-26 11:39:31 +010014032
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014033LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014034
14035
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014036# Check whether right shifting a negative integer extends the sign bit
14037# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14039$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014040if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014042else
Martin v. Löwis11437992002-04-12 09:54:03 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014045 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014046else
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014048/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014049
14050int main()
14051{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014052 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014053}
14054
Martin v. Löwis11437992002-04-12 09:54:03 +000014055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014056if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014057 ac_cv_rshift_extends_sign=yes
14058else
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014061rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14062 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014063fi
14064
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014065fi
14066
Matthias Kloseb9621712010-04-24 17:59:49 +000014067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14068$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014069if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014070then
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
Matthias Kloseb9621712010-04-24 17:59:49 +000014072$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014073
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014074fi
14075
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014076# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14078$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014079if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014081else
Martin v. Löwis11437992002-04-12 09:54:03 +000014082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014084/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014085#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014086int
14087main ()
14088{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014089
14090 FILE *f = fopen("/dev/null", "r");
14091 flockfile(f);
14092 getc_unlocked(f);
14093 funlockfile(f);
14094
Martin v. Löwis11437992002-04-12 09:54:03 +000014095 ;
14096 return 0;
14097}
14098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014099if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014100 ac_cv_have_getc_unlocked=yes
14101else
Matthias Kloseb9621712010-04-24 17:59:49 +000014102 ac_cv_have_getc_unlocked=no
14103fi
14104rm -f core conftest.err conftest.$ac_objext \
14105 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014106fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107
Matthias Kloseb9621712010-04-24 17:59:49 +000014108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14109$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014110if test "$ac_cv_have_getc_unlocked" = yes
14111then
Martin v. Löwis11437992002-04-12 09:54:03 +000014112
Matthias Kloseb9621712010-04-24 17:59:49 +000014113$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014114
14115fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014116
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014117# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014118# save the value of LIBS so we don't actually link Python with readline
14119LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014120
Gregory P. Smith18820942008-09-07 06:24:49 +000014121# On some systems we need to link readline to a termcap compatible
14122# library. NOTE: Keep the precedence of listed libraries synchronised
14123# with setup.py.
14124py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14126$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014127for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014128 if test -z "$py_libtermcap"; then
14129 READLINE_LIBS="-lreadline"
14130 else
14131 READLINE_LIBS="-lreadline -l$py_libtermcap"
14132 fi
14133 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014135/* end confdefs.h. */
14136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014137/* Override any GCC internal prototype to avoid an error.
14138 Use char because int might match the return type of a GCC
14139 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014140#ifdef __cplusplus
14141extern "C"
14142#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014143char readline ();
14144int
14145main ()
14146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014147return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014148 ;
14149 return 0;
14150}
14151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014152if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014153 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014155rm -f core conftest.err conftest.$ac_objext \
14156 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014157 if test $py_cv_lib_readline = yes; then
14158 break
14159 fi
14160done
14161# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14162#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014163if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14165$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14168$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014171
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014172fi
14173
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014174# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14176$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014177if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014179else
14180 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014181LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014183/* end confdefs.h. */
14184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014185/* Override any GCC internal prototype to avoid an error.
14186 Use char because int might match the return type of a GCC
14187 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014188#ifdef __cplusplus
14189extern "C"
14190#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014191char rl_callback_handler_install ();
14192int
14193main ()
14194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014196 ;
14197 return 0;
14198}
14199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014201 ac_cv_lib_readline_rl_callback_handler_install=yes
14202else
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014205rm -f core conftest.err conftest.$ac_objext \
14206 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014207LIBS=$ac_check_lib_save_LIBS
14208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14210$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014211if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014212
Matthias Kloseb9621712010-04-24 17:59:49 +000014213$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014214
14215fi
14216
14217
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014218# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014220/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014221#include <readline/readline.h>
14222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014223if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014224 have_readline=yes
14225else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014226 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014227
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014228fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014229rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014230if test $have_readline = yes
14231then
Matthias Kloseb9621712010-04-24 17:59:49 +000014232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014233/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014234#include <readline/readline.h>
14235
14236_ACEOF
14237if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014239
Matthias Kloseb9621712010-04-24 17:59:49 +000014240$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014241
14242fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014243rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014246/* end confdefs.h. */
14247#include <readline/readline.h>
14248
14249_ACEOF
14250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014251 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014252
Matthias Kloseb9621712010-04-24 17:59:49 +000014253$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014254
14255fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014256rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014257
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014258fi
14259
Martin v. Löwis0daad592001-09-30 21:09:59 +000014260# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14262$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014263if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014265else
Martin v. Löwis11437992002-04-12 09:54:03 +000014266 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014267LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014271/* Override any GCC internal prototype to avoid an error.
14272 Use char because int might match the return type of a GCC
14273 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014274#ifdef __cplusplus
14275extern "C"
14276#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014277char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014278int
14279main ()
14280{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014281return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014282 ;
14283 return 0;
14284}
14285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014288else
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014290fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014291rm -f core conftest.err conftest.$ac_objext \
14292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014293LIBS=$ac_check_lib_save_LIBS
14294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14296$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014297if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014300
Martin v. Löwis0daad592001-09-30 21:09:59 +000014301fi
14302
Michael W. Hudson54241132001-12-07 15:38:26 +000014303
Thomas Wouters89d996e2007-09-08 17:39:28 +000014304# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14306$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014309else
14310 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014311LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014313/* end confdefs.h. */
14314
14315/* Override any GCC internal prototype to avoid an error.
14316 Use char because int might match the return type of a GCC
14317 builtin and then its argument prototype would still apply. */
14318#ifdef __cplusplus
14319extern "C"
14320#endif
14321char rl_completion_display_matches_hook ();
14322int
14323main ()
14324{
14325return rl_completion_display_matches_hook ();
14326 ;
14327 return 0;
14328}
14329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014330if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014331 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14332else
Matthias Kloseb9621712010-04-24 17:59:49 +000014333 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014335rm -f core conftest.err conftest.$ac_objext \
14336 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014337LIBS=$ac_check_lib_save_LIBS
14338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14340$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014341if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014342
Matthias Kloseb9621712010-04-24 17:59:49 +000014343$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014344
14345fi
14346
14347
Martin v. Löwis0daad592001-09-30 21:09:59 +000014348# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14350$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014351if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014353else
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014355LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014359/* Override any GCC internal prototype to avoid an error.
14360 Use char because int might match the return type of a GCC
14361 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014362#ifdef __cplusplus
14363extern "C"
14364#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014365char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014366int
14367main ()
14368{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014370 ;
14371 return 0;
14372}
14373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014375 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014379rm -f core conftest.err conftest.$ac_objext \
14380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014381LIBS=$ac_check_lib_save_LIBS
14382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14384$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014385if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014386
Matthias Kloseb9621712010-04-24 17:59:49 +000014387$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014388
Guido van Rossum353ae582001-07-10 16:45:32 +000014389fi
14390
Jack Jansendd19cf82001-12-06 22:36:17 +000014391
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014392# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014394/* end confdefs.h. */
14395#include <readline/readline.h>
14396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014397if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014398 have_readline=yes
14399else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014400 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014401
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014402fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014403rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014404if test $have_readline = yes
14405then
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014407/* end confdefs.h. */
14408#include <readline/readline.h>
14409
14410_ACEOF
14411if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014413
Matthias Kloseb9621712010-04-24 17:59:49 +000014414$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014415
14416fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014417rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014418
14419fi
14420
Martin v. Löwis82bca632006-02-10 20:49:30 +000014421# End of readline checks: restore LIBS
14422LIBS=$LIBS_no_readline
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14425$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014426if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014431 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014434/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014435
14436int main()
14437{
14438 int val1 = nice(1);
14439 if (val1 != -1 && val1 == nice(2))
14440 exit(0);
14441 exit(1);
14442}
14443
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014445if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014446 ac_cv_broken_nice=yes
14447else
Matthias Kloseb9621712010-04-24 17:59:49 +000014448 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14451 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014452fi
14453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14457$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014458if test "$ac_cv_broken_nice" = yes
14459then
Martin v. Löwis11437992002-04-12 09:54:03 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014462
14463fi
14464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14466$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014471 ac_cv_broken_poll=no
14472else
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014474/* end confdefs.h. */
14475
14476#include <poll.h>
14477
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014478int main()
14479{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014480 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014482
14483 close (42);
14484
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014485 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014486 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014487 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014488 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014489 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014490 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014491 return 1;
14492}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014493
14494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014495if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014496 ac_cv_broken_poll=yes
14497else
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014499fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14501 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014504fi
14505
Matthias Kloseb9621712010-04-24 17:59:49 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14507$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014508if test "$ac_cv_broken_poll" = yes
14509then
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014512
14513fi
14514
Brett Cannon43802422005-02-10 20:48:03 +000014515# 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 +000014516# (which is not required by ISO C or UNIX spec) and/or if we support
14517# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014518ac_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 +000014519#include <$ac_cv_struct_tm>
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521"
Victor Stinnere0be4232011-10-25 13:06:09 +020014522if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014523
14524cat >>confdefs.h <<_ACEOF
14525#define HAVE_STRUCT_TM_TM_ZONE 1
14526_ACEOF
14527
14528
14529fi
14530
14531if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14532
Matthias Kloseb9621712010-04-24 17:59:49 +000014533$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014534
14535else
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14537"
Victor Stinnere0be4232011-10-25 13:06:09 +020014538if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014539 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540else
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014542fi
14543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014546_ACEOF
14547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14549$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014550if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014554/* end confdefs.h. */
14555#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556#if !HAVE_DECL_TZNAME
14557extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014558#endif
14559
14560int
14561main ()
14562{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014563return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014564 ;
14565 return 0;
14566}
14567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014568if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014569 ac_cv_var_tzname=yes
14570else
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014573rm -f core conftest.err conftest.$ac_objext \
14574 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014575fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14577$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014578 if test $ac_cv_var_tzname = yes; then
14579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014581
14582 fi
14583fi
14584
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014585
Martin v. Löwis1d459062005-03-14 21:23:33 +000014586# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14588$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014589if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014590 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014591else
14592
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014594 ac_cv_working_tzset=no
14595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014597/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014598
14599#include <stdlib.h>
14600#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014601#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014602
14603#if HAVE_TZNAME
14604extern char *tzname[];
14605#endif
14606
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014607int main()
14608{
Brett Cannon18367812003-09-19 00:59:16 +000014609 /* Note that we need to ensure that not only does tzset(3)
14610 do 'something' with localtime, but it works as documented
14611 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014612 This includes making sure that tzname is set properly if
14613 tm->tm_zone does not exist since it is the alternative way
14614 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014615
14616 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014617 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014618 */
14619
Martin v. Löwis1d459062005-03-14 21:23:33 +000014620 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014621 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14622
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014623 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014624 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014625 if (localtime(&groundhogday)->tm_hour != 0)
14626 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014627#if HAVE_TZNAME
14628 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14629 if (strcmp(tzname[0], "UTC") ||
14630 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14631 exit(1);
14632#endif
Brett Cannon18367812003-09-19 00:59:16 +000014633
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014634 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014635 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014636 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014637 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014638#if HAVE_TZNAME
14639 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14640 exit(1);
14641#endif
Brett Cannon18367812003-09-19 00:59:16 +000014642
14643 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14644 tzset();
14645 if (localtime(&groundhogday)->tm_hour != 11)
14646 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014647#if HAVE_TZNAME
14648 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14649 exit(1);
14650#endif
14651
14652#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014653 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14654 exit(1);
14655 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14656 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014657#endif
Brett Cannon18367812003-09-19 00:59:16 +000014658
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014659 exit(0);
14660}
14661
14662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014663if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014664 ac_cv_working_tzset=yes
14665else
Matthias Kloseb9621712010-04-24 17:59:49 +000014666 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014667fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014670fi
14671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672fi
14673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14675$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014676if test "$ac_cv_working_tzset" = yes
14677then
14678
Matthias Kloseb9621712010-04-24 17:59:49 +000014679$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014680
14681fi
14682
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014683# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14685$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014686if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014690/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014691#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014692int
14693main ()
14694{
14695
14696struct stat st;
14697st.st_mtim.tv_nsec = 1;
14698
14699 ;
14700 return 0;
14701}
14702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014704 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014705else
Matthias Kloseb9621712010-04-24 17:59:49 +000014706 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14709fi
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14712$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014713if test "$ac_cv_stat_tv_nsec" = yes
14714then
14715
Matthias Kloseb9621712010-04-24 17:59:49 +000014716$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014717
14718fi
14719
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014720# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14722$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014723if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014724 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014727/* end confdefs.h. */
14728#include <sys/stat.h>
14729int
14730main ()
14731{
14732
14733struct stat st;
14734st.st_mtimespec.tv_nsec = 1;
14735
14736 ;
14737 return 0;
14738}
14739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014741 ac_cv_stat_tv_nsec2=yes
14742else
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14746fi
14747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14749$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014750if test "$ac_cv_stat_tv_nsec2" = yes
14751then
14752
Matthias Kloseb9621712010-04-24 17:59:49 +000014753$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014754
14755fi
14756
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014757# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014758ac_save_cppflags="$CPPFLAGS"
14759CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020014760
14761for ac_header in curses.h ncurses.h
14762do :
14763 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14764ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14765if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14766 cat >>confdefs.h <<_ACEOF
14767#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14768_ACEOF
14769
14770fi
14771
14772done
14773
14774
14775# On Solaris, term.h requires curses.h
14776for ac_header in term.h
14777do :
14778 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14779#ifdef HAVE_CURSES_H
14780#include <curses.h>
14781#endif
14782
14783"
14784if test "x$ac_cv_header_term_h" = xyes; then :
14785 cat >>confdefs.h <<_ACEOF
14786#define HAVE_TERM_H 1
14787_ACEOF
14788
14789fi
14790
14791done
14792
14793
Jack Jansen666b1e72001-10-31 12:11:48 +000014794# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14796$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014797if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014799else
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014801/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014802#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014803int
14804main ()
14805{
Jack Jansen666b1e72001-10-31 12:11:48 +000014806
14807 int rtn;
14808 rtn = mvwdelch(0,0,0);
14809
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 ;
14811 return 0;
14812}
14813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014814if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014815 ac_cv_mvwdelch_is_expression=yes
14816else
Matthias Kloseb9621712010-04-24 17:59:49 +000014817 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14820fi
14821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14823$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014824
14825if test "$ac_cv_mvwdelch_is_expression" = yes
14826then
Martin v. Löwis11437992002-04-12 09:54:03 +000014827
Matthias Kloseb9621712010-04-24 17:59:49 +000014828$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014829
14830fi
14831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14833$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014834if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014836else
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014839#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014840int
14841main ()
14842{
Jack Jansen666b1e72001-10-31 12:11:48 +000014843
14844 WINDOW *w;
14845 w->_flags = 0;
14846
Martin v. Löwis11437992002-04-12 09:54:03 +000014847 ;
14848 return 0;
14849}
14850_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014851if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014852 ac_cv_window_has_flags=yes
14853else
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14857fi
14858
Matthias Kloseb9621712010-04-24 17:59:49 +000014859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14860$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014861
Jack Jansen666b1e72001-10-31 12:11:48 +000014862
14863if test "$ac_cv_window_has_flags" = yes
14864then
Martin v. Löwis11437992002-04-12 09:54:03 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014867
14868fi
14869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14871$as_echo_n "checking for is_term_resized... " >&6; }
14872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014873/* end confdefs.h. */
14874#include <curses.h>
14875int
14876main ()
14877{
14878void *x=is_term_resized
14879 ;
14880 return 0;
14881}
14882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014884
Matthias Kloseb9621712010-04-24 17:59:49 +000014885$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014886
Matthias Kloseb159a552010-04-25 21:00:44 +000014887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014888$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014889else
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14891$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014892
14893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14897$as_echo_n "checking for resize_term... " >&6; }
14898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014899/* end confdefs.h. */
14900#include <curses.h>
14901int
14902main ()
14903{
14904void *x=resize_term
14905 ;
14906 return 0;
14907}
14908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014909if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014910
Matthias Kloseb9621712010-04-24 17:59:49 +000014911$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014912
Matthias Kloseb159a552010-04-25 21:00:44 +000014913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014914$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014915else
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014918
14919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14921
Matthias Kloseb9621712010-04-24 17:59:49 +000014922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14923$as_echo_n "checking for resizeterm... " >&6; }
14924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014925/* end confdefs.h. */
14926#include <curses.h>
14927int
14928main ()
14929{
14930void *x=resizeterm
14931 ;
14932 return 0;
14933}
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014936
Matthias Kloseb9621712010-04-24 17:59:49 +000014937$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014938
Matthias Kloseb159a552010-04-25 21:00:44 +000014939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014940$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014941else
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14943$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014944
14945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014947# last curses configure check
14948CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014949
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14951$as_echo "$as_me: checking for device files" >&6;}
14952
14953if test "x$cross_compiling" = xyes; then
14954 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14956$as_echo_n "checking for /dev/ptmx... " >&6; }
14957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14958$as_echo "not set" >&6; }
14959 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14960 fi
14961 if test "${ac_cv_file__dev_ptc+set}" != set; then
14962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14963$as_echo_n "checking for /dev/ptc... " >&6; }
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14965$as_echo "not set" >&6; }
14966 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14967 fi
14968fi
14969
Matthias Kloseb9621712010-04-24 17:59:49 +000014970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14971$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014972if ${ac_cv_file__dev_ptmx+:} false; then :
14973 $as_echo_n "(cached) " >&6
14974else
14975 test "$cross_compiling" = yes &&
14976 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14977if test -r "/dev/ptmx"; then
14978 ac_cv_file__dev_ptmx=yes
14979else
14980 ac_cv_file__dev_ptmx=no
14981fi
14982fi
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14984$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14985if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014986
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014987fi
14988
14989if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014990
Matthias Kloseb9621712010-04-24 17:59:49 +000014991$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014992
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14995$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014996if ${ac_cv_file__dev_ptc+:} false; then :
14997 $as_echo_n "(cached) " >&6
14998else
14999 test "$cross_compiling" = yes &&
15000 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15001if test -r "/dev/ptc"; then
15002 ac_cv_file__dev_ptc=yes
15003else
15004 ac_cv_file__dev_ptc=no
15005fi
15006fi
15007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15008$as_echo "$ac_cv_file__dev_ptc" >&6; }
15009if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015010
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015011fi
15012
15013if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015014
Matthias Kloseb9621712010-04-24 17:59:49 +000015015$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015016
Neal Norwitz865400f2003-03-21 01:42:58 +000015017fi
15018
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015019if test "$have_long_long" = yes
15020then
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15022$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015023 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015024 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015027 ac_cv_have_long_long_format="cross -- assuming no"
15028 if test x$GCC = xyes; then
15029 save_CFLAGS=$CFLAGS
15030 CFLAGS="$CFLAGS -Werror -Wformat"
15031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15032/* end confdefs.h. */
15033
15034 #include <stdio.h>
15035 #include <stddef.h>
15036
15037int
15038main ()
15039{
15040
15041 char *buffer;
15042 sprintf(buffer, "%lld", (long long)123);
15043 sprintf(buffer, "%lld", (long long)-123);
15044 sprintf(buffer, "%llu", (unsigned long long)123);
15045
15046 ;
15047 return 0;
15048}
15049_ACEOF
15050if ac_fn_c_try_compile "$LINENO"; then :
15051 ac_cv_have_long_long_format=yes
15052
15053fi
15054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15055 CFLAGS=$save_CFLAGS
15056 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015057else
Matthias Kloseb9621712010-04-24 17:59:49 +000015058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015059/* end confdefs.h. */
15060
15061 #include <stdio.h>
15062 #include <stddef.h>
15063 #include <string.h>
15064
15065 #ifdef HAVE_SYS_TYPES_H
15066 #include <sys/types.h>
15067 #endif
15068
15069 int main()
15070 {
15071 char buffer[256];
15072
15073 if (sprintf(buffer, "%lld", (long long)123) < 0)
15074 return 1;
15075 if (strcmp(buffer, "123"))
15076 return 1;
15077
15078 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15079 return 1;
15080 if (strcmp(buffer, "-123"))
15081 return 1;
15082
15083 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15084 return 1;
15085 if (strcmp(buffer, "123"))
15086 return 1;
15087
15088 return 0;
15089 }
15090
15091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015092if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015093 ac_cv_have_long_long_format=yes
15094else
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015096fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015099fi
15100
15101
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015102fi
15103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15105$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015106fi
15107
Mark Dickinson89d7d412009-12-31 20:50:59 +000015108if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015109then
15110
Matthias Kloseb9621712010-04-24 17:59:49 +000015111$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015112
15113fi
15114
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015115if test $ac_sys_system = Darwin
15116then
15117 LIBS="$LIBS -framework CoreFoundation"
15118fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015119
Matthias Kloseb9621712010-04-24 17:59:49 +000015120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15121$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015122if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015123 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015126 ac_cv_have_size_t_format="cross -- assuming yes"
15127
Thomas Wouters477c8d52006-05-27 19:21:47 +000015128else
Matthias Kloseb9621712010-04-24 17:59:49 +000015129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015130/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015131
Thomas Wouters477c8d52006-05-27 19:21:47 +000015132#include <stdio.h>
15133#include <stddef.h>
15134#include <string.h>
15135
Christian Heimes2c181612007-12-17 20:04:13 +000015136#ifdef HAVE_SYS_TYPES_H
15137#include <sys/types.h>
15138#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015139
15140#ifdef HAVE_SSIZE_T
15141typedef ssize_t Py_ssize_t;
15142#elif SIZEOF_VOID_P == SIZEOF_LONG
15143typedef long Py_ssize_t;
15144#else
15145typedef int Py_ssize_t;
15146#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015147
Christian Heimes2c181612007-12-17 20:04:13 +000015148int main()
15149{
15150 char buffer[256];
15151
Thomas Wouters477c8d52006-05-27 19:21:47 +000015152 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15153 return 1;
15154
Thomas Wouters89f507f2006-12-13 04:49:30 +000015155 if (strcmp(buffer, "123"))
15156 return 1;
15157
15158 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15159 return 1;
15160
15161 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015162 return 1;
15163
15164 return 0;
15165}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015166
Thomas Wouters477c8d52006-05-27 19:21:47 +000015167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015169 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015175fi
15176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15179$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015180if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015183
15184fi
15185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015187#ifdef HAVE_SYS_TYPES_H
15188#include <sys/types.h>
15189#endif
15190#ifdef HAVE_SYS_SOCKET_H
15191#include <sys/socket.h>
15192#endif
15193
Matthias Kloseb9621712010-04-24 17:59:49 +000015194"
Victor Stinnere0be4232011-10-25 13:06:09 +020015195if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015196
Martin v. Löwis11437992002-04-12 09:54:03 +000015197else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015200
15201fi
15202
Michael W. Hudson54241132001-12-07 15:38:26 +000015203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15205$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015206if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015208else
Matthias Kloseb9621712010-04-24 17:59:49 +000015209 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015210 ac_cv_broken_mbstowcs=no
15211else
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015213/* end confdefs.h. */
15214
Stefan Krah19c21392012-11-22 23:47:32 +010015215#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015216#include<stdlib.h>
15217int main() {
15218 size_t len = -1;
15219 const char *str = "text";
15220 len = mbstowcs(NULL, str, 0);
15221 return (len != 4);
15222}
15223
15224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015225if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015226 ac_cv_broken_mbstowcs=no
15227else
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15231 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015232fi
15233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015234fi
15235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15237$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015238if test "$ac_cv_broken_mbstowcs" = yes
15239then
15240
Matthias Kloseb9621712010-04-24 17:59:49 +000015241$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015242
15243fi
15244
Antoine Pitroub52ec782009-01-25 16:34:23 +000015245# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15247$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015248
15249# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015251 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015252if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015253then
15254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15258$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015259fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015260if test "$withval" = no
15261then
15262
15263$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15266$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015267fi
15268
Antoine Pitrou042b1282010-08-13 21:15:58 +000015269else
15270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15271$as_echo "no value specified" >&6; }
15272fi
15273
Antoine Pitroub52ec782009-01-25 16:34:23 +000015274
Matthias Kloseb17289e2012-03-15 19:51:34 +010015275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15276$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15277if ${ac_cv_computed_gotos+:} false; then :
15278 $as_echo_n "(cached) " >&6
15279else
15280 if test "$cross_compiling" = yes; then :
15281 if test "${with_computed_gotos+set}" = set; then
15282 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15283 else
15284 ac_cv_computed_gotos=no
15285 fi
15286else
15287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15288/* end confdefs.h. */
15289
15290int main(int argc, char **argv)
15291{
15292 static void *targets[1] = { &&LABEL1 };
15293 goto LABEL2;
15294LABEL1:
15295 return 0;
15296LABEL2:
15297 goto *targets[0];
15298 return 1;
15299}
15300
15301_ACEOF
15302if ac_fn_c_try_run "$LINENO"; then :
15303 ac_cv_computed_gotos=yes
15304else
15305 ac_cv_computed_gotos=no
15306fi
15307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15308 conftest.$ac_objext conftest.beam conftest.$ac_ext
15309fi
15310
15311fi
15312
15313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15314$as_echo "$ac_cv_computed_gotos" >&6; }
15315case "$ac_cv_computed_gotos" in yes*)
15316
15317$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15318
15319esac
15320
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015321case $ac_sys_system in
15322AIX*)
15323
15324$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15325 ;;
15326esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015327
Michael W. Hudson54241132001-12-07 15:38:26 +000015328
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015329
15330
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015331for h in `(cd $srcdir;echo Python/thread_*.h)`
15332do
15333 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15334done
15335
Michael W. Hudson54241132001-12-07 15:38:26 +000015336
Neal Norwitzd24499d2005-12-18 21:36:39 +000015337SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15339$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015340for dir in $SRCDIRS; do
15341 if test ! -d $dir; then
15342 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015343 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015344done
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15346$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015347
Stefan Krah1919b7e2012-03-21 18:25:23 +010015348# Availability of -O2:
15349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15350$as_echo_n "checking for -O2... " >&6; }
15351saved_cflags="$CFLAGS"
15352CFLAGS="-O2"
15353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15354/* end confdefs.h. */
15355
15356int
15357main ()
15358{
15359
15360
15361 ;
15362 return 0;
15363}
15364_ACEOF
15365if ac_fn_c_try_compile "$LINENO"; then :
15366 have_O2=yes
15367else
15368 have_O2=no
15369fi
15370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15372$as_echo "$have_O2" >&6; }
15373CFLAGS="$saved_cflags"
15374
15375# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15376# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15378$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15379saved_cflags="$CFLAGS"
15380CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15381if test "$have_O2" = no; then
15382 CFLAGS=""
15383fi
15384if test "$cross_compiling" = yes; then :
15385 have_glibc_memmove_bug=undefined
15386else
15387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15388/* end confdefs.h. */
15389
15390#include <stdio.h>
15391#include <stdlib.h>
15392#include <string.h>
15393void foo(void *p, void *q) { memmove(p, q, 19); }
15394int main() {
15395 char a[32] = "123456789000000000";
15396 foo(&a[9], a);
15397 if (strcmp(a, "123456789123456789000000000") != 0)
15398 return 1;
15399 foo(a, &a[9]);
15400 if (strcmp(a, "123456789000000000") != 0)
15401 return 1;
15402 return 0;
15403}
15404
15405_ACEOF
15406if ac_fn_c_try_run "$LINENO"; then :
15407 have_glibc_memmove_bug=no
15408else
15409 have_glibc_memmove_bug=yes
15410fi
15411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15412 conftest.$ac_objext conftest.beam conftest.$ac_ext
15413fi
15414
15415CFLAGS="$saved_cflags"
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15417$as_echo "$have_glibc_memmove_bug" >&6; }
15418if test "$have_glibc_memmove_bug" = yes; then
15419
15420$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15421
15422fi
15423
15424if test "$have_gcc_asm_for_x87" = yes; then
15425 # Some versions of gcc miscompile inline asm:
15426 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15427 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15428 case $CC in
15429 *gcc*)
15430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15431$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15432 saved_cflags="$CFLAGS"
15433 CFLAGS="-O2"
15434 if test "$cross_compiling" = yes; then :
15435 have_ipa_pure_const_bug=undefined
15436else
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438/* end confdefs.h. */
15439
15440 __attribute__((noinline)) int
15441 foo(int *p) {
15442 int r;
15443 asm ( "movl \$6, (%1)\n\t"
15444 "xorl %0, %0\n\t"
15445 : "=r" (r) : "r" (p) : "memory"
15446 );
15447 return r;
15448 }
15449 int main() {
15450 int p = 8;
15451 if ((foo(&p) ? : p) != 6)
15452 return 1;
15453 return 0;
15454 }
15455
15456_ACEOF
15457if ac_fn_c_try_run "$LINENO"; then :
15458 have_ipa_pure_const_bug=no
15459else
15460 have_ipa_pure_const_bug=yes
15461fi
15462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15463 conftest.$ac_objext conftest.beam conftest.$ac_ext
15464fi
15465
15466 CFLAGS="$saved_cflags"
15467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15468$as_echo "$have_ipa_pure_const_bug" >&6; }
15469 if test "$have_ipa_pure_const_bug" = yes; then
15470
15471$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15472
15473 fi
15474 ;;
15475 esac
15476fi
15477
Ned Deily322f5ba2013-11-21 23:01:59 -080015478# ensurepip option
15479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15480$as_echo_n "checking for ensurepip... " >&6; }
15481
15482# Check whether --with-ensurepip was given.
15483if test "${with_ensurepip+set}" = set; then :
15484 withval=$with_ensurepip;
15485else
15486 with_ensurepip=upgrade
15487fi
15488
15489case $with_ensurepip in #(
15490 yes|upgrade) :
15491 ENSUREPIP=upgrade ;; #(
15492 install) :
15493 ENSUREPIP=install ;; #(
15494 no) :
15495 ENSUREPIP=no ;; #(
15496 *) :
15497 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15498esac
15499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15500$as_echo "$ENSUREPIP" >&6; }
15501
15502
Guido van Rossum627b2d71993-12-24 10:39:16 +000015503# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015504ac_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 +000015505
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015506ac_config_files="$ac_config_files Modules/ld_so_aix"
15507
Martin v. Löwis11437992002-04-12 09:54:03 +000015508cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015509# This file is a shell script that caches the results of configure
15510# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015511# scripts and configure runs, see configure's option --config-cache.
15512# It is not useful on other systems. If it contains results you don't
15513# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015514#
Martin v. Löwis11437992002-04-12 09:54:03 +000015515# config.status only pays attention to the cache file if you give it
15516# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015517#
Skip Montanaro6dead952003-09-25 14:50:04 +000015518# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015519# loading this file, other *unset* `ac_cv_foo' will be assigned the
15520# following values.
15521
15522_ACEOF
15523
Guido van Rossumf78abae1997-01-21 22:02:36 +000015524# The following way of writing the cache mishandles newlines in values,
15525# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015527# Ultrix sh set writes to stderr and can't be redirected directly,
15528# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529(
15530 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15531 eval ac_val=\$$ac_var
15532 case $ac_val in #(
15533 *${as_nl}*)
15534 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15536$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 esac
15538 case $ac_var in #(
15539 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15541 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542 esac ;;
15543 esac
15544 done
15545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15548 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 # `set' does not quote correctly, so add quotes: double-quote
15550 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015551 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015552 "s/'/'\\\\''/g;
15553 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 *)
15556 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015557 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559 esac |
15560 sort
15561) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015566 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15567 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15569 :end' >>confcache
15570if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15571 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015572 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015573 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15574$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015575 if test ! -f "$cache_file" || test -h "$cache_file"; then
15576 cat confcache >"$cache_file"
15577 else
15578 case $cache_file in #(
15579 */* | ?:*)
15580 mv -f confcache "$cache_file"$$ &&
15581 mv -f "$cache_file"$$ "$cache_file" ;; #(
15582 *)
15583 mv -f confcache "$cache_file" ;;
15584 esac
15585 fi
15586 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015587 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15589$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015590 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015591fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015592rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015594test "x$prefix" = xNONE && prefix=$ac_default_prefix
15595# Let make expand exec_prefix.
15596test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015598DEFS=-DHAVE_CONFIG_H
15599
Skip Montanaro6dead952003-09-25 14:50:04 +000015600ac_libobjs=
15601ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015602U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015603for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15604 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15608 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15610 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015611done
15612LIBOBJS=$ac_libobjs
15613
15614LTLIBOBJS=$ac_ltlibobjs
15615
15616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618
Victor Stinnere0be4232011-10-25 13:06:09 +020015619: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015620ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015621ac_clean_files_save=$ac_clean_files
15622ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015623{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15624$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15625as_write_fail=0
15626cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015627#! $SHELL
15628# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015629# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015630# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015631# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015634ac_cs_recheck=false
15635ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637SHELL=\${CONFIG_SHELL-$SHELL}
15638export SHELL
15639_ASEOF
15640cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15641## -------------------- ##
15642## M4sh Initialization. ##
15643## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015645# Be more Bourne compatible
15646DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015647if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015648 emulate sh
15649 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015651 # is contrary to our usage. Disable this feature.
15652 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015653 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 case `(set -o) 2>/dev/null` in #(
15656 *posix*) :
15657 set -o posix ;; #(
15658 *) :
15659 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015661fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015662
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664as_nl='
15665'
15666export as_nl
15667# Printing a long string crashes Solaris 7 /usr/bin/printf.
15668as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15669as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15670as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15671# Prefer a ksh shell builtin over an external printf program on Solaris,
15672# but without wasting forks for bash or zsh.
15673if test -z "$BASH_VERSION$ZSH_VERSION" \
15674 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15675 as_echo='print -r --'
15676 as_echo_n='print -rn --'
15677elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15678 as_echo='printf %s\n'
15679 as_echo_n='printf %s'
15680else
15681 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15682 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15683 as_echo_n='/usr/ucb/echo -n'
15684 else
15685 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15686 as_echo_n_body='eval
15687 arg=$1;
15688 case $arg in #(
15689 *"$as_nl"*)
15690 expr "X$arg" : "X\\(.*\\)$as_nl";
15691 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15692 esac;
15693 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15694 '
15695 export as_echo_n_body
15696 as_echo_n='sh -c $as_echo_n_body as_echo'
15697 fi
15698 export as_echo_body
15699 as_echo='sh -c $as_echo_body as_echo'
15700fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702# The user is always right.
15703if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 PATH_SEPARATOR=:
15705 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15706 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15707 PATH_SEPARATOR=';'
15708 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711
15712# IFS
15713# We need space, tab and new line, in precisely that order. Quoting is
15714# there to prevent editors from complaining about space-tab.
15715# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15716# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717IFS=" "" $as_nl"
15718
15719# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015720as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015721case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015722 *[\\/]* ) as_myself=$0 ;;
15723 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015724for as_dir in $PATH
15725do
15726 IFS=$as_save_IFS
15727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15729 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015730IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015732 ;;
15733esac
15734# We did not find ourselves, most probably we were run as `sh COMMAND'
15735# in which case we are not to be found in the path.
15736if test "x$as_myself" = x; then
15737 as_myself=$0
15738fi
15739if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15741 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015742fi
15743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744# Unset variables that we do not need and which cause bugs (e.g. in
15745# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15746# suppresses any "Segmentation fault" message there. '((' could
15747# trigger a bug in pdksh 5.2.14.
15748for as_var in BASH_ENV ENV MAIL MAILPATH
15749do eval test x\${$as_var+set} = xset \
15750 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015751done
15752PS1='$ '
15753PS2='> '
15754PS4='+ '
15755
15756# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015757LC_ALL=C
15758export LC_ALL
15759LANGUAGE=C
15760export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762# CDPATH.
15763(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15764
15765
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015766# as_fn_error STATUS ERROR [LINENO LOG_FD]
15767# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015768# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15769# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015770# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015771as_fn_error ()
15772{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015773 as_status=$1; test $as_status -eq 0 && as_status=1
15774 if test "$4"; then
15775 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15776 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015778 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 as_fn_exit $as_status
15780} # as_fn_error
15781
15782
15783# as_fn_set_status STATUS
15784# -----------------------
15785# Set $? to STATUS, without forking.
15786as_fn_set_status ()
15787{
15788 return $1
15789} # as_fn_set_status
15790
15791# as_fn_exit STATUS
15792# -----------------
15793# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15794as_fn_exit ()
15795{
15796 set +e
15797 as_fn_set_status $1
15798 exit $1
15799} # as_fn_exit
15800
15801# as_fn_unset VAR
15802# ---------------
15803# Portably unset VAR.
15804as_fn_unset ()
15805{
15806 { eval $1=; unset $1;}
15807}
15808as_unset=as_fn_unset
15809# as_fn_append VAR VALUE
15810# ----------------------
15811# Append the text in VALUE to the end of the definition contained in VAR. Take
15812# advantage of any shell optimizations that allow amortized linear growth over
15813# repeated appends, instead of the typical quadratic growth present in naive
15814# implementations.
15815if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15816 eval 'as_fn_append ()
15817 {
15818 eval $1+=\$2
15819 }'
15820else
15821 as_fn_append ()
15822 {
15823 eval $1=\$$1\$2
15824 }
15825fi # as_fn_append
15826
15827# as_fn_arith ARG...
15828# ------------------
15829# Perform arithmetic evaluation on the ARGs, and store the result in the
15830# global $as_val. Take advantage of shells that can avoid forks. The arguments
15831# must be portable across $(()) and expr.
15832if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15833 eval 'as_fn_arith ()
15834 {
15835 as_val=$(( $* ))
15836 }'
15837else
15838 as_fn_arith ()
15839 {
15840 as_val=`expr "$@" || test $? -eq 1`
15841 }
15842fi # as_fn_arith
15843
15844
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015845if expr a : '\(a\)' >/dev/null 2>&1 &&
15846 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15847 as_expr=expr
15848else
15849 as_expr=false
15850fi
15851
15852if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15853 as_basename=basename
15854else
15855 as_basename=false
15856fi
15857
Matthias Kloseb9621712010-04-24 17:59:49 +000015858if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15859 as_dirname=dirname
15860else
15861 as_dirname=false
15862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864as_me=`$as_basename -- "$0" ||
15865$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15866 X"$0" : 'X\(//\)$' \| \
15867 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015868$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015869 sed '/^.*\/\([^/][^/]*\)\/*$/{
15870 s//\1/
15871 q
15872 }
15873 /^X\/\(\/\/\)$/{
15874 s//\1/
15875 q
15876 }
15877 /^X\/\(\/\).*/{
15878 s//\1/
15879 q
15880 }
15881 s/.*/./; q'`
15882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883# Avoid depending upon Character Ranges.
15884as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15885as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15886as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15887as_cr_digits='0123456789'
15888as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889
15890ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015891case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015892-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015895 xy) ECHO_C='\c';;
15896 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15897 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 esac;;
15899*)
15900 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015901esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015902
Martin v. Löwis11437992002-04-12 09:54:03 +000015903rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015904if test -d conf$$.dir; then
15905 rm -f conf$$.dir/conf$$.file
15906else
15907 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015910if (echo >conf$$.file) 2>/dev/null; then
15911 if ln -s conf$$.file conf$$ 2>/dev/null; then
15912 as_ln_s='ln -s'
15913 # ... but there are two gotchas:
15914 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15915 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015916 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015918 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 elif ln conf$$.file conf$$ 2>/dev/null; then
15920 as_ln_s=ln
15921 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015922 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015923 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015924else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015925 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15928rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015929
Matthias Kloseb9621712010-04-24 17:59:49 +000015930
15931# as_fn_mkdir_p
15932# -------------
15933# Create "$as_dir" as a directory, including parents if necessary.
15934as_fn_mkdir_p ()
15935{
15936
15937 case $as_dir in #(
15938 -*) as_dir=./$as_dir;;
15939 esac
15940 test -d "$as_dir" || eval $as_mkdir_p || {
15941 as_dirs=
15942 while :; do
15943 case $as_dir in #(
15944 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15945 *) as_qdir=$as_dir;;
15946 esac
15947 as_dirs="'$as_qdir' $as_dirs"
15948 as_dir=`$as_dirname -- "$as_dir" ||
15949$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15950 X"$as_dir" : 'X\(//\)[^/]' \| \
15951 X"$as_dir" : 'X\(//\)$' \| \
15952 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15953$as_echo X"$as_dir" |
15954 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15955 s//\1/
15956 q
15957 }
15958 /^X\(\/\/\)[^/].*/{
15959 s//\1/
15960 q
15961 }
15962 /^X\(\/\/\)$/{
15963 s//\1/
15964 q
15965 }
15966 /^X\(\/\).*/{
15967 s//\1/
15968 q
15969 }
15970 s/.*/./; q'`
15971 test -d "$as_dir" && break
15972 done
15973 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015974 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015975
15976
15977} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015978if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015980else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015981 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015982 as_mkdir_p=false
15983fi
15984
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015985
15986# as_fn_executable_p FILE
15987# -----------------------
15988# Test if FILE is an executable regular file.
15989as_fn_executable_p ()
15990{
15991 test -f "$1" && test -x "$1"
15992} # as_fn_executable_p
15993as_test_x='test -x'
15994as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015995
15996# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015997as_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 +000015998
15999# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016000as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
16002
Martin v. Löwis11437992002-04-12 09:54:03 +000016003exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016004## ----------------------------------- ##
16005## Main body of $CONFIG_STATUS script. ##
16006## ----------------------------------- ##
16007_ASEOF
16008test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16011# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016012# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013# values after options handling.
16014ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020016015This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016016generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016017
16018 CONFIG_FILES = $CONFIG_FILES
16019 CONFIG_HEADERS = $CONFIG_HEADERS
16020 CONFIG_LINKS = $CONFIG_LINKS
16021 CONFIG_COMMANDS = $CONFIG_COMMANDS
16022 $ $0 $@
16023
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016024on `(hostname || uname -n) 2>/dev/null | sed 1q`
16025"
16026
Martin v. Löwis11437992002-04-12 09:54:03 +000016027_ACEOF
16028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029case $ac_config_files in *"
16030"*) set x $ac_config_files; shift; ac_config_files=$*;;
16031esac
16032
16033case $ac_config_headers in *"
16034"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16035esac
16036
16037
16038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016039# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016040config_files="$ac_config_files"
16041config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016043_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016046ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016047\`$as_me' instantiates files and other configuration actions
16048from templates according to the current configuration. Unless the files
16049and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016052
16053 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016055 --config print configuration, then exit
16056 -q, --quiet, --silent
16057 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 -d, --debug don't remove temporary files
16059 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016060 --file=FILE[:TEMPLATE]
16061 instantiate the configuration file FILE
16062 --header=FILE[:TEMPLATE]
16063 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016064
16065Configuration files:
16066$config_files
16067
16068Configuration headers:
16069$config_headers
16070
Matthias Kloseb9621712010-04-24 17:59:49 +000016071Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016074cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16075ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016076ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020016077python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016078configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016079 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016080
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016081Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016082This config.status script is free software; the Free Software Foundation
16083gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084
16085ac_pwd='$ac_pwd'
16086srcdir='$srcdir'
16087INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016088MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016089test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016090_ACEOF
16091
Matthias Kloseb9621712010-04-24 17:59:49 +000016092cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16093# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016094ac_need_defaults=:
16095while test $# != 0
16096do
16097 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016098 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16100 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016101 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016102 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016103 --*=)
16104 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16105 ac_optarg=
16106 ac_shift=:
16107 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016109 ac_option=$1
16110 ac_optarg=$2
16111 ac_shift=shift
16112 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016113 esac
16114
Skip Montanaro6dead952003-09-25 14:50:04 +000016115 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016116 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016117 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16118 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016120 $as_echo "$ac_cs_version"; exit ;;
16121 --config | --confi | --conf | --con | --co | --c )
16122 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016123 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 debug=: ;;
16125 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016126 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 case $ac_optarg in
16128 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016129 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 esac
16131 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 ac_need_defaults=false;;
16133 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016134 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016135 case $ac_optarg in
16136 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16137 esac
16138 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016140 --he | --h)
16141 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016142 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016143Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016144 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016145 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16147 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16148 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016149
16150 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016151 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016152Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016155 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
16157 esac
16158 shift
16159done
16160
Skip Montanaro6dead952003-09-25 14:50:04 +000016161ac_configure_extra_args=
16162
16163if $ac_cs_silent; then
16164 exec 6>/dev/null
16165 ac_configure_extra_args="$ac_configure_extra_args --silent"
16166fi
16167
16168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016169cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016170if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016171 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 shift
16173 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16174 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016175 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016176 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016177fi
16178
Martin v. Löwis11437992002-04-12 09:54:03 +000016179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016181exec 5>>config.log
16182{
16183 echo
16184 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16185## Running $as_me. ##
16186_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016187 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016188} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016191cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016192_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016193
Matthias Kloseb9621712010-04-24 17:59:49 +000016194cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016195
16196# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016197for ac_config_target in $ac_config_targets
16198do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 case $ac_config_target in
16200 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16201 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16202 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016203 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16204 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16206 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016207 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016208 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016209 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016210
Victor Stinnere0be4232011-10-25 13:06:09 +020016211 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 esac
16213done
16214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215
Martin v. Löwis11437992002-04-12 09:54:03 +000016216# If the user did not use the arguments to specify the items to instantiate,
16217# then the envvar interface is used. Set only those that are not.
16218# We use the long form for the default assignment because of an extremely
16219# bizarre bug on SunOS 4.1.3.
16220if $ac_need_defaults; then
16221 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16222 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16223fi
16224
Skip Montanaro6dead952003-09-25 14:50:04 +000016225# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016227# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228# Hook for its removal unless debugging.
16229# Note that there is a small window in which the directory will not be cleaned:
16230# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016231$debug ||
16232{
Victor Stinnere0be4232011-10-25 13:06:09 +020016233 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016234 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020016235 : "${ac_tmp:=$tmp}"
16236 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000016238 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016239}
Martin v. Löwis11437992002-04-12 09:54:03 +000016240# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016241
Martin v. Löwis11437992002-04-12 09:54:03 +000016242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016244 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016245} ||
16246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016247 tmp=./conf$$-$RANDOM
16248 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016249} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016250ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016251
Matthias Kloseb9621712010-04-24 17:59:49 +000016252# Set up the scripts for CONFIG_FILES section.
16253# No need to generate them if there are no CONFIG_FILES.
16254# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016256
Matthias Kloseb9621712010-04-24 17:59:49 +000016257
16258ac_cr=`echo X | tr X '\015'`
16259# On cygwin, bash can eat \r inside `` if the user requested igncr.
16260# But we know of no other shell where ac_cr would be empty at this
16261# point, so we can use a bashism as a fallback.
16262if test "x$ac_cr" = x; then
16263 eval ac_cr=\$\'\\r\'
16264fi
16265ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16266if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016267 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000016268else
16269 ac_cs_awk_cr=$ac_cr
16270fi
16271
Victor Stinnere0be4232011-10-25 13:06:09 +020016272echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016273_ACEOF
16274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275
Matthias Kloseb9621712010-04-24 17:59:49 +000016276{
16277 echo "cat >conf$$subs.awk <<_ACEOF" &&
16278 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16279 echo "_ACEOF"
16280} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016281 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16282ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283ac_delim='%!_!# '
16284for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000016285 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016286 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016287
Matthias Kloseb9621712010-04-24 17:59:49 +000016288 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16289 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 break
16291 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016292 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016293 else
16294 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016296done
Matthias Kloseb9621712010-04-24 17:59:49 +000016297rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298
Matthias Kloseb9621712010-04-24 17:59:49 +000016299cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020016300cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016302sed -n '
16303h
16304s/^/S["/; s/!.*/"]=/
16305p
16306g
16307s/^[^!]*!//
16308:repl
16309t repl
16310s/'"$ac_delim"'$//
16311t delim
16312:nl
16313h
16314s/\(.\{148\}\)..*/\1/
16315t more1
16316s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16317p
16318n
16319b repl
16320:more1
16321s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16322p
16323g
16324s/.\{148\}//
16325t nl
16326:delim
16327h
16328s/\(.\{148\}\)..*/\1/
16329t more2
16330s/["\\]/\\&/g; s/^/"/; s/$/"/
16331p
16332b
16333:more2
16334s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16335p
16336g
16337s/.\{148\}//
16338t delim
16339' <conf$$subs.awk | sed '
16340/^[^""]/{
16341 N
16342 s/\n//
16343}
16344' >>$CONFIG_STATUS || ac_write_fail=1
16345rm -f conf$$subs.awk
16346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16347_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016348cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016349 for (key in S) S_is_set[key] = 1
16350 FS = ""
16351
16352}
16353{
16354 line = $ 0
16355 nfields = split(line, field, "@")
16356 substed = 0
16357 len = length(field[1])
16358 for (i = 2; i < nfields; i++) {
16359 key = field[i]
16360 keylen = length(key)
16361 if (S_is_set[key]) {
16362 value = S[key]
16363 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16364 len += length(value) + length(field[++i])
16365 substed = 1
16366 } else
16367 len += 1 + keylen
16368 }
16369
16370 print line
16371}
16372
16373_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016375cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16376if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16377 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16378else
16379 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016380fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016382_ACEOF
16383
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016384# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16385# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386# trailing colons and then remove the whole line if VPATH becomes empty
16387# (actually we leave an empty line to preserve line numbers).
16388if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016389 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16390h
16391s///
16392s/^/:/
16393s/[ ]*$/:/
16394s/:\$(srcdir):/:/g
16395s/:\${srcdir}:/:/g
16396s/:@srcdir@:/:/g
16397s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016398s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016399x
16400s/\(=[ ]*\).*/\1/
16401G
16402s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016403s/^[^=]*=[ ]*$//
16404}'
16405fi
16406
Matthias Kloseb9621712010-04-24 17:59:49 +000016407cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016408fi # test -n "$CONFIG_FILES"
16409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410# Set up the scripts for CONFIG_HEADERS section.
16411# No need to generate them if there are no CONFIG_HEADERS.
16412# This happens for instance with `./config.status Makefile'.
16413if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016414cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016415BEGIN {
16416_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418# Transform confdefs.h into an awk script `defines.awk', embedded as
16419# here-document in config.status, that substitutes the proper values into
16420# config.h.in to produce config.h.
16421
16422# Create a delimiter string that does not exist in confdefs.h, to ease
16423# handling of long lines.
16424ac_delim='%!_!# '
16425for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016426 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16427 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016428 break
16429 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016430 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 else
16432 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16433 fi
16434done
16435
16436# For the awk script, D is an array of macro values keyed by name,
16437# likewise P contains macro parameters if any. Preserve backslash
16438# newline sequences.
16439
16440ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16441sed -n '
16442s/.\{148\}/&'"$ac_delim"'/g
16443t rset
16444:rset
16445s/^[ ]*#[ ]*define[ ][ ]*/ /
16446t def
16447d
16448:def
16449s/\\$//
16450t bsnl
16451s/["\\]/\\&/g
16452s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16453D["\1"]=" \3"/p
16454s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16455d
16456:bsnl
16457s/["\\]/\\&/g
16458s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16459D["\1"]=" \3\\\\\\n"\\/p
16460t cont
16461s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16462t cont
16463d
16464:cont
16465n
16466s/.\{148\}/&'"$ac_delim"'/g
16467t clear
16468:clear
16469s/\\$//
16470t bsnlc
16471s/["\\]/\\&/g; s/^/"/; s/$/"/p
16472d
16473:bsnlc
16474s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16475b cont
16476' <confdefs.h | sed '
16477s/'"$ac_delim"'/"\\\
16478"/g' >>$CONFIG_STATUS || ac_write_fail=1
16479
16480cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16481 for (key in D) D_is_set[key] = 1
16482 FS = ""
16483}
16484/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16485 line = \$ 0
16486 split(line, arg, " ")
16487 if (arg[1] == "#") {
16488 defundef = arg[2]
16489 mac1 = arg[3]
16490 } else {
16491 defundef = substr(arg[1], 2)
16492 mac1 = arg[2]
16493 }
16494 split(mac1, mac2, "(") #)
16495 macro = mac2[1]
16496 prefix = substr(line, 1, index(line, defundef) - 1)
16497 if (D_is_set[macro]) {
16498 # Preserve the white space surrounding the "#".
16499 print prefix "define", macro P[macro] D[macro]
16500 next
16501 } else {
16502 # Replace #undef with comments. This is necessary, for example,
16503 # in the case of _POSIX_SOURCE, which is predefined and required
16504 # on some systems where configure will not decide to define it.
16505 if (defundef == "undef") {
16506 print "/*", prefix defundef, macro, "*/"
16507 next
16508 }
16509 }
16510}
16511{ print }
16512_ACAWK
16513_ACEOF
16514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016515 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016516fi # test -n "$CONFIG_HEADERS"
16517
16518
16519eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16520shift
16521for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522do
16523 case $ac_tag in
16524 :[FHLC]) ac_mode=$ac_tag; continue;;
16525 esac
16526 case $ac_mode$ac_tag in
16527 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016528 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 :[FH]-) ac_tag=-:-;;
16530 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16531 esac
16532 ac_save_IFS=$IFS
16533 IFS=:
16534 set x $ac_tag
16535 IFS=$ac_save_IFS
16536 shift
16537 ac_file=$1
16538 shift
16539
16540 case $ac_mode in
16541 :L) ac_source=$1;;
16542 :[FH])
16543 ac_file_inputs=
16544 for ac_f
16545 do
16546 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016547 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548 *) # Look for the file first in the build tree, then in the source tree
16549 # (if the path is not absolute). The absolute path cannot be DOS-style,
16550 # because $ac_f cannot contain `:'.
16551 test -f "$ac_f" ||
16552 case $ac_f in
16553 [\\/$]*) false;;
16554 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16555 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016556 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016558 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16559 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560 done
16561
16562 # Let's still pretend it is `configure' which instantiates (i.e., don't
16563 # use $as_me), people would be surprised to read:
16564 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016565 configure_input='Generated from '`
16566 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16567 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 if test x"$ac_file" != x-; then
16569 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016570 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16571$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016572 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016573 # Neutralize special characters interpreted by sed in replacement strings.
16574 case $configure_input in #(
16575 *\&* | *\|* | *\\* )
16576 ac_sed_conf_input=`$as_echo "$configure_input" |
16577 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16578 *) ac_sed_conf_input=$configure_input;;
16579 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580
16581 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016582 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16583 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584 esac
16585 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016586 esac
16587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016588 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016589$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016590 X"$ac_file" : 'X\(//\)[^/]' \| \
16591 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016592 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016593$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016594 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16595 s//\1/
16596 q
16597 }
16598 /^X\(\/\/\)[^/].*/{
16599 s//\1/
16600 q
16601 }
16602 /^X\(\/\/\)$/{
16603 s//\1/
16604 q
16605 }
16606 /^X\(\/\).*/{
16607 s//\1/
16608 q
16609 }
16610 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016612 ac_builddir=.
16613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614case "$ac_dir" in
16615.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16616*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016617 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016619 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620 case $ac_top_builddir_sub in
16621 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16622 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16623 esac ;;
16624esac
16625ac_abs_top_builddir=$ac_pwd
16626ac_abs_builddir=$ac_pwd$ac_dir_suffix
16627# for backward compatibility:
16628ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016629
16630case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016633 ac_top_srcdir=$ac_top_builddir_sub
16634 ac_abs_top_srcdir=$ac_pwd ;;
16635 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016636 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637 ac_top_srcdir=$srcdir
16638 ac_abs_top_srcdir=$srcdir ;;
16639 *) # Relative name.
16640 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16641 ac_top_srcdir=$ac_top_build_prefix$srcdir
16642 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016643esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016645
Martin v. Löwis11437992002-04-12 09:54:03 +000016646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647 case $ac_mode in
16648 :F)
16649 #
16650 # CONFIG_FILE
16651 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016652
16653 case $INSTALL in
16654 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016657 ac_MKDIR_P=$MKDIR_P
16658 case $MKDIR_P in
16659 [\\/$]* | ?:[\\/]* ) ;;
16660 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16661 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016662_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663
Matthias Kloseb9621712010-04-24 17:59:49 +000016664cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665# If the template does not know about datarootdir, expand it.
16666# FIXME: This hack should be removed a few years after 2.60.
16667ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016668ac_sed_dataroot='
16669/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 p
16671 q
16672}
16673/@datadir@/p
16674/@docdir@/p
16675/@infodir@/p
16676/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016677/@mandir@/p'
16678case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016679*datarootdir*) ac_datarootdir_seen=yes;;
16680*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16682$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016684cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685 ac_datarootdir_hack='
16686 s&@datadir@&$datadir&g
16687 s&@docdir@&$docdir&g
16688 s&@infodir@&$infodir&g
16689 s&@localedir@&$localedir&g
16690 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016691 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692esac
16693_ACEOF
16694
16695# Neutralize VPATH when `$srcdir' = `.'.
16696# Shell code in configure.ac might set extrasub.
16697# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016698cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16699ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016700$extrasub
16701_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016702cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016703:t
16704/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016705s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016707s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016708s&@srcdir@&$ac_srcdir&;t t
16709s&@abs_srcdir@&$ac_abs_srcdir&;t t
16710s&@top_srcdir@&$ac_top_srcdir&;t t
16711s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16712s&@builddir@&$ac_builddir&;t t
16713s&@abs_builddir@&$ac_abs_builddir&;t t
16714s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16715s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016716s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016717$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016718"
Victor Stinnere0be4232011-10-25 13:06:09 +020016719eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16720 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016723 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16724 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16725 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016727which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016728$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016729which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016730
Victor Stinnere0be4232011-10-25 13:06:09 +020016731 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016732 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016733 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16734 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016735 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016736 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016737 ;;
16738 :H)
16739 #
16740 # CONFIG_HEADER
16741 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016743 {
16744 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016745 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16746 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016747 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016748 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016749 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16750$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016751 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016752 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016753 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016754 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016755 fi
16756 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016757 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016758 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016759 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016762
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763
16764 esac
16765
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016766
16767 case $ac_file$ac_mode in
16768 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16769
16770 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771done # for ac_tag
16772
Guido van Rossum627b2d71993-12-24 10:39:16 +000016773
Matthias Kloseb9621712010-04-24 17:59:49 +000016774as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016775_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016776ac_clean_files=$ac_clean_files_save
16777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016779 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016780
Martin v. Löwis11437992002-04-12 09:54:03 +000016781
16782# configure is writing to config.log, and then calls config.status.
16783# config.status does its own redirection, appending to config.log.
16784# Unfortunately, on DOS this fails, as config.log is still kept open
16785# by configure, so config.status won't be able to write to it; its
16786# output is simply discarded. So we exec the FD to /dev/null,
16787# effectively closing config.log, so it can be properly (re)opened and
16788# appended to by config.status. When coming back to configure, we
16789# need to make the FD available again.
16790if test "$no_create" != yes; then
16791 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016792 ac_config_status_args=
16793 test "$silent" = yes &&
16794 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016796 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 exec 5>>config.log
16798 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16799 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016800 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016801fi
16802if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16804$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016805fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016806
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016807
Christian Heimes75ed8902013-11-20 01:11:18 +010016808echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016809if test ! -f Modules/Setup
16810then
16811 cp $srcdir/Modules/Setup.dist Modules/Setup
16812fi
16813
Christian Heimes75ed8902013-11-20 01:11:18 +010016814echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016815if test ! -f Modules/Setup.local
16816then
16817 echo "# Edit this file for local setup changes" >Modules/Setup.local
16818fi
16819
Christian Heimes75ed8902013-11-20 01:11:18 +010016820echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016821$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16822 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016823 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016824mv config.c Modules