blob: b881602e46d647e91181b2a77fdcbd4f1f20f521 [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 Lagerwall646eb1e2012-10-29 17:35:57 +00003# Generated by GNU Autoconf 2.69 for python 3.3.
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 Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
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
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200667PYTHON
668ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200669ac_ct_READELF
670READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000671ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000673AR
674RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000675USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000676GNULD
677LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000678LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000682PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000683BLDLIBRARY
684DLLLIBRARY
685LDLIBRARY
686LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100687MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BUILDEXEEXT
689EGREP
690GREP
691CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200692NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200706_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000707MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000708FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709FRAMEWORKUNIXTOOLSPREFIX
710FRAMEWORKALTINSTALLLAST
711FRAMEWORKALTINSTALLFIRST
712FRAMEWORKINSTALLLAST
713FRAMEWORKINSTALLFIRST
714PYTHONFRAMEWORKINSTALLDIR
715PYTHONFRAMEWORKPREFIX
716PYTHONFRAMEWORKDIR
717PYTHONFRAMEWORKIDENTIFIER
718PYTHONFRAMEWORK
719LIPO_32BIT_FLAGS
720ARCH_RUN_32BIT
721UNIVERSALSDK
722CONFIG_ARGS
723SOVERSION
724VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100726host_os
727host_vendor
728host_cpu
729host
730build_os
731build_vendor
732build_cpu
733build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500734HAS_HG
735HGBRANCH
736HGTAG
737HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400738BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758localstatedir
759sharedstatedir
760sysconfdir
761datadir
762datarootdir
763libexecdir
764sbindir
765bindir
766program_transform_name
767prefix
768exec_prefix
769PACKAGE_URL
770PACKAGE_BUGREPORT
771PACKAGE_STRING
772PACKAGE_VERSION
773PACKAGE_TARNAME
774PACKAGE_NAME
775PATH_SEPARATOR
776SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000777ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_user_opts='
779enable_option_checking
780enable_universalsdk
781with_universal_archs
782with_framework_name
783enable_framework
784with_gcc
785with_cxx_main
786with_suffix
787enable_shared
788enable_profiling
789with_pydebug
790with_libs
791with_system_expat
792with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100793with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000794enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000795with_dbmliborder
796with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_threads
798with_thread
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_fpectl
805with_libm
806with_libc
807enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_computed_gotos
809'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810 ac_precious_vars='build_alias
811host_alias
812target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100813MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000814CC
815CFLAGS
816LDFLAGS
817LIBS
818CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200819CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000820
Guido van Rossum627b2d71993-12-24 10:39:16 +0000821
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000823ac_init_help=
824ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000825ac_unrecognized_opts=
826ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827# The variables have the same names as the options, with
828# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000829cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000832no_recursion=
833prefix=NONE
834program_prefix=NONE
835program_suffix=NONE
836program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000837silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000838site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841x_includes=NONE
842x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000843
844# Installation directory options.
845# These are left unexpanded so users can "make install exec_prefix=/foo"
846# and all the variables that are supposed to be based on exec_prefix
847# by default will actually change.
848# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000850bindir='${exec_prefix}/bin'
851sbindir='${exec_prefix}/sbin'
852libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853datarootdir='${prefix}/share'
854datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855sysconfdir='${prefix}/etc'
856sharedstatedir='${prefix}/com'
857localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000858includedir='${prefix}/include'
859oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
861infodir='${datarootdir}/info'
862htmldir='${docdir}'
863dvidir='${docdir}'
864pdfdir='${docdir}'
865psdir='${docdir}'
866libdir='${exec_prefix}/lib'
867localedir='${datarootdir}/locale'
868mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000873do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874 # If the previous option needs an argument, assign it.
875 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877 ac_prev=
878 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200882 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
883 *=) ac_optarg= ;;
884 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000887 # Accept the important Cygnus configure options, so we can diagnose typos.
888
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 case $ac_dashdash$ac_option in
890 --)
891 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893 -bindir | --bindir | --bindi | --bind | --bin | --bi)
894 ac_prev=bindir ;;
895 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
898 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 -cache-file | --cache-file | --cache-fil | --cache-fi \
904 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
905 ac_prev=cache_file ;;
906 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
907 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 cache_file=$ac_optarg ;;
909
910 --config-cache | -C)
911 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
919 | --dataroo | --dataro | --datar)
920 ac_prev=datarootdir ;;
921 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
922 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
923 datarootdir=$ac_optarg ;;
924
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000926 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000928 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200929 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000930 ac_useropt_orig=$ac_useropt
931 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
932 case $ac_user_opts in
933 *"
934"enable_$ac_useropt"
935"*) ;;
936 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
937 ac_unrecognized_sep=', ';;
938 esac
939 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000940
941 -docdir | --docdir | --docdi | --doc | --do)
942 ac_prev=docdir ;;
943 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
944 docdir=$ac_optarg ;;
945
946 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
947 ac_prev=dvidir ;;
948 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
949 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000952 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200955 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
964 esac
965 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
968 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
969 | --exec | --exe | --ex)
970 ac_prev=exec_prefix ;;
971 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
972 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
973 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Obsolete; use --with-gas.
978 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 -help | --help | --hel | --he | -h)
981 ac_init_help=long ;;
982 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
983 ac_init_help=recursive ;;
984 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
985 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000992 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
993 ac_prev=htmldir ;;
994 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
995 | --ht=*)
996 htmldir=$ac_optarg ;;
997
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998 -includedir | --includedir | --includedi | --included | --include \
999 | --includ | --inclu | --incl | --inc)
1000 ac_prev=includedir ;;
1001 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1002 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
1005 -infodir | --infodir | --infodi | --infod | --info | --inf)
1006 ac_prev=infodir ;;
1007 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
1010 -libdir | --libdir | --libdi | --libd)
1011 ac_prev=libdir ;;
1012 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
1015 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1016 | --libexe | --libex | --libe)
1017 ac_prev=libexecdir ;;
1018 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1019 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 -localedir | --localedir | --localedi | --localed | --locale)
1023 ac_prev=localedir ;;
1024 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1025 localedir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 ac_prev=localstatedir ;;
1030 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1035 ac_prev=mandir ;;
1036 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Guido van Rossum7f43da71994-08-01 12:15:30 +00001039 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 # Obsolete; use --without-fp.
1041 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 no_create=yes ;;
1046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1048 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1049 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1052 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1053 | --oldin | --oldi | --old | --ol | --o)
1054 ac_prev=oldincludedir ;;
1055 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1056 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1057 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1061 ac_prev=prefix ;;
1062 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1066 | --program-pre | --program-pr | --program-p)
1067 ac_prev=program_prefix ;;
1068 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1069 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1073 | --program-suf | --program-su | --program-s)
1074 ac_prev=program_suffix ;;
1075 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1076 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-transform-name | --program-transform-name \
1080 | --program-transform-nam | --program-transform-na \
1081 | --program-transform-n | --program-transform- \
1082 | --program-transform | --program-transfor \
1083 | --program-transfo | --program-transf \
1084 | --program-trans | --program-tran \
1085 | --progr-tra | --program-tr | --program-t)
1086 ac_prev=program_transform_name ;;
1087 -program-transform-name=* | --program-transform-name=* \
1088 | --program-transform-nam=* | --program-transform-na=* \
1089 | --program-transform-n=* | --program-transform-=* \
1090 | --program-transform=* | --program-transfor=* \
1091 | --program-transfo=* | --program-transf=* \
1092 | --program-trans=* | --program-tran=* \
1093 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001096 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1097 ac_prev=pdfdir ;;
1098 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1099 pdfdir=$ac_optarg ;;
1100
1101 -psdir | --psdir | --psdi | --psd | --ps)
1102 ac_prev=psdir ;;
1103 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1104 psdir=$ac_optarg ;;
1105
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1107 | -silent | --silent | --silen | --sile | --sil)
1108 silent=yes ;;
1109
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1111 ac_prev=sbindir ;;
1112 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1113 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115
1116 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1117 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1118 | --sharedst | --shareds | --shared | --share | --shar \
1119 | --sha | --sh)
1120 ac_prev=sharedstatedir ;;
1121 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1122 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1123 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1124 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001127 -site | --site | --sit)
1128 ac_prev=site ;;
1129 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1133 ac_prev=srcdir ;;
1134 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001137 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1138 | --syscon | --sysco | --sysc | --sys | --sy)
1139 ac_prev=sysconfdir ;;
1140 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1141 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148
1149 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1150 verbose=yes ;;
1151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 -version | --version | --versio | --versi | --vers | -V)
1153 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001159 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001172 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001174 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001175 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001176 ac_useropt_orig=$ac_useropt
1177 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1178 case $ac_user_opts in
1179 *"
1180"with_$ac_useropt"
1181"*) ;;
1182 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1183 ac_unrecognized_sep=', ';;
1184 esac
1185 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 --x)
1188 # Obsolete; use --with-x.
1189 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1192 | --x-incl | --x-inc | --x-in | --x-i)
1193 ac_prev=x_includes ;;
1194 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1195 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1199 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1200 ac_prev=x_libraries ;;
1201 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1202 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1206Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 ;;
1208
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 *=*)
1210 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1211 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 case $ac_envvar in #(
1213 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001216 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 export $ac_envvar ;;
1218
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001219 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001224 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225 ;;
1226
1227 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228done
1229
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001231 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001232 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233fi
1234
Matthias Kloseb9621712010-04-24 17:59:49 +00001235if test -n "$ac_unrecognized_opts"; then
1236 case $enable_option_checking in
1237 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001238 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001239 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1240 esac
1241fi
1242
1243# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1245 datadir sysconfdir sharedstatedir localstatedir includedir \
1246 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1247 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001248do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 # Remove trailing slashes.
1251 case $ac_val in
1252 */ )
1253 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1254 eval $ac_var=\$ac_val;;
1255 esac
1256 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 [\\/$]* | ?:[\\/]* ) continue;;
1259 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001261 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001262done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001263
Martin v. Löwis11437992002-04-12 09:54:03 +00001264# There might be people who depend on the old broken behavior: `$host'
1265# used to hold the argument of --host etc.
1266# FIXME: To remove some day.
1267build=$build_alias
1268host=$host_alias
1269target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# FIXME: To remove some day.
1272if test "x$host_alias" != x; then
1273 if test "x$build_alias" = x; then
1274 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 elif test "x$build_alias" != "x$host_alias"; then
1276 cross_compiling=yes
1277 fi
1278fi
1279
1280ac_tool_prefix=
1281test -n "$host_alias" && ac_tool_prefix=$host_alias-
1282
1283test "$silent" = yes && exec 6>/dev/null
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286ac_pwd=`pwd` && test -n "$ac_pwd" &&
1287ac_ls_di=`ls -di .` &&
1288ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001289 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001292
1293
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294# Find the source files, if location was not specified.
1295if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001298 ac_confdir=`$as_dirname -- "$as_myself" ||
1299$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1300 X"$as_myself" : 'X\(//\)[^/]' \| \
1301 X"$as_myself" : 'X\(//\)$' \| \
1302 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1303$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\/\)[^/].*/{
1309 s//\1/
1310 q
1311 }
1312 /^X\(\/\/\)$/{
1313 s//\1/
1314 q
1315 }
1316 /^X\(\/\).*/{
1317 s//\1/
1318 q
1319 }
1320 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323 srcdir=..
1324 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001325else
1326 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328if test ! -r "$srcdir/$ac_unique_file"; then
1329 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1333ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 pwd)`
1336# When building in place, set srcdir=.
1337if test "$ac_abs_confdir" = "$ac_pwd"; then
1338 srcdir=.
1339fi
1340# Remove unnecessary trailing slashes from srcdir.
1341# Double slashes in file names in object file debugging info
1342# mess up M-x gdb in Emacs.
1343case $srcdir in
1344*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1345esac
1346for ac_var in $ac_precious_vars; do
1347 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1348 eval ac_env_${ac_var}_value=\$${ac_var}
1349 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1350 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1351done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001352
Martin v. Löwis11437992002-04-12 09:54:03 +00001353#
1354# Report the --help message.
1355#
1356if test "$ac_init_help" = "long"; then
1357 # Omit some internal or obsolete options to make the list less imposing.
1358 # This message is too long to be a string in the A/UX 3.1 sh.
1359 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001360\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Usage: $0 [OPTION]... [VAR=VALUE]...
1363
1364To assign environment variables (e.g., CC, CFLAGS...), specify them as
1365VAR=VALUE. See below for descriptions of some of the useful variables.
1366
1367Defaults for the options are specified in brackets.
1368
1369Configuration:
1370 -h, --help display this help and exit
1371 --help=short display options specific to this package
1372 --help=recursive display the short help of all the included packages
1373 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 --cache-file=FILE cache test results in FILE [disabled]
1376 -C, --config-cache alias for \`--cache-file=config.cache'
1377 -n, --no-create do not create output files
1378 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1379
Martin v. Löwis11437992002-04-12 09:54:03 +00001380Installation directories:
1381 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001382 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001383 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001384 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001385
1386By default, \`make install' will install all the files in
1387\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1388an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1389for instance \`--prefix=\$HOME'.
1390
1391For better control, use the options below.
1392
1393Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001394 --bindir=DIR user executables [EPREFIX/bin]
1395 --sbindir=DIR system admin executables [EPREFIX/sbin]
1396 --libexecdir=DIR program executables [EPREFIX/libexec]
1397 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1398 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1399 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1400 --libdir=DIR object code libraries [EPREFIX/lib]
1401 --includedir=DIR C header files [PREFIX/include]
1402 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1403 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1404 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1405 --infodir=DIR info documentation [DATAROOTDIR/info]
1406 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1407 --mandir=DIR man documentation [DATAROOTDIR/man]
1408 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1409 --htmldir=DIR html documentation [DOCDIR]
1410 --dvidir=DIR dvi documentation [DOCDIR]
1411 --pdfdir=DIR pdf documentation [DOCDIR]
1412 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413_ACEOF
1414
1415 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001416
1417System types:
1418 --build=BUILD configure for building on BUILD [guessed]
1419 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421fi
1422
1423if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001424 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001425 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001426 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 cat <<\_ACEOF
1428
1429Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001431 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1432 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001433 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001434 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001435 --enable-framework[=INSTALLDIR]
1436 Build (MacOSX|Darwin) framework
1437 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001438 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001439 --enable-loadable-sqlite-extensions
1440 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001441 --enable-ipv6 Enable ipv6 (with ipv4) support
1442 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001443 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001445
1446Optional Packages:
1447 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1448 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001449 --with-universal-archs=ARCH
1450 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001451 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001452 --with-framework-name=FRAMEWORK
1453 specify an alternate name of the framework built
1454 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001456 --with-cxx-main=<compiler>
1457 compile main() and link python executable with C++
1458 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with-suffix=.exe set executable suffix
1460 --with-pydebug build with Py_DEBUG defined
1461 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001462 --with-system-expat build pyexpat module using an installed expat
1463 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001464 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001465 --with-system-libmpdec build _decimal module using an installed libmpdec
1466 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001467 --with-dbmliborder=db1:db2:...
1468 order to check db backends for dbm. Valid value is a
1469 colon separated string with the backend names
1470 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with(out)-threads[=DIRECTORY]
1473 disable/enable thread support
1474 --with(out)-thread[=DIRECTORY]
1475 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001477 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001479 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-fpectl enable SIGFPE catching
1481 --with-libm=STRING math library
1482 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001483 --with(out)-computed-gotos
1484 Use computed gotos in evaluation loop (enabled by
1485 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001488 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001489 CC C compiler command
1490 CFLAGS C compiler flags
1491 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1492 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001495 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 CPP C preprocessor
1497
1498Use these variables to override the choices made by `configure' or to help
1499it to find libraries and programs with nonstandard names/locations.
1500
Georg Brandle2e15612009-05-20 18:25:10 +00001501Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001502_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001503ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001504fi
1505
1506if test "$ac_init_help" = "recursive"; then
1507 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001509 test -d "$ac_dir" ||
1510 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1511 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001512 ac_builddir=.
1513
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514case "$ac_dir" in
1515.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1516*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001519 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 case $ac_top_builddir_sub in
1521 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1522 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1523 esac ;;
1524esac
1525ac_abs_top_builddir=$ac_pwd
1526ac_abs_builddir=$ac_pwd$ac_dir_suffix
1527# for backward compatibility:
1528ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001533 ac_top_srcdir=$ac_top_builddir_sub
1534 ac_abs_top_srcdir=$ac_pwd ;;
1535 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 ac_top_srcdir=$srcdir
1538 ac_abs_top_srcdir=$srcdir ;;
1539 *) # Relative name.
1540 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1541 ac_top_srcdir=$ac_top_build_prefix$srcdir
1542 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001543esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001545
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 cd "$ac_dir" || { ac_status=$?; continue; }
1547 # Check for guested configure.
1548 if test -f "$ac_srcdir/configure.gnu"; then
1549 echo &&
1550 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1551 elif test -f "$ac_srcdir/configure"; then
1552 echo &&
1553 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 fi || ac_status=$?
1557 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001558 done
1559fi
1560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001562if $ac_init_version; then
1563 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001564python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001565generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001567Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568This configure script is free software; the Free Software Foundation
1569gives unlimited permission to copy, distribute and modify it.
1570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001573
1574## ------------------------ ##
1575## Autoconf initialization. ##
1576## ------------------------ ##
1577
1578# ac_fn_c_try_compile LINENO
1579# --------------------------
1580# Try to compile conftest.$ac_ext, and return whether this succeeded.
1581ac_fn_c_try_compile ()
1582{
1583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1584 rm -f conftest.$ac_objext
1585 if { { ac_try="$ac_compile"
1586case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_compile") 2>conftest.err
1593 ac_status=$?
1594 if test -s conftest.err; then
1595 grep -v '^ *+' conftest.err >conftest.er1
1596 cat conftest.er1 >&5
1597 mv -f conftest.er1 conftest.err
1598 fi
1599 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600 test $ac_status = 0; } && {
1601 test -z "$ac_c_werror_flag" ||
1602 test ! -s conftest.err
1603 } && test -s conftest.$ac_objext; then :
1604 ac_retval=0
1605else
1606 $as_echo "$as_me: failed program was:" >&5
1607sed 's/^/| /' conftest.$ac_ext >&5
1608
1609 ac_retval=1
1610fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001611 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001612 as_fn_set_status $ac_retval
1613
1614} # ac_fn_c_try_compile
1615
Matthias Kloseb9621712010-04-24 17:59:49 +00001616# ac_fn_c_try_link LINENO
1617# -----------------------
1618# Try to link conftest.$ac_ext, and return whether this succeeded.
1619ac_fn_c_try_link ()
1620{
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 rm -f conftest.$ac_objext conftest$ac_exeext
1623 if { { ac_try="$ac_link"
1624case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627esac
1628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629$as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_link") 2>conftest.err
1631 ac_status=$?
1632 if test -s conftest.err; then
1633 grep -v '^ *+' conftest.err >conftest.er1
1634 cat conftest.er1 >&5
1635 mv -f conftest.er1 conftest.err
1636 fi
1637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1638 test $ac_status = 0; } && {
1639 test -z "$ac_c_werror_flag" ||
1640 test ! -s conftest.err
1641 } && test -s conftest$ac_exeext && {
1642 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001643 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001644 }; then :
1645 ac_retval=0
1646else
1647 $as_echo "$as_me: failed program was:" >&5
1648sed 's/^/| /' conftest.$ac_ext >&5
1649
1650 ac_retval=1
1651fi
1652 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1653 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1654 # interfere with the next link command; also delete a directory that is
1655 # left behind by Apple's compiler. We do this before executing the actions.
1656 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001657 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001658 as_fn_set_status $ac_retval
1659
1660} # ac_fn_c_try_link
1661
Matthias Kloseb9621712010-04-24 17:59:49 +00001662# ac_fn_c_try_cpp LINENO
1663# ----------------------
1664# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1665ac_fn_c_try_cpp ()
1666{
1667 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1668 if { { ac_try="$ac_cpp conftest.$ac_ext"
1669case "(($ac_try" in
1670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1671 *) ac_try_echo=$ac_try;;
1672esac
1673eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1674$as_echo "$ac_try_echo"; } >&5
1675 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1676 ac_status=$?
1677 if test -s conftest.err; then
1678 grep -v '^ *+' conftest.err >conftest.er1
1679 cat conftest.er1 >&5
1680 mv -f conftest.er1 conftest.err
1681 fi
1682 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001683 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1685 test ! -s conftest.err
1686 }; then :
1687 ac_retval=0
1688else
1689 $as_echo "$as_me: failed program was:" >&5
1690sed 's/^/| /' conftest.$ac_ext >&5
1691
1692 ac_retval=1
1693fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001694 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 as_fn_set_status $ac_retval
1696
1697} # ac_fn_c_try_cpp
1698
1699# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1700# -------------------------------------------------------
1701# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1702# the include files in INCLUDES and setting the cache variable VAR
1703# accordingly.
1704ac_fn_c_check_header_mongrel ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001707 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1709$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001710if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001711 $as_echo_n "(cached) " >&6
1712fi
1713eval ac_res=\$$3
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1715$as_echo "$ac_res" >&6; }
1716else
1717 # Is the header compilable?
1718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1719$as_echo_n "checking $2 usability... " >&6; }
1720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1721/* end confdefs.h. */
1722$4
1723#include <$2>
1724_ACEOF
1725if ac_fn_c_try_compile "$LINENO"; then :
1726 ac_header_compiler=yes
1727else
1728 ac_header_compiler=no
1729fi
1730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1732$as_echo "$ac_header_compiler" >&6; }
1733
1734# Is the header present?
1735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1736$as_echo_n "checking $2 presence... " >&6; }
1737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1738/* end confdefs.h. */
1739#include <$2>
1740_ACEOF
1741if ac_fn_c_try_cpp "$LINENO"; then :
1742 ac_header_preproc=yes
1743else
1744 ac_header_preproc=no
1745fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001746rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1748$as_echo "$ac_header_preproc" >&6; }
1749
1750# So? What about this header?
1751case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1752 yes:no: )
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1754$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1756$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1757 ;;
1758 no:yes:* )
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1760$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1762$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1764$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1766$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1768$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001770## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001771## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001772 ) | sed "s/^/$as_me: WARNING: /" >&2
1773 ;;
1774esac
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1776$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001777if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 $as_echo_n "(cached) " >&6
1779else
1780 eval "$3=\$ac_header_compiler"
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001786 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001787
1788} # ac_fn_c_check_header_mongrel
1789
1790# ac_fn_c_try_run LINENO
1791# ----------------------
1792# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1793# that executables *can* be run.
1794ac_fn_c_try_run ()
1795{
1796 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1797 if { { ac_try="$ac_link"
1798case "(($ac_try" in
1799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1800 *) ac_try_echo=$ac_try;;
1801esac
1802eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1803$as_echo "$ac_try_echo"; } >&5
1804 (eval "$ac_link") 2>&5
1805 ac_status=$?
1806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1807 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1808 { { case "(($ac_try" in
1809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1810 *) ac_try_echo=$ac_try;;
1811esac
1812eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1813$as_echo "$ac_try_echo"; } >&5
1814 (eval "$ac_try") 2>&5
1815 ac_status=$?
1816 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1817 test $ac_status = 0; }; }; then :
1818 ac_retval=0
1819else
1820 $as_echo "$as_me: program exited with status $ac_status" >&5
1821 $as_echo "$as_me: failed program was:" >&5
1822sed 's/^/| /' conftest.$ac_ext >&5
1823
1824 ac_retval=$ac_status
1825fi
1826 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001828 as_fn_set_status $ac_retval
1829
1830} # ac_fn_c_try_run
1831
1832# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1833# -------------------------------------------------------
1834# Tests whether HEADER exists and can be compiled using the include files in
1835# INCLUDES, setting the cache variable VAR accordingly.
1836ac_fn_c_check_header_compile ()
1837{
1838 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1840$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001841if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 $as_echo_n "(cached) " >&6
1843else
1844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1845/* end confdefs.h. */
1846$4
1847#include <$2>
1848_ACEOF
1849if ac_fn_c_try_compile "$LINENO"; then :
1850 eval "$3=yes"
1851else
1852 eval "$3=no"
1853fi
1854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1855fi
1856eval ac_res=\$$3
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1858$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001859 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001860
1861} # ac_fn_c_check_header_compile
1862
Matthias Kloseb9621712010-04-24 17:59:49 +00001863# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1864# -------------------------------------------
1865# Tests whether TYPE exists after having included INCLUDES, setting cache
1866# variable VAR accordingly.
1867ac_fn_c_check_type ()
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 eval "$3=no"
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882if (sizeof ($2))
1883 return 0;
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1890/* end confdefs.h. */
1891$4
1892int
1893main ()
1894{
1895if (sizeof (($2)))
1896 return 0;
1897 ;
1898 return 0;
1899}
1900_ACEOF
1901if ac_fn_c_try_compile "$LINENO"; then :
1902
1903else
1904 eval "$3=yes"
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1909fi
1910eval ac_res=\$$3
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1912$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001913 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001914
1915} # ac_fn_c_check_type
1916
1917# ac_fn_c_find_uintX_t LINENO BITS VAR
1918# ------------------------------------
1919# Finds an unsigned integer type with width BITS, setting cache variable VAR
1920# accordingly.
1921ac_fn_c_find_uintX_t ()
1922{
1923 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1925$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001926if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001927 $as_echo_n "(cached) " >&6
1928else
1929 eval "$3=no"
1930 # Order is important - never check a type that is potentially smaller
1931 # than half of the expected target width.
1932 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1933 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$ac_includes_default
1937int
1938main ()
1939{
1940static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001941test_array [0] = 0;
1942return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001943
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 case $ac_type in #(
1950 uint$2_t) :
1951 eval "$3=yes" ;; #(
1952 *) :
1953 eval "$3=\$ac_type" ;;
1954esac
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001957 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001958
1959else
1960 break
1961fi
1962 done
1963fi
1964eval ac_res=\$$3
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1966$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001967 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001968
1969} # ac_fn_c_find_uintX_t
1970
1971# ac_fn_c_find_intX_t LINENO BITS VAR
1972# -----------------------------------
1973# Finds a signed integer type with width BITS, setting cache variable VAR
1974# accordingly.
1975ac_fn_c_find_intX_t ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1979$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001980if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001981 $as_echo_n "(cached) " >&6
1982else
1983 eval "$3=no"
1984 # Order is important - never check a type that is potentially smaller
1985 # than half of the expected target width.
1986 for ac_type in int$2_t 'int' 'long int' \
1987 'long long int' 'short int' 'signed char'; do
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001991 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001992int
1993main ()
1994{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001995static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001996test_array [0] = 0;
1997return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001998
1999 ;
2000 return 0;
2001}
2002_ACEOF
2003if ac_fn_c_try_compile "$LINENO"; then :
2004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2005/* end confdefs.h. */
2006$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002007 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002008int
2009main ()
2010{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002011static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002012 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002013test_array [0] = 0;
2014return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016 ;
2017 return 0;
2018}
2019_ACEOF
2020if ac_fn_c_try_compile "$LINENO"; then :
2021
2022else
2023 case $ac_type in #(
2024 int$2_t) :
2025 eval "$3=yes" ;; #(
2026 *) :
2027 eval "$3=\$ac_type" ;;
2028esac
2029fi
2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2031fi
2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002033 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002034
2035else
2036 break
2037fi
2038 done
2039fi
2040eval ac_res=\$$3
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002044
2045} # ac_fn_c_find_intX_t
2046
2047# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2048# --------------------------------------------
2049# Tries to find the compile-time value of EXPR in a program that includes
2050# INCLUDES, setting VAR accordingly. Returns whether the value could be
2051# computed
2052ac_fn_c_compute_int ()
2053{
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 if test "$cross_compiling" = yes; then
2056 # Depending upon the size, compute the lo and hi bounds.
2057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=0 ac_mid=0
2073 while :; do
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002081test_array [0] = 0;
2082return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=$ac_mid; break
2090else
2091 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2092 if test $ac_lo -le $ac_mid; then
2093 ac_lo= ac_hi=
2094 break
2095 fi
2096 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2097fi
2098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2099 done
2100else
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=-1 ac_mid=-1
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002125test_array [0] = 0;
2126return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_lo=$ac_mid; break
2134else
2135 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2136 if test $ac_mid -le $ac_hi; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 ac_lo= ac_hi=
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148fi
2149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2150# Binary search between lo and hi bounds.
2151while test "x$ac_lo" != "x$ac_hi"; do
2152 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002160test_array [0] = 0;
2161return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=$ac_mid
2169else
2170 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2171fi
2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2173done
2174case $ac_lo in #((
2175?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2176'') ac_retval=1 ;;
2177esac
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181$4
2182static long int longval () { return $2; }
2183static unsigned long int ulongval () { return $2; }
2184#include <stdio.h>
2185#include <stdlib.h>
2186int
2187main ()
2188{
2189
2190 FILE *f = fopen ("conftest.val", "w");
2191 if (! f)
2192 return 1;
2193 if (($2) < 0)
2194 {
2195 long int i = longval ();
2196 if (i != ($2))
2197 return 1;
2198 fprintf (f, "%ld", i);
2199 }
2200 else
2201 {
2202 unsigned long int i = ulongval ();
2203 if (i != ($2))
2204 return 1;
2205 fprintf (f, "%lu", i);
2206 }
2207 /* Do not output a trailing newline, as this causes \r\n confusion
2208 on some platforms. */
2209 return ferror (f) || fclose (f) != 0;
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_run "$LINENO"; then :
2216 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2217else
2218 ac_retval=1
2219fi
2220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2221 conftest.$ac_objext conftest.beam conftest.$ac_ext
2222rm -f conftest.val
2223
2224 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002225 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002226 as_fn_set_status $ac_retval
2227
2228} # ac_fn_c_compute_int
2229
2230# ac_fn_c_check_func LINENO FUNC VAR
2231# ----------------------------------
2232# Tests whether FUNC exists, setting the cache variable VAR accordingly
2233ac_fn_c_check_func ()
2234{
2235 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2237$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002238if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002239 $as_echo_n "(cached) " >&6
2240else
2241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2242/* end confdefs.h. */
2243/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2244 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2245#define $2 innocuous_$2
2246
2247/* System header to define __stub macros and hopefully few prototypes,
2248 which can conflict with char $2 (); below.
2249 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2250 <limits.h> exists even on freestanding compilers. */
2251
2252#ifdef __STDC__
2253# include <limits.h>
2254#else
2255# include <assert.h>
2256#endif
2257
2258#undef $2
2259
2260/* Override any GCC internal prototype to avoid an error.
2261 Use char because int might match the return type of a GCC
2262 builtin and then its argument prototype would still apply. */
2263#ifdef __cplusplus
2264extern "C"
2265#endif
2266char $2 ();
2267/* The GNU C library defines this for functions which it implements
2268 to always fail with ENOSYS. Some functions are actually named
2269 something starting with __ and the normal name is an alias. */
2270#if defined __stub_$2 || defined __stub___$2
2271choke me
2272#endif
2273
2274int
2275main ()
2276{
2277return $2 ();
2278 ;
2279 return 0;
2280}
2281_ACEOF
2282if ac_fn_c_try_link "$LINENO"; then :
2283 eval "$3=yes"
2284else
2285 eval "$3=no"
2286fi
2287rm -f core conftest.err conftest.$ac_objext \
2288 conftest$ac_exeext conftest.$ac_ext
2289fi
2290eval ac_res=\$$3
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2292$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002294
2295} # ac_fn_c_check_func
2296
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002297# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2298# ---------------------------------------------
2299# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2300# accordingly.
2301ac_fn_c_check_decl ()
2302{
2303 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304 as_decl_name=`echo $2|sed 's/ *(.*//'`
2305 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2307$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2308if eval \${$3+:} false; then :
2309 $as_echo_n "(cached) " >&6
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$4
2314int
2315main ()
2316{
2317#ifndef $as_decl_name
2318#ifdef __cplusplus
2319 (void) $as_decl_use;
2320#else
2321 (void) $as_decl_name;
2322#endif
2323#endif
2324
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_compile "$LINENO"; then :
2330 eval "$3=yes"
2331else
2332 eval "$3=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2335fi
2336eval ac_res=\$$3
2337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2338$as_echo "$ac_res" >&6; }
2339 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2340
2341} # ac_fn_c_check_decl
2342
Matthias Kloseb9621712010-04-24 17:59:49 +00002343# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2344# ----------------------------------------------------
2345# Tries to find if the field MEMBER exists in type AGGR, after including
2346# INCLUDES, setting cache variable VAR accordingly.
2347ac_fn_c_check_member ()
2348{
2349 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2351$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002352if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002353 $as_echo_n "(cached) " >&6
2354else
2355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h. */
2357$5
2358int
2359main ()
2360{
2361static $2 ac_aggr;
2362if (ac_aggr.$3)
2363return 0;
2364 ;
2365 return 0;
2366}
2367_ACEOF
2368if ac_fn_c_try_compile "$LINENO"; then :
2369 eval "$4=yes"
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$5
2374int
2375main ()
2376{
2377static $2 ac_aggr;
2378if (sizeof ac_aggr.$3)
2379return 0;
2380 ;
2381 return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385 eval "$4=yes"
2386else
2387 eval "$4=no"
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393eval ac_res=\$$4
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2395$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002396 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002397
2398} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002399cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002400This file contains any messages produced by compilers while
2401running configure, to aid debugging if configure makes a mistake.
2402
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002403It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002404generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
2406 $ $0 $@
2407
2408_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002410{
2411cat <<_ASUNAME
2412## --------- ##
2413## Platform. ##
2414## --------- ##
2415
2416hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2417uname -m = `(uname -m) 2>/dev/null || echo unknown`
2418uname -r = `(uname -r) 2>/dev/null || echo unknown`
2419uname -s = `(uname -s) 2>/dev/null || echo unknown`
2420uname -v = `(uname -v) 2>/dev/null || echo unknown`
2421
2422/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2423/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2424
2425/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2426/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2427/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002428/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002429/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2430/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2431/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2432
2433_ASUNAME
2434
2435as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2436for as_dir in $PATH
2437do
2438 IFS=$as_save_IFS
2439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002440 $as_echo "PATH: $as_dir"
2441 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444} >&5
2445
2446cat >&5 <<_ACEOF
2447
2448
2449## ----------- ##
2450## Core tests. ##
2451## ----------- ##
2452
2453_ACEOF
2454
2455
2456# Keep a trace of the command line.
2457# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002458# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002460# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002461ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002462ac_configure_args0=
2463ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002464ac_must_keep_next=false
2465for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002466do
Skip Montanaro6dead952003-09-25 14:50:04 +00002467 for ac_arg
2468 do
2469 case $ac_arg in
2470 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2471 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2472 | -silent | --silent | --silen | --sile | --sil)
2473 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002475 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 esac
2477 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002480 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002482 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002483 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002484 case $ac_arg in
2485 *=* | --config-cache | -C | -disable-* | --disable-* \
2486 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2487 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2488 | -with-* | --with-* | -without-* | --without-* | --x)
2489 case "$ac_configure_args0 " in
2490 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2491 esac
2492 ;;
2493 -* ) ac_must_keep_next=true ;;
2494 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 ;;
2498 esac
2499 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002500done
Matthias Kloseb9621712010-04-24 17:59:49 +00002501{ ac_configure_args0=; unset ac_configure_args0;}
2502{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504# When interrupted or exit'd, cleanup temporary files, and complete
2505# config.log. We remove comments because anyway the quotes in there
2506# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507# WARNING: Use '\'' to represent an apostrophe within the trap.
2508# 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 +00002509trap 'exit_status=$?
2510 # Save into config.log some information that might help in debugging.
2511 {
2512 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002513
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002515## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 echo
2518 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519(
2520 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2521 eval ac_val=\$$ac_var
2522 case $ac_val in #(
2523 *${as_nl}*)
2524 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2526$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 esac
2528 case $ac_var in #(
2529 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2531 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 esac ;;
2533 esac
2534 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2537 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002539 "s/'\''/'\''\\\\'\'''\''/g;
2540 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2541 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002542 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002544 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 esac |
2546 sort
2547)
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002549
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002551## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002552## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 echo
2554 for ac_var in $ac_subst_vars
2555 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 eval ac_val=\$$ac_var
2557 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002559 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002560 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002561 done | sort
2562 echo
2563
2564 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002567## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002568 echo
2569 for ac_var in $ac_subst_files
2570 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002571 eval ac_val=\$$ac_var
2572 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002575 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 done | sort
2577 echo
2578 fi
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002582## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002583## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 echo
2587 fi
2588 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 $as_echo "$as_me: caught signal $ac_signal"
2590 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 rm -f core *.core core.conftest.* &&
2593 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002596for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002597 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002598done
2599ac_signal=0
2600
2601# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002603
Matthias Kloseb9621712010-04-24 17:59:49 +00002604$as_echo "/* confdefs.h */" > confdefs.h
2605
Martin v. Löwis11437992002-04-12 09:54:03 +00002606# Predefined preprocessor variables.
2607
2608cat >>confdefs.h <<_ACEOF
2609#define PACKAGE_NAME "$PACKAGE_NAME"
2610_ACEOF
2611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612cat >>confdefs.h <<_ACEOF
2613#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2614_ACEOF
2615
Martin v. Löwis11437992002-04-12 09:54:03 +00002616cat >>confdefs.h <<_ACEOF
2617#define PACKAGE_VERSION "$PACKAGE_VERSION"
2618_ACEOF
2619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620cat >>confdefs.h <<_ACEOF
2621#define PACKAGE_STRING "$PACKAGE_STRING"
2622_ACEOF
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2626_ACEOF
2627
Matthias Kloseb9621712010-04-24 17:59:49 +00002628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_URL "$PACKAGE_URL"
2630_ACEOF
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632
2633# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002634# Prefer an explicitly selected file to automatically selected ones.
2635ac_site_file1=NONE
2636ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002638 # We do not want a PATH search for config.site.
2639 case $CONFIG_SITE in #((
2640 -*) ac_site_file1=./$CONFIG_SITE;;
2641 */*) ac_site_file1=$CONFIG_SITE;;
2642 *) ac_site_file1=./$CONFIG_SITE;;
2643 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 ac_site_file1=$prefix/share/config.site
2646 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002647else
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 ac_site_file1=$ac_default_prefix/share/config.site
2649 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002651for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652do
Matthias Kloseb9621712010-04-24 17:59:49 +00002653 test "x$ac_site_file" = xNONE && continue
2654 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2656$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002658 . "$ac_site_file" \
2659 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2661as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002662See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002663 fi
2664done
2665
2666if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 # Some versions of bash will fail to source /dev/null (special files
2668 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2669 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2670 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2671$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2674 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002675 esac
2676 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677else
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2679$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002680 >$cache_file
2681fi
2682
2683# Check that the precious variables saved in the cache have kept the same
2684# value.
2685ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2688 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002689 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2690 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 case $ac_old_set,$ac_new_set in
2692 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2694$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 +00002695 ac_cache_corrupted=: ;;
2696 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2698$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002699 ac_cache_corrupted=: ;;
2700 ,);;
2701 *)
2702 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002703 # differences in whitespace do not lead to failure.
2704 ac_old_val_w=`echo x $ac_old_val`
2705 ac_new_val_w=`echo x $ac_new_val`
2706 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2708$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2709 ac_cache_corrupted=:
2710 else
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2712$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2713 eval $ac_var=\$ac_old_val
2714 fi
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2716$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2718$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 fi;;
2720 esac
2721 # Pass precious variables to config.status.
2722 if test "$ac_new_set" = set; then
2723 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002724 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 *) ac_arg=$ac_var=$ac_new_val ;;
2726 esac
2727 case " $ac_configure_args " in
2728 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002729 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 esac
2731 fi
2732done
2733if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2735$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2736 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2737$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002738 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002740## -------------------- ##
2741## Main body of script. ##
2742## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002743
Guido van Rossum7f43da71994-08-01 12:15:30 +00002744ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002745ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002746ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2747ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2748ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002749
Guido van Rossum627b2d71993-12-24 10:39:16 +00002750
Michael W. Hudson54241132001-12-07 15:38:26 +00002751
Trent Nelson4d4ec652012-10-16 08:51:24 -04002752
Trent Nelson5595ab52012-10-17 04:47:31 -04002753if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002754 # If we're building out-of-tree, we need to make sure the following
2755 # resources get picked up before their $srcdir counterparts.
2756 # Objects/ -> typeslots.inc
2757 # Include/ -> Python-ast.h, graminit.h
2758 # Python/ -> importlib.h
2759 # (A side effect of this is that these resources will automatically be
2760 # regenerated when building out-of-tree, regardless of whether or not
2761 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2762 # off.)
2763 BASECPPFLAGS="-IObjects -IInclude -IPython"
2764else
2765 BASECPPFLAGS=""
2766fi
2767
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768
2769
2770
2771
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002772if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002773then
2774# Extract the first word of "hg", so it can be a program name with args.
2775set dummy hg; ac_word=$2
2776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002778if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779 $as_echo_n "(cached) " >&6
2780else
2781 if test -n "$HAS_HG"; then
2782 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2783else
2784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2785for as_dir in $PATH
2786do
2787 IFS=$as_save_IFS
2788 test -z "$as_dir" && as_dir=.
2789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002791 ac_cv_prog_HAS_HG="found"
2792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2793 break 2
2794 fi
2795done
2796 done
2797IFS=$as_save_IFS
2798
2799 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2800fi
2801fi
2802HAS_HG=$ac_cv_prog_HAS_HG
2803if test -n "$HAS_HG"; then
2804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2805$as_echo "$HAS_HG" >&6; }
2806else
2807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2808$as_echo "no" >&6; }
2809fi
2810
2811
2812else
2813HAS_HG=no-repository
2814fi
2815if test $HAS_HG = found
2816then
2817 HGVERSION="hg id -i \$(srcdir)"
2818 HGTAG="hg id -t \$(srcdir)"
2819 HGBRANCH="hg id -b \$(srcdir)"
2820else
2821 HGVERSION=""
2822 HGTAG=""
2823 HGBRANCH=""
2824fi
2825
2826
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002828
2829
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002830ac_aux_dir=
2831for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2832 if test -f "$ac_dir/install-sh"; then
2833 ac_aux_dir=$ac_dir
2834 ac_install_sh="$ac_aux_dir/install-sh -c"
2835 break
2836 elif test -f "$ac_dir/install.sh"; then
2837 ac_aux_dir=$ac_dir
2838 ac_install_sh="$ac_aux_dir/install.sh -c"
2839 break
2840 elif test -f "$ac_dir/shtool"; then
2841 ac_aux_dir=$ac_dir
2842 ac_install_sh="$ac_aux_dir/shtool install -c"
2843 break
2844 fi
2845done
2846if test -z "$ac_aux_dir"; then
2847 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2848fi
2849
2850# These three variables are undocumented and unsupported,
2851# and are intended to be withdrawn in a future Autoconf release.
2852# They can cause serious problems if a builder's source tree is in a directory
2853# whose full name contains unusual characters.
2854ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2855ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2856ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2857
2858
2859# Make sure we can run config.sub.
2860$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2861 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2862
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2864$as_echo_n "checking build system type... " >&6; }
2865if ${ac_cv_build+:} false; then :
2866 $as_echo_n "(cached) " >&6
2867else
2868 ac_build_alias=$build_alias
2869test "x$ac_build_alias" = x &&
2870 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2871test "x$ac_build_alias" = x &&
2872 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2873ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2874 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2875
2876fi
2877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2878$as_echo "$ac_cv_build" >&6; }
2879case $ac_cv_build in
2880*-*-*) ;;
2881*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2882esac
2883build=$ac_cv_build
2884ac_save_IFS=$IFS; IFS='-'
2885set x $ac_cv_build
2886shift
2887build_cpu=$1
2888build_vendor=$2
2889shift; shift
2890# Remember, the first character of IFS is used to create $*,
2891# except with old shells:
2892build_os=$*
2893IFS=$ac_save_IFS
2894case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2895
2896
2897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2898$as_echo_n "checking host system type... " >&6; }
2899if ${ac_cv_host+:} false; then :
2900 $as_echo_n "(cached) " >&6
2901else
2902 if test "x$host_alias" = x; then
2903 ac_cv_host=$ac_cv_build
2904else
2905 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2906 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2907fi
2908
2909fi
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2911$as_echo "$ac_cv_host" >&6; }
2912case $ac_cv_host in
2913*-*-*) ;;
2914*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2915esac
2916host=$ac_cv_host
2917ac_save_IFS=$IFS; IFS='-'
2918set x $ac_cv_host
2919shift
2920host_cpu=$1
2921host_vendor=$2
2922shift; shift
2923# Remember, the first character of IFS is used to create $*,
2924# except with old shells:
2925host_os=$*
2926IFS=$ac_save_IFS
2927case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2928
2929
2930
doko@python.orga10e4a92013-01-25 18:45:12 +01002931
2932
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002933if test "$cross_compiling" = yes; then
2934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2935$as_echo_n "checking for python interpreter for cross build... " >&6; }
2936 if test -z "$PYTHON_FOR_BUILD"; then
2937 for interp in python$PACKAGE_VERSION python3 python; do
2938 which $interp >/dev/null 2>&1 || continue
2939 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2940 break
2941 fi
2942 interp=
2943 done
2944 if test x$interp = x; then
2945 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2946 fi
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2948$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002949 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 +02002950 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002951elif test "$cross_compiling" = maybe; then
2952 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002953else
2954 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2955fi
2956
2957
Martin v. Löwis11437992002-04-12 09:54:03 +00002958
Benjamin Petersond23f8222009-04-05 19:13:16 +00002959if test "$prefix" != "/"; then
2960 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2961fi
2962
2963
Martin v. Löwis11437992002-04-12 09:54:03 +00002964
2965
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002966# We don't use PACKAGE_ variables, and they cause conflicts
2967# with other autoconf-based packages that include Python.h
2968grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2969rm confdefs.h
2970mv confdefs.h.new confdefs.h
2971
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002972
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002973VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002974
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002975# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002976
2977SOVERSION=1.0
2978
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002979# The later defininition of _XOPEN_SOURCE disables certain features
2980# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002983
2984
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002990
2991
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2993# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2994# them.
2995
Matthias Kloseb9621712010-04-24 17:59:49 +00002996$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002997
2998
Martin v. Löwisd6320502004-08-12 13:45:08 +00002999# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3000# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003003
3004
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003005# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3006# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3007# them.
3008
Matthias Kloseb9621712010-04-24 17:59:49 +00003009$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003010
3011
3012
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003013define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003014
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003015# Arguments passed to configure.
3016
3017CONFIG_ARGS="$ac_configure_args"
3018
Matthias Kloseb9621712010-04-24 17:59:49 +00003019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3020$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003022if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003024 case $enableval in
3025 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003026 # Locate the best usable SDK, see Mac/README.txt for more
3027 # information
3028 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3029 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003031 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3032 if test ! -d "${enableval}"
3033 then
3034 enableval=/
3035 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037 ;;
3038 esac
3039 case $enableval in
3040 no)
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043 ;;
3044 *)
3045 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046 if test ! -d "${UNIVERSALSDK}"
3047 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003048 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003050 ;;
3051 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054else
3055
3056 UNIVERSALSDK=
3057 enable_universalsdk=
3058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003060
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003061if test -n "${UNIVERSALSDK}"
3062then
Matthias Kloseb9621712010-04-24 17:59:49 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3064$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003065else
Matthias Kloseb9621712010-04-24 17:59:49 +00003066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003068fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
3072
Ned Deilycbfb9a52012-06-23 16:02:19 -07003073# For backward compatibility reasons we prefer to select '32-bit' if available,
3074# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003076if test "`uname -s`" = "Darwin"
3077then
3078 if test -n "${UNIVERSALSDK}"
3079 then
3080 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3081 then
3082 UNIVERSAL_ARCHS="intel"
3083 fi
3084 fi
3085fi
3086
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3089$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
3091# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3095$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003096 UNIVERSAL_ARCHS="$withval"
3097
3098else
3099
Ned Deilycbfb9a52012-06-23 16:02:19 -07003100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3101$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
3103fi
3104
3105
3106
3107
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003108
3109# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003111 withval=$with_framework_name;
3112 PYTHONFRAMEWORK=${withval}
3113 PYTHONFRAMEWORKDIR=${withval}.framework
3114 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3115
3116else
3117
3118 PYTHONFRAMEWORK=Python
3119 PYTHONFRAMEWORKDIR=Python.framework
3120 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3121
3122fi
3123
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003125if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003127 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003129 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 esac
3131 case $enableval in
3132 no)
3133 PYTHONFRAMEWORK=
3134 PYTHONFRAMEWORKDIR=no-framework
3135 PYTHONFRAMEWORKPREFIX=
3136 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST=
3138 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 FRAMEWORKALTINSTALLFIRST=
3140 FRAMEWORKALTINSTALLLAST=
3141 if test "x${prefix}" = "xNONE"; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3143 else
3144 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3145 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003146 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003147 ;;
3148 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003150 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003152 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003153 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3154 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
3222 if test "x${prefix}" = "xNONE" ; then
3223 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3224 else
3225 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3226 fi
Jack Jansene578a632001-08-15 01:27:14 +00003227 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003228
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230fi
3231
Thomas Wouters477c8d52006-05-27 19:21:47 +00003232
3233
Michael W. Hudson54241132001-12-07 15:38:26 +00003234
3235
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003239
3240
3241
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003242
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003243
Jack Jansene578a632001-08-15 01:27:14 +00003244##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003245## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003246## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003247##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248# Set name for machine-dependent library files
3249
Matthias Kloseb9621712010-04-24 17:59:49 +00003250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3251$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252if test -z "$MACHDEP"
3253then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 # avoid using uname for cross builds
3255 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003256 # ac_sys_system and ac_sys_release are used for setting
3257 # a lot of different things including 'define_xopen_source'
3258 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 case "$host" in
3260 *-*-linux*)
3261 ac_sys_system=Linux
3262 ;;
3263 *-*-cygwin*)
3264 ac_sys_system=Cygwin
3265 ;;
3266 *)
3267 # for now, limit cross builds to known configurations
3268 MACHDEP="unknown"
3269 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3270 esac
3271 ac_sys_release=
3272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003274 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003275 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 fi
3281 ac_md_system=`echo $ac_sys_system |
3282 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3283 ac_md_release=`echo $ac_sys_release |
3284 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3285 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003286
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003288 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003289 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003290 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003291 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003292 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294fi
Guido van Rossum91922671997-10-09 20:24:13 +00003295
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003296
3297if test "$cross_compiling" = yes; then
3298 case "$host" in
3299 *-*-linux*)
3300 case "$host_cpu" in
3301 arm*)
3302 _host_cpu=arm
3303 ;;
3304 *)
3305 _host_cpu=$host_cpu
3306 esac
3307 ;;
3308 *-*-cygwin*)
3309 _host_cpu=
3310 ;;
3311 *)
3312 # for now, limit cross builds to known configurations
3313 MACHDEP="unknown"
3314 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3315 esac
3316 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3317fi
3318
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003319# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3320# disable features if it is defined, without any means to access these
3321# features as extensions. For these systems, we skip the definition of
3322# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3323# some feature, make sure there is no alternative way to access this
3324# feature. Also, when using wildcards, make sure you have verified the
3325# need for not defining _XOPEN_SOURCE on all systems matching the
3326# wildcard, and that the wildcard does not include future systems
3327# (which may remove their limitations).
3328case $ac_sys_system/$ac_sys_release in
3329 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3330 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003331 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003332 # In addition, Stefan Krah confirms that issue #1244610 exists through
3333 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003334 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003335 define_xopen_source=no
3336 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3337 # also defined. This can be overridden by defining _BSD_SOURCE
3338 # As this has a different meaning on Linux, only define it on OpenBSD
3339
Matthias Kloseb9621712010-04-24 17:59:49 +00003340$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003341
3342 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003344 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3345 # also defined. This can be overridden by defining _BSD_SOURCE
3346 # As this has a different meaning on Linux, only define it on OpenBSD
3347
Matthias Kloseb9621712010-04-24 17:59:49 +00003348$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349
3350 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003351 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3352 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3353 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003354 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 +00003355 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003356 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3357 # request to enable features supported by the standard as a request
3358 # to disable features not supported by the standard. The best way
3359 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3360 # entirely and define __EXTENSIONS__ instead.
3361 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003362 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3364 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003365 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003366 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 define_xopen_source=no;;
3368 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003369 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003372 # On FreeBSD 4, the math functions C89 does not cover are never defined
3373 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3374 FreeBSD/4.*)
3375 define_xopen_source=no;;
3376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403esac
3404
3405if test $define_xopen_source = yes
3406then
Victor Stinner14d098d2011-09-07 22:29:43 +02003407 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Victor Stinner14d098d2011-09-07 22:29:43 +02003409$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3413 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3414 # several APIs are not declared. Since this is also needed in some
3415 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
3419
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003421$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003423fi
3424
Guido van Rossum91922671997-10-09 20:24:13 +00003425#
3426# SGI compilers allow the specification of the both the ABI and the
3427# ISA on the command line. Depending on the values of these switches,
3428# different and often incompatable code will be generated.
3429#
3430# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3431# thus supply support for various ABI/ISA combinations. The MACHDEP
3432# variable is also adjusted.
3433#
3434
3435if test ! -z "$SGI_ABI"
3436then
3437 CC="cc $SGI_ABI"
3438 LDFLAGS="$SGI_ABI $LDFLAGS"
3439 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3442$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
3460# XXX shouldn't some/most/all of this code be merged with the stuff later
3461# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3463$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003464
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003466if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003468 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003469 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003470 without_gcc=yes;;
3471 yes) CC=gcc
3472 without_gcc=no;;
3473 *) CC=$withval
3474 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003476else
Martin v. Löwis11437992002-04-12 09:54:03 +00003477
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003478 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003479 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003480 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003481 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003482 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003483fi
3484
Matthias Kloseb9621712010-04-24 17:59:49 +00003485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3486$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003487
Guido van Rossum8b131c51995-03-09 14:10:13 +00003488# If the user switches compilers, we can't believe the cache
3489if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3490then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003491 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003492(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003493fi
3494
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003495# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3496# when the compiler supports them, but we don't always want -O2, and
3497# we set -g later.
3498if test -z "$CFLAGS"; then
3499 CFLAGS=
3500fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003501
3502if test "$ac_sys_system" = "Darwin"
3503then
3504 # Compiler selection on MacOSX is more complicated than
3505 # AC_PROG_CC can handle, see Mac/README.txt for more
3506 # information
3507 if test -z "${CC}"
3508 then
3509 found_gcc=
3510 found_clang=
3511 as_save_IFS=$IFS; IFS=:
3512 for as_dir in $PATH
3513 do
3514 IFS=$as_save_IFS
3515 if test -x $as_dir/gcc; then
3516 if test -z "${found_gcc}"; then
3517 found_gcc=$as_dir/gcc
3518 fi
3519 fi
3520 if test -x $as_dir/clang; then
3521 if test -z "${found_clang}"; then
3522 found_clang=$as_dir/clang
3523 fi
3524 fi
3525 done
3526 IFS=$as_save_IFS
3527
3528 if test -n "$found_gcc" -a -n "$found_clang"
3529 then
3530 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3531 then
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3533$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3534 CC="$found_clang"
3535 CXX="$found_clang++"
3536 fi
3537
3538
3539 elif test -z "$found_gcc" -a -n "$found_clang"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3542$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545
3546 elif test -z "$found_gcc" -a -z "$found_clang"
3547 then
3548 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3549 if test -n "${found_clang}"
3550 then
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3552$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3553 CC="${found_clang}"
3554 CXX="`/usr/bin/xcrun -find clang++`"
3555
3556 # else: use default behaviour
3557 fi
3558 fi
3559 fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561ac_ext=c
3562ac_cpp='$CPP $CPPFLAGS'
3563ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3564ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3565ac_compiler_gnu=$ac_cv_c_compiler_gnu
3566if test -n "$ac_tool_prefix"; then
3567 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3568set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003571if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003573else
3574 if test -n "$CC"; then
3575 ac_cv_prog_CC="$CC" # Let the user override the test.
3576else
Martin v. Löwis11437992002-04-12 09:54:03 +00003577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $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 +00003586 break 2
3587 fi
3588done
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003591
Jack Jansendd19cf82001-12-06 22:36:17 +00003592fi
3593fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003594CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003595if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3597$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003598else
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601fi
3602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603
Martin v. Löwis11437992002-04-12 09:54:03 +00003604fi
3605if test -z "$ac_cv_prog_CC"; then
3606 ac_ct_CC=$CC
3607 # Extract the first word of "gcc", so it can be a program name with args.
3608set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3610$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003611if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003612 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003613else
3614 if test -n "$ac_ct_CC"; then
3615 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3616else
3617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3618for as_dir in $PATH
3619do
3620 IFS=$as_save_IFS
3621 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003622 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003624 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $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 +00003626 break 2
3627 fi
3628done
Matthias Kloseb9621712010-04-24 17:59:49 +00003629 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003631
3632fi
3633fi
3634ac_ct_CC=$ac_cv_prog_ac_ct_CC
3635if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3637$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003638else
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3640$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003641fi
3642
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643 if test "x$ac_ct_CC" = x; then
3644 CC=""
3645 else
3646 case $cross_compiling:$ac_tool_warned in
3647yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003648{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3649$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650ac_tool_warned=yes ;;
3651esac
3652 CC=$ac_ct_CC
3653 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654else
3655 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003656fi
3657
Jack Jansendd19cf82001-12-06 22:36:17 +00003658if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659 if test -n "$ac_tool_prefix"; then
3660 # 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 +00003661set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003664if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003666else
3667 if test -n "$CC"; then
3668 ac_cv_prog_CC="$CC" # Let the user override the test.
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
3685fi
3686fi
3687CC=$ac_cv_prog_CC
3688if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003691else
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003698fi
3699if test -z "$CC"; then
3700 # Extract the first word of "cc", so it can be a program name with args.
3701set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 if test -n "$CC"; then
3708 ac_cv_prog_CC="$CC" # Let the user override the test.
3709else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712for as_dir in $PATH
3713do
3714 IFS=$as_save_IFS
3715 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3719 ac_prog_rejected=yes
3720 continue
3721 fi
3722 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 $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 +00003724 break 2
3725 fi
3726done
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003729
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730if test $ac_prog_rejected = yes; then
3731 # We found a bogon in the path, so make sure we never use it.
3732 set dummy $ac_cv_prog_CC
3733 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003735 # We chose a different compiler from the bogus one.
3736 # However, it has the same basename, so the bogon will be chosen
3737 # first if we set CC to just the basename; use the full file name.
3738 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003739 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003740 fi
3741fi
3742fi
3743fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003744CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003745if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3747$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748else
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3750$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751fi
3752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755if test -z "$CC"; then
3756 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 do
3759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003763if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003764 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003765else
3766 if test -n "$CC"; then
3767 ac_cv_prog_CC="$CC" # Let the user override the test.
3768else
Martin v. Löwis11437992002-04-12 09:54:03 +00003769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3770for as_dir in $PATH
3771do
3772 IFS=$as_save_IFS
3773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003776 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 $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 +00003778 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003780done
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003782IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003783
3784fi
3785fi
3786CC=$ac_cv_prog_CC
3787if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3789$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003790else
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003793fi
3794
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796 test -n "$CC" && break
3797 done
3798fi
3799if test -z "$CC"; then
3800 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003802do
3803 # Extract the first word of "$ac_prog", so it can be a program name with args.
3804set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003807if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003809else
3810 if test -n "$ac_ct_CC"; then
3811 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3812else
3813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH
3815do
3816 IFS=$as_save_IFS
3817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $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 +00003822 break 2
3823 fi
3824done
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828fi
3829fi
3830ac_ct_CC=$ac_cv_prog_ac_ct_CC
3831if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3833$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 test -n "$ac_ct_CC" && break
3841done
Michael W. Hudson54241132001-12-07 15:38:26 +00003842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843 if test "x$ac_ct_CC" = x; then
3844 CC=""
3845 else
3846 case $cross_compiling:$ac_tool_warned in
3847yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850ac_tool_warned=yes ;;
3851esac
3852 CC=$ac_ct_CC
3853 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003854fi
3855
3856fi
3857
3858
Matthias Kloseb9621712010-04-24 17:59:49 +00003859test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003861as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003862See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003863
3864# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003865$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3866set X $ac_compile
3867ac_compiler=$2
3868for ac_option in --version -v -V -qversion; do
3869 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003870case "(($ac_try" in
3871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3872 *) ac_try_echo=$ac_try;;
3873esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3875$as_echo "$ac_try_echo"; } >&5
3876 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 if test -s conftest.err; then
3879 sed '10a\
3880... rest of stderr output deleted ...
3881 10q' conftest.err >conftest.er1
3882 cat conftest.er1 >&5
3883 fi
3884 rm -f conftest.er1 conftest.err
3885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3886 test $ac_status = 0; }
3887done
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003890/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003891
Martin v. Löwis11437992002-04-12 09:54:03 +00003892int
3893main ()
3894{
3895
3896 ;
3897 return 0;
3898}
3899_ACEOF
3900ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003901ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003902# Try to create an executable without -o first, disregard a.out.
3903# It will help us diagnose broken compilers, and finding out an intuition
3904# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3906$as_echo_n "checking whether the C compiler works... " >&6; }
3907ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3908
3909# The possible output files:
3910ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912ac_rmfiles=
3913for ac_file in $ac_files
3914do
3915 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3918 esac
3919done
3920rm -f $ac_rmfiles
3921
Matthias Kloseb9621712010-04-24 17:59:49 +00003922if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003927eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3928$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003930 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3932 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3934# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3935# in a Makefile. We should not override ac_cv_exeext if it was cached,
3936# so that the user can short-circuit this test for compilers unknown to
3937# Autoconf.
3938for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003939do
3940 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003943 ;;
3944 [ab].out )
3945 # We found the default executable, but exeext='' is most
3946 # certainly right.
3947 break;;
3948 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003950 then :; else
3951 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3952 fi
3953 # We set ac_cv_exeext here because the later test for it is not
3954 # safe: cross compilers may not add the suffix if given an `-o'
3955 # argument, so we may need to know it at that point already.
3956 # Even if this section looks crufty: it has the advantage of
3957 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958 break;;
3959 * )
3960 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 esac
3962done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963test "$ac_cv_exeext" = no && ac_cv_exeext=
3964
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003965else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 ac_file=''
3967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003968if test -z "$ac_file"; then :
3969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3970$as_echo "no" >&6; }
3971$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003972sed 's/^/| /' conftest.$ac_ext >&5
3973
Matthias Kloseb9621712010-04-24 17:59:49 +00003974{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003976as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003977See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003978else
3979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3980$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3983$as_echo_n "checking for C compiler default output file name... " >&6; }
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3985$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987
Matthias Kloseb9621712010-04-24 17:59:49 +00003988rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003989ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3991$as_echo_n "checking for suffix of executables... " >&6; }
3992if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993case "(($ac_try" in
3994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3995 *) ac_try_echo=$ac_try;;
3996esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3998$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003999 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004001 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4002 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4004# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4005# work properly (i.e., refer to `conftest.exe'), while it won't with
4006# `rm'.
4007for ac_file in conftest.exe conftest conftest.*; do
4008 test -f "$ac_file" || continue
4009 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4012 break;;
4013 * ) break;;
4014 esac
4015done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004016else
Matthias Kloseb9621712010-04-24 17:59:49 +00004017 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f conftest conftest$ac_cv_exeext
4023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4024$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025
4026rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004027EXEEXT=$ac_cv_exeext
4028ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4030/* end confdefs.h. */
4031#include <stdio.h>
4032int
4033main ()
4034{
4035FILE *f = fopen ("conftest.out", "w");
4036 return ferror (f) || fclose (f) != 0;
4037
4038 ;
4039 return 0;
4040}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004042ac_clean_files="$ac_clean_files conftest.out"
4043# Check that the compiler produces executables we can run. If not, either
4044# the compiler is broken, or we cross compile.
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4046$as_echo_n "checking whether we are cross compiling... " >&6; }
4047if test "$cross_compiling" != yes; then
4048 { { ac_try="$ac_link"
4049case "(($ac_try" in
4050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4051 *) ac_try_echo=$ac_try;;
4052esac
4053eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4054$as_echo "$ac_try_echo"; } >&5
4055 (eval "$ac_link") 2>&5
4056 ac_status=$?
4057 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4058 test $ac_status = 0; }
4059 if { ac_try='./conftest$ac_cv_exeext'
4060 { { case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_try") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }; }; then
4070 cross_compiling=no
4071 else
4072 if test "$cross_compiling" = maybe; then
4073 cross_compiling=yes
4074 else
4075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004077as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004078If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004079See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 fi
4081 fi
4082fi
4083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4084$as_echo "$cross_compiling" >&6; }
4085
4086rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4087ac_clean_files=$ac_clean_files_save
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4089$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004090if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 $as_echo_n "(cached) " >&6
4092else
4093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094/* end confdefs.h. */
4095
4096int
4097main ()
4098{
4099
4100 ;
4101 return 0;
4102}
4103_ACEOF
4104rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004105if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004110eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4111$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004113 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4115 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004116 for ac_file in conftest.o conftest.obj conftest.*; do
4117 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4121 break;;
4122 esac
4123done
4124else
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004126sed 's/^/| /' conftest.$ac_ext >&5
4127
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004130as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004131See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4136$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004137OBJEXT=$ac_cv_objext
4138ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4140$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004141if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004143else
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004146
Martin v. Löwis11437992002-04-12 09:54:03 +00004147int
4148main ()
4149{
4150#ifndef __GNUC__
4151 choke me
4152#endif
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_compiler_gnu=yes
4160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004164ac_cv_c_compiler_gnu=$ac_compiler_gnu
4165
4166fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4168$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4169if test $ac_compiler_gnu = yes; then
4170 GCC=yes
4171else
4172 GCC=
4173fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004174ac_test_CFLAGS=${CFLAGS+set}
4175ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4177$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004178if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004179 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004180else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004181 ac_save_c_werror_flag=$ac_c_werror_flag
4182 ac_c_werror_flag=yes
4183 ac_cv_prog_cc_g=no
4184 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004187
Martin v. Löwis11437992002-04-12 09:54:03 +00004188int
4189main ()
4190{
4191
4192 ;
4193 return 0;
4194}
4195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004196if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004197 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198else
Matthias Kloseb9621712010-04-24 17:59:49 +00004199 CFLAGS=""
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201/* end confdefs.h. */
4202
4203int
4204main ()
4205{
4206
4207 ;
4208 return 0;
4209}
4210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004211if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212
Matthias Kloseb9621712010-04-24 17:59:49 +00004213else
4214 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004217/* end confdefs.h. */
4218
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4235 ac_c_werror_flag=$ac_save_c_werror_flag
4236fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4238$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004239if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004241elif test $ac_cv_prog_cc_g = yes; then
4242 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004243 CFLAGS="-g -O2"
4244 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004245 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004246 fi
4247else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248 if test "$GCC" = yes; then
4249 CFLAGS="-O2"
4250 else
4251 CFLAGS=
4252 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4255$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004256if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004258else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004260ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004262/* end confdefs.h. */
4263#include <stdarg.h>
4264#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004265struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004266/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4267struct buf { int x; };
4268FILE * (*rcsopen) (struct buf *, struct stat *, int);
4269static char *e (p, i)
4270 char **p;
4271 int i;
4272{
4273 return p[i];
4274}
4275static char *f (char * (*g) (char **, int), char **p, ...)
4276{
4277 char *s;
4278 va_list v;
4279 va_start (v,p);
4280 s = g (p, va_arg (v,int));
4281 va_end (v);
4282 return s;
4283}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004284
4285/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4286 function prototypes and stuff, but not '\xHH' hex character constants.
4287 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4290 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4295 inside strings and character constants. */
4296#define FOO(x) 'x'
4297int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4298
Skip Montanaro6dead952003-09-25 14:50:04 +00004299int test (int i, double x);
4300struct s1 {int (*f) (int a);};
4301struct s2 {int (*f) (double a);};
4302int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4303int argc;
4304char **argv;
4305int
4306main ()
4307{
4308return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4309 ;
4310 return 0;
4311}
4312_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4314 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004315do
4316 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004317 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004320rm -f core conftest.err conftest.$ac_objext
4321 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004322done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004324CC=$ac_save_CC
4325
4326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327# AC_CACHE_VAL
4328case "x$ac_cv_prog_cc_c89" in
4329 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4331$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4334$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004335 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4338$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004339esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004340if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004341
Matthias Kloseb9621712010-04-24 17:59:49 +00004342fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004343
Martin v. Löwis11437992002-04-12 09:54:03 +00004344ac_ext=c
4345ac_cpp='$CPP $CPPFLAGS'
4346ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4347ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4348ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004349
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004350
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004351
4352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4354$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004359
4360 case $withval in
4361 no) with_cxx_main=no
4362 MAINCC='$(CC)';;
4363 yes) with_cxx_main=yes
4364 MAINCC='$(CXX)';;
4365 *) with_cxx_main=yes
4366 MAINCC=$withval
4367 if test -z "$CXX"
4368 then
4369 CXX=$withval
4370 fi;;
4371 esac
4372else
4373
4374 with_cxx_main=no
4375 MAINCC='$(CC)'
4376
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377fi
4378
Matthias Kloseb9621712010-04-24 17:59:49 +00004379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4380$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004381
4382preset_cxx="$CXX"
4383if test -z "$CXX"
4384then
4385 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004386 gcc) if test -n "$ac_tool_prefix"; then
4387 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4388set dummy ${ac_tool_prefix}g++; ac_word=$2
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4390$as_echo_n "checking for $ac_word... " >&6; }
4391if ${ac_cv_path_CXX+:} false; then :
4392 $as_echo_n "(cached) " >&6
4393else
4394 case $CXX in
4395 [\\/]* | ?:[\\/]*)
4396 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4397 ;;
4398 *)
4399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in notfound
4401do
4402 IFS=$as_save_IFS
4403 test -z "$as_dir" && as_dir=.
4404 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004406 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4408 break 2
4409 fi
4410done
4411 done
4412IFS=$as_save_IFS
4413
4414 ;;
4415esac
4416fi
4417CXX=$ac_cv_path_CXX
4418if test -n "$CXX"; then
4419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4420$as_echo "$CXX" >&6; }
4421else
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4423$as_echo "no" >&6; }
4424fi
4425
4426
4427fi
4428if test -z "$ac_cv_path_CXX"; then
4429 ac_pt_CXX=$CXX
4430 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004431set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004434if ${ac_cv_path_ac_pt_CXX+:} false; then :
4435 $as_echo_n "(cached) " >&6
4436else
4437 case $ac_pt_CXX in
4438 [\\/]* | ?:[\\/]*)
4439 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4440 ;;
4441 *)
4442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in notfound
4444do
4445 IFS=$as_save_IFS
4446 test -z "$as_dir" && as_dir=.
4447 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004449 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451 break 2
4452 fi
4453done
4454 done
4455IFS=$as_save_IFS
4456
4457 ;;
4458esac
4459fi
4460ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4461if test -n "$ac_pt_CXX"; then
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4463$as_echo "$ac_pt_CXX" >&6; }
4464else
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
4467fi
4468
4469 if test "x$ac_pt_CXX" = x; then
4470 CXX="g++"
4471 else
4472 case $cross_compiling:$ac_tool_warned in
4473yes:)
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4475$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4476ac_tool_warned=yes ;;
4477esac
4478 CXX=$ac_pt_CXX
4479 fi
4480else
4481 CXX="$ac_cv_path_CXX"
4482fi
4483 ;;
4484 cc) if test -n "$ac_tool_prefix"; then
4485 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4486set dummy ${ac_tool_prefix}c++; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004489if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004490 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004491else
4492 case $CXX in
4493 [\\/]* | ?:[\\/]*)
4494 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4495 ;;
4496 *)
4497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in notfound
4499do
4500 IFS=$as_save_IFS
4501 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004502 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004506 break 2
4507 fi
4508done
Matthias Kloseb9621712010-04-24 17:59:49 +00004509 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004510IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004511
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004512 ;;
4513esac
4514fi
4515CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004516if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4518$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004519else
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004523
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004524
4525fi
4526if test -z "$ac_cv_path_CXX"; then
4527 ac_pt_CXX=$CXX
4528 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004529set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4531$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004532if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004533 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004534else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004536 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004537 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 +00004538 ;;
4539 *)
4540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541for as_dir in notfound
4542do
4543 IFS=$as_save_IFS
4544 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004545 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004547 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 break 2
4550 fi
4551done
Matthias Kloseb9621712010-04-24 17:59:49 +00004552 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004553IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004554
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004555 ;;
4556esac
4557fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004558ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4559if test -n "$ac_pt_CXX"; then
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4561$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004562else
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004566
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004567 if test "x$ac_pt_CXX" = x; then
4568 CXX="c++"
4569 else
4570 case $cross_compiling:$ac_tool_warned in
4571yes:)
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4574ac_tool_warned=yes ;;
4575esac
4576 CXX=$ac_pt_CXX
4577 fi
4578else
4579 CXX="$ac_cv_path_CXX"
4580fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004582 clang|*/clang) if test -n "$ac_tool_prefix"; then
4583 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4584set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586$as_echo_n "checking for $ac_word... " >&6; }
4587if ${ac_cv_path_CXX+:} false; then :
4588 $as_echo_n "(cached) " >&6
4589else
4590 case $CXX in
4591 [\\/]* | ?:[\\/]*)
4592 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4593 ;;
4594 *)
4595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4596for as_dir in notfound
4597do
4598 IFS=$as_save_IFS
4599 test -z "$as_dir" && as_dir=.
4600 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004601 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004602 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4604 break 2
4605 fi
4606done
4607 done
4608IFS=$as_save_IFS
4609
Ned Deilycbfb9a52012-06-23 16:02:19 -07004610 ;;
4611esac
4612fi
4613CXX=$ac_cv_path_CXX
4614if test -n "$CXX"; then
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4616$as_echo "$CXX" >&6; }
4617else
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619$as_echo "no" >&6; }
4620fi
4621
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004622
4623fi
4624if test -z "$ac_cv_path_CXX"; then
4625 ac_pt_CXX=$CXX
4626 # Extract the first word of "clang++", so it can be a program name with args.
4627set dummy clang++; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_ac_pt_CXX+:} false; then :
4631 $as_echo_n "(cached) " >&6
4632else
4633 case $ac_pt_CXX in
4634 [\\/]* | ?:[\\/]*)
4635 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4636 ;;
4637 *)
4638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in notfound
4640do
4641 IFS=$as_save_IFS
4642 test -z "$as_dir" && as_dir=.
4643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004645 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647 break 2
4648 fi
4649done
4650 done
4651IFS=$as_save_IFS
4652
4653 ;;
4654esac
4655fi
4656ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4657if test -n "$ac_pt_CXX"; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4659$as_echo "$ac_pt_CXX" >&6; }
4660else
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665 if test "x$ac_pt_CXX" = x; then
4666 CXX="clang++"
4667 else
4668 case $cross_compiling:$ac_tool_warned in
4669yes:)
4670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4672ac_tool_warned=yes ;;
4673esac
4674 CXX=$ac_pt_CXX
4675 fi
4676else
4677 CXX="$ac_cv_path_CXX"
4678fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004679 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004680 esac
4681 if test "$CXX" = "notfound"
4682 then
4683 CXX=""
4684 fi
4685fi
4686if test -z "$CXX"
4687then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 if test -n "$ac_tool_prefix"; then
4689 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4690 do
4691 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4692set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004695if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004696 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004697else
4698 if test -n "$CXX"; then
4699 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4700else
4701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4702for as_dir in $PATH
4703do
4704 IFS=$as_save_IFS
4705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004708 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710 break 2
4711 fi
4712done
Matthias Kloseb9621712010-04-24 17:59:49 +00004713 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004714IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004715
4716fi
4717fi
4718CXX=$ac_cv_prog_CXX
4719if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4721$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722else
Matthias Kloseb9621712010-04-24 17:59:49 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4724$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725fi
4726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004727
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004728 test -n "$CXX" && break
4729 done
4730fi
4731if test -z "$CXX"; then
4732 ac_ct_CXX=$CXX
4733 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4734do
4735 # Extract the first word of "$ac_prog", so it can be a program name with args.
4736set dummy $ac_prog; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742 if test -n "$ac_ct_CXX"; then
4743 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4744else
4745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in $PATH
4747do
4748 IFS=$as_save_IFS
4749 test -z "$as_dir" && as_dir=.
4750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 ac_cv_prog_ac_ct_CXX="$ac_prog"
4753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754 break 2
4755 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 done
4758IFS=$as_save_IFS
4759
4760fi
4761fi
4762ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4763if test -n "$ac_ct_CXX"; then
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4765$as_echo "$ac_ct_CXX" >&6; }
4766else
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4768$as_echo "no" >&6; }
4769fi
4770
4771
4772 test -n "$ac_ct_CXX" && break
4773done
4774
4775 if test "x$ac_ct_CXX" = x; then
4776 CXX="notfound"
4777 else
4778 case $cross_compiling:$ac_tool_warned in
4779yes:)
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4781$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4782ac_tool_warned=yes ;;
4783esac
4784 CXX=$ac_ct_CXX
4785 fi
4786fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004787
4788 if test "$CXX" = "notfound"
4789 then
4790 CXX=""
4791 fi
4792fi
4793if test "$preset_cxx" != "$CXX"
4794then
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
4797 By default, distutils will build C++ extension modules with \"$CXX\".
4798 If this is not intended, then set CXX on the configure command line.
4799 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004800$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004801
4802 By default, distutils will build C++ extension modules with \"$CXX\".
4803 If this is not intended, then set CXX on the configure command line.
4804 " >&2;}
4805fi
4806
4807
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4809$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4810save_LDFLAGS="$LDFLAGS"
4811LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004812
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814/* end confdefs.h. */
4815
4816int
4817main ()
4818{
4819
4820 ;
4821 return 0;
4822}
4823_ACEOF
4824if ac_fn_c_try_link "$LINENO"; then :
4825 NO_AS_NEEDED="-Wl,--no-as-needed"
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4827$as_echo "yes" >&6; }
4828else
4829 NO_AS_NEEDED=""
4830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4831$as_echo "no" >&6; }
4832fi
4833rm -f core conftest.err conftest.$ac_objext \
4834 conftest$ac_exeext conftest.$ac_ext
4835LDFLAGS="$save_LDFLAGS"
4836
4837
4838
4839# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004840ac_ext=c
4841ac_cpp='$CPP $CPPFLAGS'
4842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4844ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4846$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004847# On Suns, sometimes $CPP names a directory.
4848if test -n "$CPP" && test -d "$CPP"; then
4849 CPP=
4850fi
4851if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004852 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004854else
Martin v. Löwis11437992002-04-12 09:54:03 +00004855 # Double quotes because CPP needs to be expanded
4856 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4857 do
4858 ac_preproc_ok=false
4859for ac_c_preproc_warn_flag in '' yes
4860do
4861 # Use a header file that comes with gcc, so configuring glibc
4862 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004863 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4864 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004865 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004868/* end confdefs.h. */
4869#ifdef __STDC__
4870# include <limits.h>
4871#else
4872# include <assert.h>
4873#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004874 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004876if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004877
Matthias Kloseb9621712010-04-24 17:59:49 +00004878else
Martin v. Löwis11437992002-04-12 09:54:03 +00004879 # Broken: fails on valid input.
4880continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004881fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004882rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004884 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004885 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004888#include <ac_nonexistent.h>
4889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004890if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004891 # Broken: success on invalid input.
4892continue
4893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # Passes both tests.
4895ac_preproc_ok=:
4896break
4897fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004898rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004899
4900done
4901# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004902rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004903if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 break
4905fi
4906
4907 done
4908 ac_cv_prog_CPP=$CPP
4909
4910fi
4911 CPP=$ac_cv_prog_CPP
4912else
4913 ac_cv_prog_CPP=$CPP
4914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4916$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004917ac_preproc_ok=false
4918for ac_c_preproc_warn_flag in '' yes
4919do
4920 # Use a header file that comes with gcc, so configuring glibc
4921 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004922 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4923 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004924 # On the NeXT, cc -E runs the code through the compiler's parser,
4925 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004927/* end confdefs.h. */
4928#ifdef __STDC__
4929# include <limits.h>
4930#else
4931# include <assert.h>
4932#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004933 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004935if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004936
Matthias Kloseb9621712010-04-24 17:59:49 +00004937else
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 # Broken: fails on valid input.
4939continue
4940fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004941rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004943 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004944 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004947#include <ac_nonexistent.h>
4948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004949if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004950 # Broken: success on invalid input.
4951continue
4952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 # Passes both tests.
4954ac_preproc_ok=:
4955break
4956fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004957rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004958
4959done
4960# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004961rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004962if $ac_preproc_ok; then :
4963
Martin v. Löwis11437992002-04-12 09:54:03 +00004964else
Matthias Kloseb9621712010-04-24 17:59:49 +00004965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004967as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004968See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004969fi
4970
4971ac_ext=c
4972ac_cpp='$CPP $CPPFLAGS'
4973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4975ac_compiler_gnu=$ac_cv_c_compiler_gnu
4976
4977
Matthias Kloseb9621712010-04-24 17:59:49 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4979$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004980if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004982else
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004984 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004985 # Loop through the user's path and test for each of PROGNAME-LIST
4986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004987for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004991 for ac_prog in grep ggrep; do
4992 for ac_exec_ext in '' $ac_executable_extensions; do
4993 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004994 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004995# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996 # Check for GNU $ac_path_GREP
4997case `"$ac_path_GREP" --version 2>&1` in
4998*GNU*)
4999 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5000*)
5001 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005003 while :
5004 do
5005 cat "conftest.in" "conftest.in" >"conftest.tmp"
5006 mv "conftest.tmp" "conftest.in"
5007 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005008 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005009 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5010 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5013 # Best one so far, save it but keep looking for a better one
5014 ac_cv_path_GREP="$ac_path_GREP"
5015 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005016 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005017 # 10*(2^10) chars as input seems more than enough
5018 test $ac_count -gt 10 && break
5019 done
5020 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5021esac
5022
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $ac_path_GREP_found && break 3
5024 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005025 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005027IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005029 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 +00005030 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005031else
5032 ac_cv_path_GREP=$GREP
5033fi
5034
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5037$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038 GREP="$ac_cv_path_GREP"
5039
5040
Matthias Kloseb9621712010-04-24 17:59:49 +00005041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5042$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005043if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005045else
5046 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5047 then ac_cv_path_EGREP="$GREP -E"
5048 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005050 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 # Loop through the user's path and test for each of PROGNAME-LIST
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 for ac_prog in egrep; do
5058 for ac_exec_ext in '' $ac_executable_extensions; do
5059 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005060 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005061# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062 # Check for GNU $ac_path_EGREP
5063case `"$ac_path_EGREP" --version 2>&1` in
5064*GNU*)
5065 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5066*)
5067 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005069 while :
5070 do
5071 cat "conftest.in" "conftest.in" >"conftest.tmp"
5072 mv "conftest.tmp" "conftest.in"
5073 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005074 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005075 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5076 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005078 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5079 # Best one so far, save it but keep looking for a better one
5080 ac_cv_path_EGREP="$ac_path_EGREP"
5081 ac_path_EGREP_max=$ac_count
5082 fi
5083 # 10*(2^10) chars as input seems more than enough
5084 test $ac_count -gt 10 && break
5085 done
5086 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5087esac
5088
Matthias Kloseb9621712010-04-24 17:59:49 +00005089 $ac_path_EGREP_found && break 3
5090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005093IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005094 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005095 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 +00005096 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005097else
5098 ac_cv_path_EGREP=$EGREP
5099fi
5100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005101 fi
5102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5104$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005106
5107
Matthias Kloseb9621712010-04-24 17:59:49 +00005108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5109$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005110if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 $as_echo_n "(cached) " >&6
5112else
5113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005114/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005115#include <stdlib.h>
5116#include <stdarg.h>
5117#include <string.h>
5118#include <float.h>
5119
5120int
5121main ()
5122{
5123
5124 ;
5125 return 0;
5126}
5127_ACEOF
5128if ac_fn_c_try_compile "$LINENO"; then :
5129 ac_cv_header_stdc=yes
5130else
5131 ac_cv_header_stdc=no
5132fi
5133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5134
5135if test $ac_cv_header_stdc = yes; then
5136 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5138/* end confdefs.h. */
5139#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005140
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005141_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005143 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005144
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145else
Matthias Kloseb9621712010-04-24 17:59:49 +00005146 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005148rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005149
Matthias Kloseb9621712010-04-24 17:59:49 +00005150fi
5151
5152if test $ac_cv_header_stdc = yes; then
5153 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5155/* end confdefs.h. */
5156#include <stdlib.h>
5157
5158_ACEOF
5159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5160 $EGREP "free" >/dev/null 2>&1; then :
5161
5162else
5163 ac_cv_header_stdc=no
5164fi
5165rm -f conftest*
5166
5167fi
5168
5169if test $ac_cv_header_stdc = yes; then
5170 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5171 if test "$cross_compiling" = yes; then :
5172 :
5173else
5174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5175/* end confdefs.h. */
5176#include <ctype.h>
5177#include <stdlib.h>
5178#if ((' ' & 0x0FF) == 0x020)
5179# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5180# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5181#else
5182# define ISLOWER(c) \
5183 (('a' <= (c) && (c) <= 'i') \
5184 || ('j' <= (c) && (c) <= 'r') \
5185 || ('s' <= (c) && (c) <= 'z'))
5186# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5187#endif
5188
5189#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5190int
5191main ()
5192{
5193 int i;
5194 for (i = 0; i < 256; i++)
5195 if (XOR (islower (i), ISLOWER (i))
5196 || toupper (i) != TOUPPER (i))
5197 return 2;
5198 return 0;
5199}
5200_ACEOF
5201if ac_fn_c_try_run "$LINENO"; then :
5202
5203else
5204 ac_cv_header_stdc=no
5205fi
5206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5207 conftest.$ac_objext conftest.beam conftest.$ac_ext
5208fi
5209
5210fi
5211fi
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5213$as_echo "$ac_cv_header_stdc" >&6; }
5214if test $ac_cv_header_stdc = yes; then
5215
5216$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5217
5218fi
5219
5220# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5221for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5222 inttypes.h stdint.h unistd.h
5223do :
5224 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5225ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5226"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005227if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005228 cat >>confdefs.h <<_ACEOF
5229#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5230_ACEOF
5231
5232fi
5233
5234done
5235
5236
5237
5238 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 +02005239if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005240 MINIX=yes
5241else
5242 MINIX=
5243fi
5244
5245
5246 if test "$MINIX" = yes; then
5247
5248$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5249
5250
5251$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5252
5253
5254$as_echo "#define _MINIX 1" >>confdefs.h
5255
5256 fi
5257
5258
5259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5260$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005261if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005262 $as_echo_n "(cached) " >&6
5263else
5264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5265/* end confdefs.h. */
5266
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005267# define __EXTENSIONS__ 1
5268 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005269int
5270main ()
5271{
5272
5273 ;
5274 return 0;
5275}
5276_ACEOF
5277if ac_fn_c_try_compile "$LINENO"; then :
5278 ac_cv_safe_to_define___extensions__=yes
5279else
5280 ac_cv_safe_to_define___extensions__=no
5281fi
5282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5283fi
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5285$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5286 test $ac_cv_safe_to_define___extensions__ = yes &&
5287 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5288
5289 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5290
5291 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5292
5293 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5294
5295 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5296
5297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299# Check for unsupported systems
5300case $ac_sys_system/$ac_sys_release in
5301atheos*|Linux*/1*)
5302 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5303 echo See README for details.
5304 exit 1;;
5305esac
5306
5307
Matthias Kloseb9621712010-04-24 17:59:49 +00005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5309$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310
5311# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005312if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005313 withval=$with_suffix;
5314 case $withval in
5315 no) EXEEXT=;;
5316 yes) EXEEXT=.exe;;
5317 *) EXEEXT=$withval;;
5318 esac
5319fi
5320
Matthias Kloseb9621712010-04-24 17:59:49 +00005321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5322$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005323
5324# Test whether we're running on a non-case-sensitive system, in which
5325# case we give a warning if no ext is given
5326
Matthias Kloseb9621712010-04-24 17:59:49 +00005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5328$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005329if test ! -d CaseSensitiveTestDir; then
5330mkdir CaseSensitiveTestDir
5331fi
5332
5333if test -d casesensitivetestdir
5334then
Matthias Kloseb9621712010-04-24 17:59:49 +00005335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5336$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005337 BUILDEXEEXT=.exe
5338else
Matthias Kloseb9621712010-04-24 17:59:49 +00005339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005341 BUILDEXEEXT=$EXEEXT
5342fi
5343rmdir CaseSensitiveTestDir
5344
5345case $MACHDEP in
5346bsdos*)
5347 case $CC in
5348 gcc) CC="$CC -D_HAVE_BSDI";;
5349 esac;;
5350esac
5351
5352case $ac_sys_system in
5353hp*|HP*)
5354 case $CC in
5355 cc|*/cc) CC="$CC -Ae";;
5356 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005357esac
5358
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005359MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5360
5361
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005362
5363
Matthias Kloseb9621712010-04-24 17:59:49 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5365$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366if test -z "$LIBRARY"
5367then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005368 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5371$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005372
5373# LDLIBRARY is the name of the library to link against (as opposed to the
5374# name of the library into which to insert object files). BLDLIBRARY is also
5375# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5376# is blank as the main program is not linked directly against LDLIBRARY.
5377# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5378# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5379# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5380# DLLLIBRARY is the shared (i.e., DLL) library.
5381#
5382# RUNSHARED is used to run shared python without installed libraries
5383#
5384# INSTSONAME is the name of the shared library that will be use to install
5385# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005386#
5387# LDVERSION is the shared library version number, normally the Python version
5388# with the ABI build flags appended.
5389
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005390
5391
5392
5393
5394
5395
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005396
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005397LDLIBRARY="$LIBRARY"
5398BLDLIBRARY='$(LDLIBRARY)'
5399INSTSONAME='$(LDLIBRARY)'
5400DLLLIBRARY=''
5401LDLIBRARYDIR=''
5402RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005403LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005404
5405# LINKCC is the command that links the python executable -- default is $(CC).
5406# If CXX is set, and if it is needed to link a main function that was
5407# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5408# python might then depend on the C++ runtime
5409# This is altered for AIX in order to build the export list before
5410# linking.
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5413$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005414if test -z "$LINKCC"
5415then
5416 LINKCC='$(PURIFY) $(MAINCC)'
5417 case $ac_sys_system in
5418 AIX*)
5419 exp_extra="\"\""
5420 if test $ac_sys_release -ge 5 -o \
5421 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5422 exp_extra="."
5423 fi
5424 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425 QNX*)
5426 # qcc must be used because the other compilers do not
5427 # support -N.
5428 LINKCC=qcc;;
5429 esac
5430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5432$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005433
5434# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5435# make sure we default having it set to "no": this is used by
5436# distutils.unixccompiler to know if it should add --enable-new-dtags
5437# to linker command lines, and failing to detect GNU ld simply results
5438# in the same bahaviour as before.
5439
Matthias Kloseb9621712010-04-24 17:59:49 +00005440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5441$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442ac_prog=ld
5443if test "$GCC" = yes; then
5444 ac_prog=`$CC -print-prog-name=ld`
5445fi
5446case `"$ac_prog" -V 2>&1 < /dev/null` in
5447 *GNU*)
5448 GNULD=yes;;
5449 *)
5450 GNULD=no;;
5451esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5453$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005454
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5456$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005457if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005458 $as_echo_n "(cached) " >&6
5459else
5460 ac_cv_c_inline=no
5461for ac_kw in inline __inline__ __inline; do
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h. */
5464#ifndef __cplusplus
5465typedef int foo_t;
5466static $ac_kw foo_t static_foo () {return 0; }
5467$ac_kw foo_t foo () {return 0; }
5468#endif
5469
5470_ACEOF
5471if ac_fn_c_try_compile "$LINENO"; then :
5472 ac_cv_c_inline=$ac_kw
5473fi
5474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5475 test "$ac_cv_c_inline" != no && break
5476done
5477
5478fi
5479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5480$as_echo "$ac_cv_c_inline" >&6; }
5481
5482case $ac_cv_c_inline in
5483 inline | yes) ;;
5484 *)
5485 case $ac_cv_c_inline in
5486 no) ac_val=;;
5487 *) ac_val=$ac_cv_c_inline;;
5488 esac
5489 cat >>confdefs.h <<_ACEOF
5490#ifndef __cplusplus
5491#define inline $ac_val
5492#endif
5493_ACEOF
5494 ;;
5495esac
5496
5497if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005498
5499$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005500
5501
5502fi
5503
5504
Matthias Kloseb9621712010-04-24 17:59:49 +00005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5506$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005508if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005509 enableval=$enable_shared;
5510fi
5511
5512
5513if test -z "$enable_shared"
5514then
5515 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005516 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005517 enable_shared="yes";;
5518 *)
5519 enable_shared="no";;
5520 esac
5521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5523$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
Matthias Kloseb9621712010-04-24 17:59:49 +00005525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5526$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005528if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005529 enableval=$enable_profiling;
5530fi
5531
5532if test "x$enable_profiling" = xyes; then
5533 ac_save_cc="$CC"
5534 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536/* end confdefs.h. */
5537int main() { return 0; }
5538_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005539if ac_fn_c_try_link "$LINENO"; then :
5540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005543fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005544rm -f core conftest.err conftest.$ac_objext \
5545 conftest$ac_exeext conftest.$ac_ext
5546 CC="$ac_save_cc"
5547else
5548 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005549fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5551$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553if test "x$enable_profiling" = xyes; then
5554 BASECFLAGS="-pg $BASECFLAGS"
5555 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005556fi
5557
Matthias Kloseb9621712010-04-24 17:59:49 +00005558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5559$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560
5561# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5562# library that we build, but we do not want to link against it (we
5563# will find it with a -framework option). For this reason there is an
5564# extra variable BLDLIBRARY against which Python and the extension
5565# modules are linked, BLDLIBRARY. This is normally the same as
5566# LDLIBRARY, but empty for MacOSX framework builds.
5567if test "$enable_framework"
5568then
5569 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5570 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5571 BLDLIBRARY=''
5572else
5573 BLDLIBRARY='$(LDLIBRARY)'
5574fi
5575
5576# Other platforms follow
5577if test $enable_shared = "yes"; then
5578
Matthias Kloseb9621712010-04-24 17:59:49 +00005579$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580
5581 case $ac_sys_system in
5582 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005583 LDLIBRARY='libpython$(LDVERSION).dll.a'
5584 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005585 ;;
5586 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005587 LDLIBRARY='libpython$(LDVERSION).so'
5588 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5590 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005591 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005592 then
5593 PY3LIBRARY=libpython3.so
5594 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005595 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005596 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005597 LDLIBRARY='libpython$(LDVERSION).so'
5598 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5600 case $ac_sys_system in
5601 FreeBSD*)
5602 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5603 ;;
5604 esac
5605 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005606 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005607 then
5608 PY3LIBRARY=libpython3.so
5609 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610 ;;
5611 hp*|HP*)
5612 case `uname -m` in
5613 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005614 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005615 ;;
5616 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005617 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618 ;;
5619 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005620 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5622 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005623 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005624 LDLIBRARY='libpython$(LDVERSION).dylib'
5625 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005626 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5627 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005628 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005630 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5631 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632
5633 esac
5634else # shared is disabled
5635 case $ac_sys_system in
5636 CYGWIN*)
5637 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005638 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639 ;;
5640 esac
5641fi
5642
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005643if test "$cross_compiling" = yes; then
5644 RUNSHARED=
5645fi
5646
Matthias Kloseb9621712010-04-24 17:59:49 +00005647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5648$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
5650if test -n "$ac_tool_prefix"; then
5651 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5652set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5654$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005655if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005656 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657else
5658 if test -n "$RANLIB"; then
5659 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5660else
5661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664 IFS=$as_save_IFS
5665 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005666 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670 break 2
5671 fi
5672done
Matthias Kloseb9621712010-04-24 17:59:49 +00005673 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674IFS=$as_save_IFS
5675
5676fi
5677fi
5678RANLIB=$ac_cv_prog_RANLIB
5679if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5681$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682else
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685fi
5686
5687
5688fi
5689if test -z "$ac_cv_prog_RANLIB"; then
5690 ac_ct_RANLIB=$RANLIB
5691 # Extract the first word of "ranlib", so it can be a program name with args.
5692set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5694$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005695if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697else
5698 if test -n "$ac_ct_RANLIB"; then
5699 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5700else
5701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5702for as_dir in $PATH
5703do
5704 IFS=$as_save_IFS
5705 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005706 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005707 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710 break 2
5711 fi
5712done
Matthias Kloseb9621712010-04-24 17:59:49 +00005713 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714IFS=$as_save_IFS
5715
5716fi
5717fi
5718ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5719if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5721$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005722else
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725fi
5726
5727 if test "x$ac_ct_RANLIB" = x; then
5728 RANLIB=":"
5729 else
5730 case $cross_compiling:$ac_tool_warned in
5731yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734ac_tool_warned=yes ;;
5735esac
5736 RANLIB=$ac_ct_RANLIB
5737 fi
5738else
5739 RANLIB="$ac_cv_prog_RANLIB"
5740fi
5741
5742
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005743if test -n "$ac_tool_prefix"; then
5744 for ac_prog in ar aal
5745 do
5746 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5747set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5749$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005750if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005751 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752else
5753 if test -n "$AR"; then
5754 ac_cv_prog_AR="$AR" # Let the user override the test.
5755else
5756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5757for as_dir in $PATH
5758do
5759 IFS=$as_save_IFS
5760 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005763 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 break 2
5766 fi
5767done
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769IFS=$as_save_IFS
5770
5771fi
5772fi
5773AR=$ac_cv_prog_AR
5774if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5776$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777else
Matthias Kloseb9621712010-04-24 17:59:49 +00005778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5779$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780fi
5781
5782
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005783 test -n "$AR" && break
5784 done
5785fi
5786if test -z "$AR"; then
5787 ac_ct_AR=$AR
5788 for ac_prog in ar aal
5789do
5790 # Extract the first word of "$ac_prog", so it can be a program name with args.
5791set dummy $ac_prog; ac_word=$2
5792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5793$as_echo_n "checking for $ac_word... " >&6; }
5794if ${ac_cv_prog_ac_ct_AR+:} false; then :
5795 $as_echo_n "(cached) " >&6
5796else
5797 if test -n "$ac_ct_AR"; then
5798 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5799else
5800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5801for as_dir in $PATH
5802do
5803 IFS=$as_save_IFS
5804 test -z "$as_dir" && as_dir=.
5805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005807 ac_cv_prog_ac_ct_AR="$ac_prog"
5808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5809 break 2
5810 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005812 done
5813IFS=$as_save_IFS
5814
5815fi
5816fi
5817ac_ct_AR=$ac_cv_prog_ac_ct_AR
5818if test -n "$ac_ct_AR"; then
5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5820$as_echo "$ac_ct_AR" >&6; }
5821else
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5823$as_echo "no" >&6; }
5824fi
5825
5826
5827 test -n "$ac_ct_AR" && break
5828done
5829
5830 if test "x$ac_ct_AR" = x; then
5831 AR="ar"
5832 else
5833 case $cross_compiling:$ac_tool_warned in
5834yes:)
5835{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5836$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5837ac_tool_warned=yes ;;
5838esac
5839 AR=$ac_ct_AR
5840 fi
5841fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842
5843
5844# tweak ARFLAGS only if the user didn't set it on the command line
5845
5846if test -z "$ARFLAGS"
5847then
5848 ARFLAGS="rc"
5849fi
5850
doko@ubuntu.com58844492012-06-30 18:25:32 +02005851if test -n "$ac_tool_prefix"; then
5852 for ac_prog in readelf
5853 do
5854 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5855set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5857$as_echo_n "checking for $ac_word... " >&6; }
5858if ${ac_cv_prog_READELF+:} false; then :
5859 $as_echo_n "(cached) " >&6
5860else
5861 if test -n "$READELF"; then
5862 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5863else
5864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5865for as_dir in $PATH
5866do
5867 IFS=$as_save_IFS
5868 test -z "$as_dir" && as_dir=.
5869 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005870 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005871 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5872 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5873 break 2
5874 fi
5875done
5876 done
5877IFS=$as_save_IFS
5878
5879fi
5880fi
5881READELF=$ac_cv_prog_READELF
5882if test -n "$READELF"; then
5883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5884$as_echo "$READELF" >&6; }
5885else
5886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5887$as_echo "no" >&6; }
5888fi
5889
5890
5891 test -n "$READELF" && break
5892 done
5893fi
5894if test -z "$READELF"; then
5895 ac_ct_READELF=$READELF
5896 for ac_prog in readelf
5897do
5898 # Extract the first word of "$ac_prog", so it can be a program name with args.
5899set dummy $ac_prog; ac_word=$2
5900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901$as_echo_n "checking for $ac_word... " >&6; }
5902if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5903 $as_echo_n "(cached) " >&6
5904else
5905 if test -n "$ac_ct_READELF"; then
5906 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5907else
5908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005915 ac_cv_prog_ac_ct_READELF="$ac_prog"
5916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5917 break 2
5918 fi
5919done
5920 done
5921IFS=$as_save_IFS
5922
5923fi
5924fi
5925ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5926if test -n "$ac_ct_READELF"; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5928$as_echo "$ac_ct_READELF" >&6; }
5929else
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931$as_echo "no" >&6; }
5932fi
5933
5934
5935 test -n "$ac_ct_READELF" && break
5936done
5937
5938 if test "x$ac_ct_READELF" = x; then
5939 READELF=":"
5940 else
5941 case $cross_compiling:$ac_tool_warned in
5942yes:)
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5944$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5945ac_tool_warned=yes ;;
5946esac
5947 READELF=$ac_ct_READELF
5948 fi
5949fi
5950
5951if test "$cross_compiling" = yes; then
5952 case "$READELF" in
5953 readelf|:)
5954 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5955 ;;
5956 esac
5957fi
5958
5959
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960
Matthias Klosec4c48422012-10-21 23:05:35 +02005961for ac_prog in python$PACKAGE_VERSION python3 python
5962do
5963 # Extract the first word of "$ac_prog", so it can be a program name with args.
5964set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5966$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005967if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005968 $as_echo_n "(cached) " >&6
5969else
Matthias Klosec4c48422012-10-21 23:05:35 +02005970 if test -n "$PYTHON"; then
5971 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005972else
5973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5974for as_dir in $PATH
5975do
5976 IFS=$as_save_IFS
5977 test -z "$as_dir" && as_dir=.
5978 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005980 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5982 break 2
5983 fi
5984done
5985 done
5986IFS=$as_save_IFS
5987
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005988fi
5989fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005990PYTHON=$ac_cv_prog_PYTHON
5991if test -n "$PYTHON"; then
5992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5993$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005994else
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996$as_echo "no" >&6; }
5997fi
5998
5999
Matthias Klosec4c48422012-10-21 23:05:35 +02006000 test -n "$PYTHON" && break
6001done
6002test -n "$PYTHON" || PYTHON="not-found"
6003
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006004if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006005 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6006else
6007 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006008fi
6009
6010
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011case $MACHDEP in
6012bsdos*|hp*|HP*)
6013 # install -d does not work on BSDI or HP-UX
6014 if test -z "$INSTALL"
6015 then
6016 INSTALL="${srcdir}/install-sh -c"
6017 fi
6018esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019# Find a good install program. We prefer a C program (faster),
6020# so one script is as good as another. But avoid the broken or
6021# incompatible versions:
6022# SysV /etc/install, /usr/sbin/install
6023# SunOS /usr/etc/install
6024# IRIX /sbin/install
6025# AIX /bin/install
6026# AmigaOS /C/install, which installs bootblocks on floppy discs
6027# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6028# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6029# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6030# OS/2's system install, which has a completely different semantic
6031# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006032# Reject install programs that cannot install multiple files.
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6034$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006036if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006037 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038else
6039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6040for as_dir in $PATH
6041do
6042 IFS=$as_save_IFS
6043 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 # Account for people who put trailing slashes in PATH elements.
6045case $as_dir/ in #((
6046 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006048 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006049 /usr/ucb/* ) ;;
6050 *)
6051 # OSF1 and SCO ODT 3.0 have their own names for install.
6052 # Don't use installbsd from OSF since it installs stuff as root
6053 # by default.
6054 for ac_prog in ginstall scoinst install; do
6055 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006056 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 if test $ac_prog = install &&
6058 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6059 # AIX install. It has an incompatible calling convention.
6060 :
6061 elif test $ac_prog = install &&
6062 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6063 # program-specific install script used by HP pwplus--don't use.
6064 :
6065 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006066 rm -rf conftest.one conftest.two conftest.dir
6067 echo one > conftest.one
6068 echo two > conftest.two
6069 mkdir conftest.dir
6070 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6071 test -s conftest.one && test -s conftest.two &&
6072 test -s conftest.dir/conftest.one &&
6073 test -s conftest.dir/conftest.two
6074 then
6075 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6076 break 3
6077 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006078 fi
6079 fi
6080 done
6081 done
6082 ;;
6083esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006084
6085 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086IFS=$as_save_IFS
6087
Matthias Kloseb9621712010-04-24 17:59:49 +00006088rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006089
6090fi
6091 if test "${ac_cv_path_install+set}" = set; then
6092 INSTALL=$ac_cv_path_install
6093 else
6094 # As a last resort, use the slow shell script. Don't cache a
6095 # value for INSTALL within a source directory, because that will
6096 # break other packages using the cache if that directory is
6097 # removed, or if the value is a relative name.
6098 INSTALL=$ac_install_sh
6099 fi
6100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6102$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103
6104# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6105# It thinks the first close brace ends the variable substitution.
6106test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6107
6108test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6109
6110test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6111
Matthias Klose93a0ef12012-03-15 18:08:34 +01006112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6113$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6114if test -z "$MKDIR_P"; then
6115 if ${ac_cv_path_mkdir+:} false; then :
6116 $as_echo_n "(cached) " >&6
6117else
6118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6120do
6121 IFS=$as_save_IFS
6122 test -z "$as_dir" && as_dir=.
6123 for ac_prog in mkdir gmkdir; do
6124 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006125 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006126 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6127 'mkdir (GNU coreutils) '* | \
6128 'mkdir (coreutils) '* | \
6129 'mkdir (fileutils) '4.1*)
6130 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6131 break 3;;
6132 esac
6133 done
6134 done
6135 done
6136IFS=$as_save_IFS
6137
6138fi
6139
6140 test -d ./--version && rmdir ./--version
6141 if test "${ac_cv_path_mkdir+set}" = set; then
6142 MKDIR_P="$ac_cv_path_mkdir -p"
6143 else
6144 # As a last resort, use the slow shell script. Don't cache a
6145 # value for MKDIR_P within a source directory, because that will
6146 # break other packages using the cache if that directory is
6147 # removed, or if the value is a relative name.
6148 MKDIR_P="$ac_install_sh -d"
6149 fi
6150fi
6151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6152$as_echo "$MKDIR_P" >&6; }
6153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154
6155# Not every filesystem supports hard links
6156
6157if test -z "$LN" ; then
6158 case $ac_sys_system in
6159 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160 *) LN=ln;;
6161 esac
6162fi
6163
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006164# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006165
6166ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006167
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6170$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171
6172# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006173if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 withval=$with_pydebug;
6175if test "$withval" != no
6176then
6177
Matthias Kloseb9621712010-04-24 17:59:49 +00006178$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6181$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006183 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006184else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6185$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006186fi
6187else
Matthias Kloseb9621712010-04-24 17:59:49 +00006188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6189$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190fi
6191
6192
6193# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6194# merged with this chunk of code?
6195
6196# Optimizer/debugger flags
6197# ------------------------
6198# (The following bit of code is complicated enough - please keep things
6199# indented properly. Just pretend you're editing Python code. ;-)
6200
6201# There are two parallel sets of case statements below, one that checks to
6202# see if OPT was set and one that does BASECFLAGS setting based upon
6203# compiler and platform. BASECFLAGS tweaks need to be made even if the
6204# user set OPT.
6205
6206# tweak OPT based on compiler and platform, only if the user didn't set
6207# it on the command line
6208
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006209if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006210then
6211 case $GCC in
6212 yes)
6213 if test "$CC" != 'g++' ; then
6214 STRICT_PROTO="-Wstrict-prototypes"
6215 fi
6216 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6217 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6218 WRAP="-fwrapv"
6219 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006220
6221 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006222 case $CC in
6223 *clang*) WRAP="-fwrapv"
6224 ;;
6225 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006226
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227 case $ac_cv_prog_cc_g in
6228 yes)
6229 if test "$Py_DEBUG" = 'true' ; then
6230 # Optimization messes up debuggers, so turn it off for
6231 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006232 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233 else
6234 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6235 fi
6236 ;;
6237 *)
6238 OPT="-O3 -Wall $STRICT_PROTO"
6239 ;;
6240 esac
6241 case $ac_sys_system in
6242 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6243 ;;
6244 esac
6245 ;;
6246
6247 *)
6248 OPT="-O"
6249 ;;
6250 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006251fi
6252
6253
6254
6255# The -arch flags for universal builds on OSX
6256UNIVERSAL_ARCH_FLAGS=
6257
6258
6259# tweak BASECFLAGS based on compiler and platform
6260case $GCC in
6261yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006262 # Python doesn't violate C99 aliasing rules, but older versions of
6263 # GCC produce warnings for legal Python code. Enable
6264 # -fno-strict-aliasing on versions of GCC that support but produce
6265 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6267$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006268 ac_save_cc="$CC"
6269 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006270 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006271 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006273else
Matthias Kloseb9621712010-04-24 17:59:49 +00006274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006275/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006276
Matthias Kloseb159a552010-04-25 21:00:44 +00006277
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006278int
6279main ()
6280{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006281
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006282 ;
6283 return 0;
6284}
Matthias Kloseb159a552010-04-25 21:00:44 +00006285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006287if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006288
6289 CC="$ac_save_cc -fstrict-aliasing"
6290 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006292/* end confdefs.h. */
6293
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006294 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006295int
6296main ()
6297{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006298double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006299 ;
6300 return 0;
6301}
Matthias Kloseb159a552010-04-25 21:00:44 +00006302
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006304if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006305
6306 ac_cv_no_strict_aliasing=no
6307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308else
Matthias Kloseb159a552010-04-25 21:00:44 +00006309
6310 ac_cv_no_strict_aliasing=yes
6311
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006315else
Matthias Kloseb159a552010-04-25 21:00:44 +00006316
6317 ac_cv_no_strict_aliasing=no
6318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006321fi
6322
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006323 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6326$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006327 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 then
6329 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6330 fi
6331
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6333$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6334 ac_save_cc="$CC"
6335 CC="$CC -Wunused-result -Werror"
6336 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006337 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006338 $as_echo_n "(cached) " >&6
6339else
6340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6341/* end confdefs.h. */
6342
6343
6344int
6345main ()
6346{
6347
6348 ;
6349 return 0;
6350}
6351
6352_ACEOF
6353if ac_fn_c_try_compile "$LINENO"; then :
6354
6355 ac_cv_disable_unused_result_warning=yes
6356
6357else
6358
6359 ac_cv_disable_unused_result_warning=no
6360
6361fi
6362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6363fi
6364
6365 CFLAGS="$save_CFLAGS"
6366 CC="$ac_save_cc"
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6368$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6369
6370 if test $ac_cv_disable_unused_result_warning = yes
6371 then
6372 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6373 fi
6374
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6376 # support. Without this, treatment of subnormals doesn't follow
6377 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006378 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006379 alpha*)
6380 BASECFLAGS="$BASECFLAGS -mieee"
6381 ;;
6382 esac
6383
6384 case $ac_sys_system in
6385 SCO_SV*)
6386 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6387 ;;
6388 # is there any other compiler on Darwin besides gcc?
6389 Darwin*)
6390 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6391 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006392 if test "${CC}" = gcc
6393 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6395$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006396 case "${UNIVERSALSDK}" in
6397 */MacOSX10.4u.sdk)
6398 # Build using 10.4 SDK, force usage of gcc when the
6399 # compiler is gcc, otherwise the user will get very
6400 # confusing error messages when building on OSX 10.6
6401 CC=gcc-4.0
6402 CPP=cpp-4.0
6403 ;;
6404 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6406$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006407 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408
6409
6410 if test "${enable_universalsdk}"; then
6411 UNIVERSAL_ARCH_FLAGS=""
6412 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6413 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6414 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006415 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6417 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006418 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006419 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006420
6421 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6422 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006423 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006424 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006426 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6427 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006428 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006429 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006430
6431 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6432 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006433 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006434 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006436 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006437 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438
6439 fi
6440
6441
Ronald Oussoren666028b2010-04-18 19:07:43 +00006442 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6443 if test "${UNIVERSALSDK}" != "/"
6444 then
6445 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6446 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006447 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006448 fi
6449 fi
6450
6451 # Calculate the right deployment target for this build.
6452 #
6453 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006454 if test ${cur_target} '>' 10.2 && \
6455 test ${cur_target} '<' 10.6
6456 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006458 if test ${enable_universalsdk}; then
6459 if test "${UNIVERSAL_ARCHS}" = "all"; then
6460 # Ensure that the default platform for a
6461 # 4-way universal build is OSX 10.5,
6462 # that's the first OS release where
6463 # 4-way builds make sense.
6464 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006465
6466 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6467 cur_target='10.5'
6468
6469 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6470 cur_target='10.5'
6471
6472 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6473 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006474 fi
6475 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006476 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006477 # On Intel macs default to a deployment
6478 # target of 10.4, that's the first OSX
6479 # release with Intel support.
6480 cur_target="10.4"
6481 fi
6482 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483 fi
6484 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6485
6486 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6487 # environment with a value that is the same as what we'll use
6488 # in the Makefile to ensure that we'll get the same compiler
6489 # environment during configure and build time.
6490 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6491 export MACOSX_DEPLOYMENT_TARGET
6492 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6493
6494 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006495 esac
6496 ;;
6497
6498*)
6499 case $ac_sys_system in
6500 OpenUNIX*|UnixWare*)
6501 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6502 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503 SCO_SV*)
6504 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6505 ;;
6506 esac
6507 ;;
6508esac
6509
6510if test "$Py_DEBUG" = 'true'; then
6511 :
6512else
6513 OPT="-DNDEBUG $OPT"
6514fi
6515
6516if test "$ac_arch_flags"
6517then
6518 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6519fi
6520
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521# Check whether GCC supports PyArg_ParseTuple format
6522if test "$GCC" = "yes"
6523then
Matthias Kloseb9621712010-04-24 17:59:49 +00006524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6525$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006526 save_CFLAGS=$CFLAGS
6527 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006529/* end confdefs.h. */
6530
6531 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532int
6533main ()
6534{
6535
6536 ;
6537 return 0;
6538}
Matthias Kloseb159a552010-04-25 21:00:44 +00006539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006541if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542
Matthias Kloseb159a552010-04-25 21:00:44 +00006543
Matthias Kloseb9621712010-04-24 17:59:49 +00006544$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
Matthias Kloseb159a552010-04-25 21:00:44 +00006546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006547$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549else
Matthias Kloseb159a552010-04-25 21:00:44 +00006550
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
6554fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6556 CFLAGS=$save_CFLAGS
6557fi
6558
6559# On some compilers, pthreads are available without further options
6560# (e.g. MacOS X). On some of these systems, the compiler will not
6561# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6562# So we have to see first whether pthreads are available without
6563# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6565$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006566if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006567 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568else
Matthias Kloseb9621712010-04-24 17:59:49 +00006569 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 ac_cv_pthread_is_default=no
6571else
Matthias Kloseb9621712010-04-24 17:59:49 +00006572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006573/* end confdefs.h. */
6574
Stefan Krah7dba5942012-11-22 22:49:11 +01006575#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006576#include <pthread.h>
6577
6578void* routine(void* p){return NULL;}
6579
6580int main(){
6581 pthread_t p;
6582 if(pthread_create(&p,NULL,routine,NULL)!=0)
6583 return 1;
6584 (void)pthread_detach(p);
6585 return 0;
6586}
6587
6588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006589if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590
6591 ac_cv_pthread_is_default=yes
6592 ac_cv_kthread=no
6593 ac_cv_pthread=no
6594
6595else
Matthias Kloseb9621712010-04-24 17:59:49 +00006596 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006600fi
6601
6602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006603fi
6604
Matthias Kloseb9621712010-04-24 17:59:49 +00006605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6606$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006607
6608
6609if test $ac_cv_pthread_is_default = yes
6610then
6611 ac_cv_kpthread=no
6612else
6613# -Kpthread, if available, provides the right #defines
6614# and linker options to make pthread_create available
6615# Some compilers won't report that they do not support -Kpthread,
6616# so we need to run a program to see whether it really made the
6617# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6619$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006620if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006621 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006622else
6623 ac_save_cc="$CC"
6624CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006625if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626 ac_cv_kpthread=no
6627else
Matthias Kloseb9621712010-04-24 17:59:49 +00006628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629/* end confdefs.h. */
6630
Stefan Krah7dba5942012-11-22 22:49:11 +01006631#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632#include <pthread.h>
6633
6634void* routine(void* p){return NULL;}
6635
6636int main(){
6637 pthread_t p;
6638 if(pthread_create(&p,NULL,routine,NULL)!=0)
6639 return 1;
6640 (void)pthread_detach(p);
6641 return 0;
6642}
6643
6644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006645if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646 ac_cv_kpthread=yes
6647else
Matthias Kloseb9621712010-04-24 17:59:49 +00006648 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6651 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006652fi
6653
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006654CC="$ac_save_cc"
6655fi
6656
Matthias Kloseb9621712010-04-24 17:59:49 +00006657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6658$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659fi
6660
6661if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6662then
6663# -Kthread, if available, provides the right #defines
6664# and linker options to make pthread_create available
6665# Some compilers won't report that they do not support -Kthread,
6666# so we need to run a program to see whether it really made the
6667# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6669$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006670if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006671 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006672else
6673 ac_save_cc="$CC"
6674CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006675if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676 ac_cv_kthread=no
6677else
Matthias Kloseb9621712010-04-24 17:59:49 +00006678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006679/* end confdefs.h. */
6680
Stefan Krah7dba5942012-11-22 22:49:11 +01006681#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682#include <pthread.h>
6683
6684void* routine(void* p){return NULL;}
6685
6686int main(){
6687 pthread_t p;
6688 if(pthread_create(&p,NULL,routine,NULL)!=0)
6689 return 1;
6690 (void)pthread_detach(p);
6691 return 0;
6692}
6693
6694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006695if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696 ac_cv_kthread=yes
6697else
Matthias Kloseb9621712010-04-24 17:59:49 +00006698 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702fi
6703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006704CC="$ac_save_cc"
6705fi
6706
Matthias Kloseb9621712010-04-24 17:59:49 +00006707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6708$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709fi
6710
6711if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6712then
6713# -pthread, if available, provides the right #defines
6714# and linker options to make pthread_create available
6715# Some compilers won't report that they do not support -pthread,
6716# so we need to run a program to see whether it really made the
6717# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6719$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006720if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006721 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722else
6723 ac_save_cc="$CC"
6724CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006725if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 ac_cv_pthread=no
6727else
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729/* end confdefs.h. */
6730
Stefan Krah7dba5942012-11-22 22:49:11 +01006731#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732#include <pthread.h>
6733
6734void* routine(void* p){return NULL;}
6735
6736int main(){
6737 pthread_t p;
6738 if(pthread_create(&p,NULL,routine,NULL)!=0)
6739 return 1;
6740 (void)pthread_detach(p);
6741 return 0;
6742}
6743
6744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746 ac_cv_pthread=yes
6747else
Matthias Kloseb9621712010-04-24 17:59:49 +00006748 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752fi
6753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006754CC="$ac_save_cc"
6755fi
6756
Matthias Kloseb9621712010-04-24 17:59:49 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6758$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759fi
6760
6761# If we have set a CC compiler flag for thread support then
6762# check if it works for CXX, too.
6763ac_cv_cxx_thread=no
6764if test ! -z "$CXX"
6765then
Matthias Kloseb9621712010-04-24 17:59:49 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6767$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768ac_save_cxx="$CXX"
6769
6770if test "$ac_cv_kpthread" = "yes"
6771then
6772 CXX="$CXX -Kpthread"
6773 ac_cv_cxx_thread=yes
6774elif test "$ac_cv_kthread" = "yes"
6775then
6776 CXX="$CXX -Kthread"
6777 ac_cv_cxx_thread=yes
6778elif test "$ac_cv_pthread" = "yes"
6779then
6780 CXX="$CXX -pthread"
6781 ac_cv_cxx_thread=yes
6782fi
6783
6784if test $ac_cv_cxx_thread = yes
6785then
6786 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6787 $CXX -c conftest.$ac_ext 2>&5
6788 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6789 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6790 then
6791 ac_cv_cxx_thread=yes
6792 else
6793 ac_cv_cxx_thread=no
6794 fi
6795 rm -fr conftest*
6796fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6798$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799fi
6800CXX="$ac_save_cxx"
6801
6802
6803# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6805$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006806if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808else
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006810/* end confdefs.h. */
6811#include <stdlib.h>
6812#include <stdarg.h>
6813#include <string.h>
6814#include <float.h>
6815
6816int
6817main ()
6818{
6819
6820 ;
6821 return 0;
6822}
6823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006824if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006825 ac_cv_header_stdc=yes
6826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6830
6831if test $ac_cv_header_stdc = yes; then
6832 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834/* end confdefs.h. */
6835#include <string.h>
6836
6837_ACEOF
6838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006839 $EGREP "memchr" >/dev/null 2>&1; then :
6840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006841else
6842 ac_cv_header_stdc=no
6843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006844rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006845
6846fi
6847
6848if test $ac_cv_header_stdc = yes; then
6849 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851/* end confdefs.h. */
6852#include <stdlib.h>
6853
6854_ACEOF
6855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 $EGREP "free" >/dev/null 2>&1; then :
6857
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858else
6859 ac_cv_header_stdc=no
6860fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006861rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862
6863fi
6864
6865if test $ac_cv_header_stdc = yes; then
6866 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006867 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 :
6869else
Matthias Kloseb9621712010-04-24 17:59:49 +00006870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871/* end confdefs.h. */
6872#include <ctype.h>
6873#include <stdlib.h>
6874#if ((' ' & 0x0FF) == 0x020)
6875# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6876# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6877#else
6878# define ISLOWER(c) \
6879 (('a' <= (c) && (c) <= 'i') \
6880 || ('j' <= (c) && (c) <= 'r') \
6881 || ('s' <= (c) && (c) <= 'z'))
6882# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6883#endif
6884
6885#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6886int
6887main ()
6888{
6889 int i;
6890 for (i = 0; i < 256; i++)
6891 if (XOR (islower (i), ISLOWER (i))
6892 || toupper (i) != TOUPPER (i))
6893 return 2;
6894 return 0;
6895}
6896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006897if ac_fn_c_try_run "$LINENO"; then :
6898
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899else
Matthias Kloseb9621712010-04-24 17:59:49 +00006900 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6903 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
6907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6909$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910if test $ac_cv_header_stdc = yes; then
6911
Matthias Kloseb9621712010-04-24 17:59:49 +00006912$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913
6914fi
6915
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006916ac_save_cppflags="$CPPFLAGS"
6917CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006918for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006919fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006920ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006921sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006922unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006923poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006924sys/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 +01006925sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006926sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006927sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006928sys/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 -07006929libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006930bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006931do :
6932 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6933ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006934if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006935 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006936#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006937_ACEOF
6938
6939fi
6940
Guido van Rossum627b2d71993-12-24 10:39:16 +00006941done
6942
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006943CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006944ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006945for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6948$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006949if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951else
Matthias Kloseb9621712010-04-24 17:59:49 +00006952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006953/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006954#include <sys/types.h>
6955#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006956
Martin v. Löwis11437992002-04-12 09:54:03 +00006957int
6958main ()
6959{
6960if ((DIR *) 0)
6961return 0;
6962 ;
6963 return 0;
6964}
6965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006968else
Matthias Kloseb9621712010-04-24 17:59:49 +00006969 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006973eval ac_res=\$$as_ac_Header
6974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6975$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006976if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006978#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006979_ACEOF
6980
6981ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006982fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006983
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006984done
6985# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6986if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6988$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006989if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991else
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006996/* Override any GCC internal prototype to avoid an error.
6997 Use char because int might match the return type of a GCC
6998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006999#ifdef __cplusplus
7000extern "C"
7001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007002char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007003int
7004main ()
7005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 ;
7008 return 0;
7009}
7010_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007011for ac_lib in '' dir; do
7012 if test -z "$ac_lib"; then
7013 ac_res="none required"
7014 else
7015 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007016 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007017 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007018 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007019 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007021rm -f core conftest.err conftest.$ac_objext \
7022 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007023 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026done
Victor Stinnere0be4232011-10-25 13:06:09 +02007027if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029else
7030 ac_cv_search_opendir=no
7031fi
7032rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007033LIBS=$ac_func_search_save_LIBS
7034fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7036$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007038if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007039 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007041fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007042
Michael W. Hudson54241132001-12-07 15:38:26 +00007043else
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7045$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007046if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007048else
7049 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053/* Override any GCC internal prototype to avoid an error.
7054 Use char because int might match the return type of a GCC
7055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007056#ifdef __cplusplus
7057extern "C"
7058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007059char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007060int
7061main ()
7062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007063return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007064 ;
7065 return 0;
7066}
7067_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068for ac_lib in '' x; do
7069 if test -z "$ac_lib"; then
7070 ac_res="none required"
7071 else
7072 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007073 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007075 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007076 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007078rm -f core conftest.err conftest.$ac_objext \
7079 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007080 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083done
Victor Stinnere0be4232011-10-25 13:06:09 +02007084if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007085
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086else
7087 ac_cv_search_opendir=no
7088fi
7089rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007090LIBS=$ac_func_search_save_LIBS
7091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7093$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007095if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007097
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007098fi
7099
7100fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007101
Matthias Kloseb9621712010-04-24 17:59:49 +00007102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7103$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007104if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007106else
Matthias Kloseb9621712010-04-24 17:59:49 +00007107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007108/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007109#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007110int
7111main ()
7112{
7113return makedev(0, 0);
7114 ;
7115 return 0;
7116}
7117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007119 ac_cv_header_sys_types_h_makedev=yes
7120else
Matthias Kloseb9621712010-04-24 17:59:49 +00007121 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007123rm -f core conftest.err conftest.$ac_objext \
7124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007125
7126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7128$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007129
7130if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007131ac_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 +02007132if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007133
Matthias Kloseb9621712010-04-24 17:59:49 +00007134$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007135
7136fi
7137
7138
7139
7140 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007141 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 +02007142if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007143
Matthias Kloseb9621712010-04-24 17:59:49 +00007144$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007145
7146fi
7147
7148
7149 fi
7150fi
7151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007153# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7154for ac_header in net/if.h
7155do :
7156 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7157#ifdef STDC_HEADERS
7158# include <stdlib.h>
7159# include <stddef.h>
7160#else
7161# ifdef HAVE_STDLIB_H
7162# include <stdlib.h>
7163# endif
7164#endif
7165#ifdef HAVE_SYS_SOCKET_H
7166# include <sys/socket.h>
7167#endif
7168
7169"
Victor Stinnere0be4232011-10-25 13:06:09 +02007170if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007171 cat >>confdefs.h <<_ACEOF
7172#define HAVE_NET_IF_H 1
7173_ACEOF
7174
7175fi
7176
7177done
7178
7179
7180
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007181# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007182for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007183do :
7184 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007185#ifdef HAVE_CURSES_H
7186#include <curses.h>
7187#endif
7188
Matthias Kloseb9621712010-04-24 17:59:49 +00007189"
Victor Stinnere0be4232011-10-25 13:06:09 +02007190if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007191 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007192#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007193_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007194
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007195fi
7196
7197done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007198
7199
Martin v. Löwis11017b12006-01-14 18:12:57 +00007200# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007201for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007202do :
7203 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 +00007204#ifdef HAVE_ASM_TYPES_H
7205#include <asm/types.h>
7206#endif
7207#ifdef HAVE_SYS_SOCKET_H
7208#include <sys/socket.h>
7209#endif
7210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211"
Victor Stinnere0be4232011-10-25 13:06:09 +02007212if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007213 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007214#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007215_ACEOF
7216
7217fi
7218
7219done
7220
7221
Charles-François Natali47413c12011-10-06 19:47:44 +02007222# On Linux, can.h and can/raw.h require sys/socket.h
7223for ac_header in linux/can.h linux/can/raw.h
7224do :
7225 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7226ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7227#ifdef HAVE_SYS_SOCKET_H
7228#include <sys/socket.h>
7229#endif
7230
7231"
7232if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7233 cat >>confdefs.h <<_ACEOF
7234#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7235_ACEOF
7236
7237fi
7238
7239done
7240
7241
Guido van Rossum627b2d71993-12-24 10:39:16 +00007242# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007243was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7245$as_echo_n "checking for clock_t in time.h... " >&6; }
7246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007247/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007248#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007249
7250_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007252 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007253 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007254else
Martin v. Löwis11437992002-04-12 09:54:03 +00007255
7256
Matthias Kloseb9621712010-04-24 17:59:49 +00007257$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007258
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007259
Guido van Rossum627b2d71993-12-24 10:39:16 +00007260fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007261rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007262
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7264$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7267$as_echo_n "checking for makedev... " >&6; }
7268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007269/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007270
Jesus Cea740f53a2010-04-28 11:35:30 +00007271#if defined(MAJOR_IN_MKDEV)
7272#include <sys/mkdev.h>
7273#elif defined(MAJOR_IN_SYSMACROS)
7274#include <sys/sysmacros.h>
7275#else
7276#include <sys/types.h>
7277#endif
7278
Neal Norwitz11690112002-07-30 01:08:28 +00007279int
7280main ()
7281{
Jesus Cea740f53a2010-04-28 11:35:30 +00007282
7283 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007284 ;
7285 return 0;
7286}
Matthias Kloseb159a552010-04-25 21:00:44 +00007287
Neal Norwitz11690112002-07-30 01:08:28 +00007288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007290 ac_cv_has_makedev=yes
7291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007294rm -f core conftest.err conftest.$ac_objext \
7295 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7297$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007298if test "$ac_cv_has_makedev" = "yes"; then
7299
Matthias Kloseb9621712010-04-24 17:59:49 +00007300$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007301
7302fi
7303
Martin v. Löwis399a6892002-10-04 10:22:02 +00007304# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7305# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7306# defined, but the compiler does not support pragma redefine_extname,
7307# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7308# structures (such as rlimit64) without declaring them. As a
7309# work-around, disable LFS on such configurations
7310
7311use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7313$as_echo_n "checking Solaris LFS bug... " >&6; }
7314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007315/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007316
7317#define _LARGEFILE_SOURCE 1
7318#define _FILE_OFFSET_BITS 64
7319#include <sys/resource.h>
7320
Martin v. Löwis399a6892002-10-04 10:22:02 +00007321int
7322main ()
7323{
7324struct rlimit foo;
7325 ;
7326 return 0;
7327}
7328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007330 sol_lfs_bug=no
7331else
Matthias Kloseb9621712010-04-24 17:59:49 +00007332 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7336$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007337if test "$sol_lfs_bug" = "yes"; then
7338 use_lfs=no
7339fi
7340
7341if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007342# Two defines needed to enable largefile support on various platforms
7343# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007344case $ac_sys_system/$ac_sys_release in
7345AIX*)
7346
7347$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7348
7349 ;;
7350esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007353
7354
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007356
Martin v. Löwis399a6892002-10-04 10:22:02 +00007357fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007358
Guido van Rossum84e7b241996-08-19 21:59:00 +00007359# Add some code to confdefs.h so that the test for off_t works on SCO
7360cat >> confdefs.h <<\EOF
7361#if defined(SCO_DS)
7362#undef _OFF_T
7363#endif
7364EOF
7365
Guido van Rossumef2255b2000-03-10 22:30:29 +00007366# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007367ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007368if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007370else
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
7372cat >>confdefs.h <<_ACEOF
7373#define mode_t int
7374_ACEOF
7375
7376fi
7377
Matthias Kloseb9621712010-04-24 17:59:49 +00007378ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007379if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007380
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007381else
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
7383cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007384#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007385_ACEOF
7386
7387fi
7388
Matthias Kloseb9621712010-04-24 17:59:49 +00007389ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007390if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007391
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007392else
Martin v. Löwis11437992002-04-12 09:54:03 +00007393
7394cat >>confdefs.h <<_ACEOF
7395#define pid_t int
7396_ACEOF
7397
7398fi
7399
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007400
Martin v. Löwis11437992002-04-12 09:54:03 +00007401cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007402#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007403_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007404
Matthias Kloseb9621712010-04-24 17:59:49 +00007405ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007406if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007407
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007408else
Martin v. Löwis11437992002-04-12 09:54:03 +00007409
7410cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007411#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007412_ACEOF
7413
7414fi
7415
Matthias Kloseb9621712010-04-24 17:59:49 +00007416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7417$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007418if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007420else
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007422/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007423#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007424
7425_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428 ac_cv_type_uid_t=yes
7429else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007430 ac_cv_type_uid_t=no
7431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007432rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7436$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007437if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007438
Matthias Kloseb9621712010-04-24 17:59:49 +00007439$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007440
7441
Matthias Kloseb9621712010-04-24 17:59:49 +00007442$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007443
7444fi
7445
Mark Dickinsonce31f662012-12-02 13:20:22 +00007446
7447# There are two separate checks for each of the exact-width integer types we
7448# need. First we check whether the type is available using the usual
7449# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7450# and <stdint.h> where available). We then also use the special type checks of
7451# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7452# directly, #define's uint32_t to be a suitable type.
7453
7454ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7455if test "x$ac_cv_type_uint32_t" = xyes; then :
7456
7457$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7458
7459fi
7460
Matthias Kloseb9621712010-04-24 17:59:49 +00007461ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7462case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007463 no|yes) ;; #(
7464 *)
7465
Matthias Kloseb9621712010-04-24 17:59:49 +00007466$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007467
7468
7469cat >>confdefs.h <<_ACEOF
7470#define uint32_t $ac_cv_c_uint32_t
7471_ACEOF
7472;;
7473 esac
7474
Mark Dickinsonce31f662012-12-02 13:20:22 +00007475
7476ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7477if test "x$ac_cv_type_uint64_t" = xyes; then :
7478
7479$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7480
7481fi
7482
Matthias Kloseb9621712010-04-24 17:59:49 +00007483ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7484case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007485 no|yes) ;; #(
7486 *)
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007489
7490
7491cat >>confdefs.h <<_ACEOF
7492#define uint64_t $ac_cv_c_uint64_t
7493_ACEOF
7494;;
7495 esac
7496
Mark Dickinsonce31f662012-12-02 13:20:22 +00007497
7498ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7499if test "x$ac_cv_type_int32_t" = xyes; then :
7500
7501$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7502
7503fi
7504
Matthias Kloseb9621712010-04-24 17:59:49 +00007505ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7506case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007507 no|yes) ;; #(
7508 *)
7509
7510cat >>confdefs.h <<_ACEOF
7511#define int32_t $ac_cv_c_int32_t
7512_ACEOF
7513;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007514esac
7515
Mark Dickinsonce31f662012-12-02 13:20:22 +00007516
7517ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7518if test "x$ac_cv_type_int64_t" = xyes; then :
7519
7520$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7521
7522fi
7523
Matthias Kloseb9621712010-04-24 17:59:49 +00007524ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7525case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007526 no|yes) ;; #(
7527 *)
7528
7529cat >>confdefs.h <<_ACEOF
7530#define int64_t $ac_cv_c_int64_t
7531_ACEOF
7532;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007533esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007534
Mark Dickinsonce31f662012-12-02 13:20:22 +00007535
Matthias Kloseb9621712010-04-24 17:59:49 +00007536ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007537if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007538
Matthias Kloseb9621712010-04-24 17:59:49 +00007539$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007540
7541fi
7542
Stefan Krah1919b7e2012-03-21 18:25:23 +01007543ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7544if test "x$ac_cv_type___uint128_t" = xyes; then :
7545
7546$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7547
7548fi
7549
Jack Jansendd19cf82001-12-06 22:36:17 +00007550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007552# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007553# The cast to long int works around a bug in the HP C Compiler
7554# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7555# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7556# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7558$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007559if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 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 +00007563
Martin v. Löwis11437992002-04-12 09:54:03 +00007564else
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 if test "$ac_cv_type_int" = yes; then
7566 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7567$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007568as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007569See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570 else
7571 ac_cv_sizeof_int=0
7572 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574
Martin v. Löwis11437992002-04-12 09:54:03 +00007575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7577$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007578
7579
7580
Martin v. Löwis11437992002-04-12 09:54:03 +00007581cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007582#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007583_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007584
7585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586# The cast to long int works around a bug in the HP C Compiler
7587# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7588# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7589# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7591$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007592if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007594else
Matthias Kloseb9621712010-04-24 17:59:49 +00007595 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 +00007596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597else
Matthias Kloseb9621712010-04-24 17:59:49 +00007598 if test "$ac_cv_type_long" = yes; then
7599 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007601as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007602See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 else
7604 ac_cv_sizeof_long=0
7605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607
Martin v. Löwis11437992002-04-12 09:54:03 +00007608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7610$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611
7612
7613
Martin v. Löwis11437992002-04-12 09:54:03 +00007614cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007615#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007616_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007617
7618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619# The cast to long int works around a bug in the HP C Compiler
7620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7624$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007625if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007627else
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 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 +00007629
Martin v. Löwis11437992002-04-12 09:54:03 +00007630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 if test "$ac_cv_type_void_p" = yes; then
7632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7633$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007634as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007635See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636 else
7637 ac_cv_sizeof_void_p=0
7638 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640
Martin v. Löwis11437992002-04-12 09:54:03 +00007641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7643$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644
7645
7646
Martin v. Löwis11437992002-04-12 09:54:03 +00007647cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007648#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007649_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007650
7651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007652# The cast to long int works around a bug in the HP C Compiler
7653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7655# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7657$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007658if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007660else
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 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 +00007662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 if test "$ac_cv_type_short" = yes; then
7665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007667as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007668See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 else
7670 ac_cv_sizeof_short=0
7671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7676$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677
7678
7679
Martin v. Löwis11437992002-04-12 09:54:03 +00007680cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007681#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007682_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007683
7684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685# The cast to long int works around a bug in the HP C Compiler
7686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7688# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7690$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007691if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007693else
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 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 +00007695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696else
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 if test "$ac_cv_type_float" = yes; then
7698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007700as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007701See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007702 else
7703 ac_cv_sizeof_float=0
7704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7709$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710
7711
7712
Martin v. Löwis11437992002-04-12 09:54:03 +00007713cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007715_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007716
7717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007718# The cast to long int works around a bug in the HP C Compiler
7719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7721# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7723$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007724if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007726else
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 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 +00007728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 if test "$ac_cv_type_double" = yes; then
7731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007733as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007734See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007735 else
7736 ac_cv_sizeof_double=0
7737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7742$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743
7744
7745
Martin v. Löwis11437992002-04-12 09:54:03 +00007746cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007747#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007748_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007749
7750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007751# The cast to long int works around a bug in the HP C Compiler
7752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7754# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7756$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007757if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 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 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 if test "$ac_cv_type_fpos_t" = yes; then
7764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007766as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007767See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007768 else
7769 ac_cv_sizeof_fpos_t=0
7770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7775$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776
7777
7778
Martin v. Löwis11437992002-04-12 09:54:03 +00007779cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007780#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007781_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007782
Michael W. Hudson54241132001-12-07 15:38:26 +00007783
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007784# The cast to long int works around a bug in the HP C Compiler
7785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7787# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7789$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007790if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007792else
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 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 +00007794
Martin v. Löwis18e16552006-02-15 17:27:45 +00007795else
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 if test "$ac_cv_type_size_t" = yes; then
7797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007799as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007800See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801 else
7802 ac_cv_sizeof_size_t=0
7803 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805
Martin v. Löwis18e16552006-02-15 17:27:45 +00007806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7808$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007809
7810
7811
Martin v. Löwis18e16552006-02-15 17:27:45 +00007812cat >>confdefs.h <<_ACEOF
7813#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7814_ACEOF
7815
7816
Christian Heimes400adb02008-02-01 08:12:03 +00007817# The cast to long int works around a bug in the HP C Compiler
7818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7820# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7822$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007823if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 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 +00007827
Christian Heimes400adb02008-02-01 08:12:03 +00007828else
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 if test "$ac_cv_type_pid_t" = yes; then
7830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007832as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007833See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007834 else
7835 ac_cv_sizeof_pid_t=0
7836 fi
7837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838
Christian Heimes400adb02008-02-01 08:12:03 +00007839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7841$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007842
7843
7844
7845cat >>confdefs.h <<_ACEOF
7846#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7847_ACEOF
7848
7849
Michael W. Hudson54241132001-12-07 15:38:26 +00007850
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7852$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007853have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007855/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007856
Martin v. Löwis11437992002-04-12 09:54:03 +00007857int
7858main ()
7859{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007860long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 ;
7862 return 0;
7863}
7864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007866
7867
Matthias Kloseb9621712010-04-24 17:59:49 +00007868$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007870 have_long_long=yes
7871
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7875$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007876if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007877# The cast to long int works around a bug in the HP C Compiler
7878# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7879# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7880# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7882$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Martin v. Löwis11437992002-04-12 09:54:03 +00007888else
Matthias Kloseb9621712010-04-24 17:59:49 +00007889 if test "$ac_cv_type_long_long" = yes; then
7890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007892as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007893See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007894 else
7895 ac_cv_sizeof_long_long=0
7896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7901$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902
7903
7904
Martin v. Löwis11437992002-04-12 09:54:03 +00007905cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007906#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007907_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007908
Michael W. Hudson54241132001-12-07 15:38:26 +00007909
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007910fi
7911
Matthias Kloseb9621712010-04-24 17:59:49 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7913$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007914have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007916/* end confdefs.h. */
7917
7918int
7919main ()
7920{
7921long double x; x = (long double)0;
7922 ;
7923 return 0;
7924}
7925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007926if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007927
7928
Matthias Kloseb9621712010-04-24 17:59:49 +00007929$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007930
7931 have_long_double=yes
7932
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007933fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7936$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007937if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938# The cast to long int works around a bug in the HP C Compiler
7939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7941# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7943$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007944if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007946else
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 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 +00007948
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 if test "$ac_cv_type_long_double" = yes; then
7951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007953as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007954See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007955 else
7956 ac_cv_sizeof_long_double=0
7957 fi
7958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7962$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007963
7964
7965
7966cat >>confdefs.h <<_ACEOF
7967#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7968_ACEOF
7969
7970
7971fi
7972
7973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7975$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007976have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007978/* end confdefs.h. */
7979
7980int
7981main ()
7982{
7983_Bool x; x = (_Bool)0;
7984 ;
7985 return 0;
7986}
7987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007988if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007989
7990
Matthias Kloseb9621712010-04-24 17:59:49 +00007991$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007992
7993 have_c99_bool=yes
7994
Thomas Woutersb2137042007-02-01 18:02:27 +00007995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7998$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007999if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000# The cast to long int works around a bug in the HP C Compiler
8001# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8002# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8003# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8005$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008006if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008008else
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 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 +00008010
Thomas Woutersb2137042007-02-01 18:02:27 +00008011else
Matthias Kloseb9621712010-04-24 17:59:49 +00008012 if test "$ac_cv_type__Bool" = yes; then
8013 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008015as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008016See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017 else
8018 ac_cv_sizeof__Bool=0
8019 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021
Thomas Woutersb2137042007-02-01 18:02:27 +00008022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8024$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025
8026
8027
Thomas Woutersb2137042007-02-01 18:02:27 +00008028cat >>confdefs.h <<_ACEOF
8029#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8030_ACEOF
8031
8032
8033fi
8034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008036 #include <stdint.h>
8037 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008038 #ifdef HAVE_INTTYPES_H
8039 #include <inttypes.h>
8040 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008041"
Victor Stinnere0be4232011-10-25 13:06:09 +02008042if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008043
8044cat >>confdefs.h <<_ACEOF
8045#define HAVE_UINTPTR_T 1
8046_ACEOF
8047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048# The cast to long int works around a bug in the HP C Compiler
8049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8051# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8053$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008054if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008056else
Matthias Kloseb9621712010-04-24 17:59:49 +00008057 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 +00008058
Martin v. Löwis11437992002-04-12 09:54:03 +00008059else
Matthias Kloseb9621712010-04-24 17:59:49 +00008060 if test "$ac_cv_type_uintptr_t" = yes; then
8061 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8062$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008063as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008064See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008065 else
8066 ac_cv_sizeof_uintptr_t=0
8067 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069
Martin v. Löwis11437992002-04-12 09:54:03 +00008070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8072$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008073
8074
8075
Martin v. Löwis11437992002-04-12 09:54:03 +00008076cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008077#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008078_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008079
Michael W. Hudson54241132001-12-07 15:38:26 +00008080
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008081fi
8082
Thomas Wouters89f507f2006-12-13 04:49:30 +00008083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008084# The cast to long int works around a bug in the HP C Compiler
8085# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8086# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8087# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8089$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008090if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008092else
Matthias Kloseb9621712010-04-24 17:59:49 +00008093 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008094#ifdef HAVE_SYS_TYPES_H
8095#include <sys/types.h>
8096#endif
8097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008099
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 if test "$ac_cv_type_off_t" = yes; then
8102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8103$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008104as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008105See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008106 else
8107 ac_cv_sizeof_off_t=0
8108 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8113$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008114
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008115
8116
Martin v. Löwis11437992002-04-12 09:54:03 +00008117cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008118#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008119_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008120
Michael W. Hudson54241132001-12-07 15:38:26 +00008121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8124$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008125if test "$have_long_long" = yes
8126then
8127if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008128 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8133$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8136$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008137fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008138else
Matthias Kloseb9621712010-04-24 17:59:49 +00008139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8140$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008141fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008143# The cast to long int works around a bug in the HP C Compiler
8144# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8145# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8146# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8148$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008149if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151else
Matthias Kloseb9621712010-04-24 17:59:49 +00008152 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008153#ifdef HAVE_SYS_TYPES_H
8154#include <sys/types.h>
8155#endif
8156#ifdef HAVE_TIME_H
8157#include <time.h>
8158#endif
8159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008161
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008162else
Matthias Kloseb9621712010-04-24 17:59:49 +00008163 if test "$ac_cv_type_time_t" = yes; then
8164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008166as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008167See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008168 else
8169 ac_cv_sizeof_time_t=0
8170 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008172
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8175$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008176
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008177
8178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008180#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008181_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008182
Michael W. Hudson54241132001-12-07 15:38:26 +00008183
8184
Trent Mick635f6fb2000-08-23 21:33:05 +00008185# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008186ac_save_cc="$CC"
8187if test "$ac_cv_kpthread" = "yes"
8188then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008189elif test "$ac_cv_kthread" = "yes"
8190then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008191elif test "$ac_cv_pthread" = "yes"
8192then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008193fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008194
Matthias Kloseb9621712010-04-24 17:59:49 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8196$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008197have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008199/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008200
8201 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008202int
8203main ()
8204{
Guido van Rossum12580492000-09-24 16:47:19 +00008205pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008206 ;
8207 return 0;
8208}
Matthias Kloseb159a552010-04-25 21:00:44 +00008209
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008211if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008212 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8216$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008217if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008218 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008219# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8220# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8221# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8223$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008224if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226else
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008228#ifdef HAVE_PTHREAD_H
8229#include <pthread.h>
8230#endif
8231
Matthias Kloseb9621712010-04-24 17:59:49 +00008232"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008234else
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 if test "$ac_cv_type_pthread_t" = yes; then
8236 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8237$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008238as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008239See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008240 else
8241 ac_cv_sizeof_pthread_t=0
8242 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244
Trent Mick635f6fb2000-08-23 21:33:05 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8247$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008249
8250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008252#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008253_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008255
Trent Mick635f6fb2000-08-23 21:33:05 +00008256fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008257CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008258
Michael W. Hudson54241132001-12-07 15:38:26 +00008259
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008260case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008261 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008262 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8263 ;;
8264 Darwin/*)
8265 OTHER_LIBTOOL_OPT=""
8266 ;;
8267esac
8268
8269
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008270ARCH_RUN_32BIT=""
8271
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008272case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008273 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008274 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8275 if test "${enable_universalsdk}"; then
8276 :
8277 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008278 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008279 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008280 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008282 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008283 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008284 if test ${gcc_version} '<' 4.0
8285 then
8286 LIBTOOL_CRUFT="-lcc_dynamic"
8287 else
8288 LIBTOOL_CRUFT=""
8289 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008290 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008291 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008292else
Matthias Kloseb9621712010-04-24 17:59:49 +00008293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008294/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008295
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008296 #include <unistd.h>
8297 int main(int argc, char*argv[])
8298 {
8299 if (sizeof(long) == 4) {
8300 return 0;
8301 } else {
8302 return 1;
8303 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008304 }
8305
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008307if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008308 ac_osx_32bit=yes
8309else
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8313 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008314fi
8315
8316
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008317 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008318 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008319 i386)
8320 MACOSX_DEFAULT_ARCH="i386"
8321 ;;
8322 ppc)
8323 MACOSX_DEFAULT_ARCH="ppc"
8324 ;;
8325 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008326 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008327 ;;
8328 esac
8329 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008330 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008331 i386)
8332 MACOSX_DEFAULT_ARCH="x86_64"
8333 ;;
8334 ppc)
8335 MACOSX_DEFAULT_ARCH="ppc64"
8336 ;;
8337 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008338 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008339 ;;
8340 esac
8341
8342 #ARCH_RUN_32BIT="true"
8343 fi
8344
8345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008348esac
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8351$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008352if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008353then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008354 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008355 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008356 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8361$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008362 if test $enable_shared = "yes"
8363 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008364 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 +00008365 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008366else
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008369fi
8370
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8372$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008373case $ac_sys_system/$ac_sys_release in
8374 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8379$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008380 ;;
8381 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8383$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008384 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008385esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008386
Guido van Rossum0a516c91994-09-12 10:58:40 +00008387# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008388
Michael W. Hudson54241132001-12-07 15:38:26 +00008389
8390
8391
8392
Benjamin Peterson99f03762010-04-11 22:15:28 +00008393
Thomas Wouters477c8d52006-05-27 19:21:47 +00008394
Guido van Rossum0a516c91994-09-12 10:58:40 +00008395# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008396# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008397# (Shared libraries in this instance are shared modules to be loaded into
8398# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8400$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008401if test -z "$LDSHARED"
8402then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008403 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008404 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008405 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008406 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008407 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008408 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008409 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008410 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008411 if test "$GCC" = "yes" ; then
8412 LDSHARED='$(CC) -shared'
8413 LDCXXSHARED='$(CXX) -shared'
8414 else
8415 LDSHARED='$(CC) -G'
8416 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008417 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008418 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008419 if test "$GCC" = "yes" ; then
8420 LDSHARED='$(CC) -shared'
8421 LDCXXSHARED='$(CXX) -shared'
8422 else
8423 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008424 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008425 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008426 LDSHARED='$(CC) -bundle'
8427 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008428 if test "$enable_framework" ; then
8429 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008430 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8431 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008432 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008433 else
8434 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008435 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008436 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008437 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008438 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008439 LDSHARED='$(CC) -bundle'
8440 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008441 if test "$enable_framework" ; then
8442 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008443 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8444 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008445 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008446 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008447 # No framework, use the Python app as bundle-loader
8448 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008449 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008450 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008451 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008452 Darwin/*)
8453 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8454 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008455
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008456 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008457 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008458 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008459 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008460 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008461 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8462 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008463 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008464 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008465 LDSHARED='$(CC) -bundle'
8466 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008467 if test "$enable_framework" ; then
8468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008471 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008472 else
8473 # No framework, use the Python app as bundle-loader
8474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008476 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008477 fi
8478 fi
8479 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008480 Linux*|GNU*|QNX*)
8481 LDSHARED='$(CC) -shared'
8482 LDCXXSHARED='$(CXX) -shared';;
8483 BSD/OS*/4*)
8484 LDSHARED="gcc -shared"
8485 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008486 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008487 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008488 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008489 LDSHARED='$(CC) -shared'
8490 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008491 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008492 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008493 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008494 OpenBSD*)
8495 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8496 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008497 LDSHARED='$(CC) -shared $(CCSHARED)'
8498 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008499 else
8500 case `uname -r` in
8501 [01].* | 2.[0-7] | 2.[0-7].*)
8502 LDSHARED="ld -Bshareable ${LDFLAGS}"
8503 ;;
8504 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008505 LDSHARED='$(CC) -shared $(CCSHARED)'
8506 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008507 ;;
8508 esac
8509 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008510 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008511 LDSHARED='$(CC) -shared'
8512 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008513 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008514 if test "$GCC" = "yes" ; then
8515 LDSHARED='$(CC) -shared'
8516 LDCXXSHARED='$(CXX) -shared'
8517 else
8518 LDSHARED='$(CC) -G'
8519 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008520 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008521 SCO_SV*)
8522 LDSHARED='$(CC) -Wl,-G,-Bexport'
8523 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8524 CYGWIN*)
8525 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8526 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008527 *) LDSHARED="ld";;
8528 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8531$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008532LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008533BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008534# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008535# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8537$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008538if test -z "$CCSHARED"
8539then
Guido van Rossum07397971997-04-29 21:49:50 +00008540 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008541 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008542 then CCSHARED="-fPIC";
8543 elif test `uname -p` = sparc;
8544 then CCSHARED="-xcode=pic32";
8545 else CCSHARED="-Kpic";
8546 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008547 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008548 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008549 else CCSHARED="+z";
8550 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008551 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008552 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008553 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008554 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008555 if test "$GCC" = "yes"
8556 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008557 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008558 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008559 SCO_SV*)
8560 if test "$GCC" = "yes"
8561 then CCSHARED="-fPIC"
8562 else CCSHARED="-Kpic -belf"
8563 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008564 IRIX*/6*) case $CC in
8565 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008566 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008567 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8571$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008572# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008573# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8575$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008576if test -z "$LINKFORSHARED"
8577then
Guido van Rossum07397971997-04-29 21:49:50 +00008578 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008579 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008580 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008581 LINKFORSHARED="-Wl,-E -Wl,+s";;
8582# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008583 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008584 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008585 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008587 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008588 if test "$enable_framework"
8589 then
Jack Jansenda49e192005-01-07 13:08:22 +00008590 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008591 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008592 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008593 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008594 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008595 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008596 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8598 then
8599 LINKFORSHARED="-Wl,--export-dynamic"
8600 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008601 SunOS/5*) case $CC in
8602 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008603 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008604 then
8605 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008606 fi;;
8607 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008608 CYGWIN*)
8609 if test $enable_shared = "no"
8610 then
8611 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8612 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008613 QNX*)
8614 # -Wl,-E causes the symbols to be added to the dynamic
8615 # symbol table so that they can be found when a module
8616 # is loaded. -N 2048K causes the stack size to be set
8617 # to 2048 kilobytes so that the stack doesn't overflow
8618 # when running test_compile.py.
8619 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8623$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008624
Michael W. Hudson54241132001-12-07 15:38:26 +00008625
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008626
Matthias Kloseb9621712010-04-24 17:59:49 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8628$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008629if test ! "$LIBRARY" = "$LDLIBRARY"
8630then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008631 case $ac_sys_system in
8632 CYGWIN*)
8633 # Cygwin needs CCSHARED when building extension DLLs
8634 # but not when building the interpreter DLL.
8635 CFLAGSFORSHARED='';;
8636 *)
8637 CFLAGSFORSHARED='$(CCSHARED)'
8638 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8641$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008642
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008643# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8644# library (with --enable-shared).
8645# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008646# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8647# if it is not required, since it creates a dependency of the shared library
8648# to LIBS. This, in turn, means that applications linking the shared libpython
8649# don't need to link LIBS explicitly. The default should be only changed
8650# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8653$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008654case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008656 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008657esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8659$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008660
8661
Guido van Rossum627b2d71993-12-24 10:39:16 +00008662# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8664$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008666 $as_echo_n "(cached) " >&6
8667else
8668 ac_check_lib_save_LIBS=$LIBS
8669LIBS="-lsendfile $LIBS"
8670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8671/* end confdefs.h. */
8672
8673/* Override any GCC internal prototype to avoid an error.
8674 Use char because int might match the return type of a GCC
8675 builtin and then its argument prototype would still apply. */
8676#ifdef __cplusplus
8677extern "C"
8678#endif
8679char sendfile ();
8680int
8681main ()
8682{
8683return sendfile ();
8684 ;
8685 return 0;
8686}
8687_ACEOF
8688if ac_fn_c_try_link "$LINENO"; then :
8689 ac_cv_lib_sendfile_sendfile=yes
8690else
8691 ac_cv_lib_sendfile_sendfile=no
8692fi
8693rm -f core conftest.err conftest.$ac_objext \
8694 conftest$ac_exeext conftest.$ac_ext
8695LIBS=$ac_check_lib_save_LIBS
8696fi
8697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8698$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008700 cat >>confdefs.h <<_ACEOF
8701#define HAVE_LIBSENDFILE 1
8702_ACEOF
8703
8704 LIBS="-lsendfile $LIBS"
8705
8706fi
8707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8709$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008710if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008712else
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008714LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718/* Override any GCC internal prototype to avoid an error.
8719 Use char because int might match the return type of a GCC
8720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721#ifdef __cplusplus
8722extern "C"
8723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008724char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725int
8726main ()
8727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ;
8730 return 0;
8731}
8732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735else
Matthias Kloseb9621712010-04-24 17:59:49 +00008736 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008738rm -f core conftest.err conftest.$ac_objext \
8739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8743$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008744if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 cat >>confdefs.h <<_ACEOF
8746#define HAVE_LIBDL 1
8747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008749 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008751fi
8752 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8754$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008755if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008757else
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008759LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008763/* Override any GCC internal prototype to avoid an error.
8764 Use char because int might match the return type of a GCC
8765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766#ifdef __cplusplus
8767extern "C"
8768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008769char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008773return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ;
8775 return 0;
8776}
8777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008780else
Matthias Kloseb9621712010-04-24 17:59:49 +00008781 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783rm -f core conftest.err conftest.$ac_objext \
8784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8788$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008789if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 cat >>confdefs.h <<_ACEOF
8791#define HAVE_LIBDLD 1
8792_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008794 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008795
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008796fi
8797 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008798
Georg Brandlb1441c72009-01-03 22:33:39 +00008799# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008800if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8802$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008805else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008806 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008810/* Override any GCC internal prototype to avoid an error.
8811 Use char because int might match the return type of a GCC
8812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813#ifdef __cplusplus
8814extern "C"
8815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008816char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ;
8822 return 0;
8823}
8824_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008825for ac_lib in '' pthread rt posix4; do
8826 if test -z "$ac_lib"; then
8827 ac_res="none required"
8828 else
8829 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008837 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008839fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840done
Victor Stinnere0be4232011-10-25 13:06:09 +02008841if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843else
8844 ac_cv_search_sem_init=no
8845fi
8846rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008847LIBS=$ac_func_search_save_LIBS
8848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8850$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008852if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008854
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008855fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008856 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008857 # posix4 on Solaris 2.6
8858 # pthread (first!) on Linux
8859fi
8860
Martin v. Löwis19d17342003-06-14 21:03:05 +00008861# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8863$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008864if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008865 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008866else
8867 ac_check_lib_save_LIBS=$LIBS
8868LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008870/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872/* Override any GCC internal prototype to avoid an error.
8873 Use char because int might match the return type of a GCC
8874 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875#ifdef __cplusplus
8876extern "C"
8877#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008878char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008879int
8880main ()
8881{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008883 ;
8884 return 0;
8885}
8886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008888 ac_cv_lib_intl_textdomain=yes
8889else
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008894LIBS=$ac_check_lib_save_LIBS
8895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8897$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008898if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899
Matthias Kloseb9621712010-04-24 17:59:49 +00008900$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008901
Brett Cannonc6d936e2009-06-07 20:09:53 +00008902 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903fi
8904
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008905
8906# checks for system dependent C++ extensions support
8907case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8909$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008911/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008912
Georg Brandl59e87bd2011-02-15 19:48:59 +00008913 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008914int
8915main ()
8916{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008917loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
Matthias Kloseb159a552010-04-25 21:00:44 +00008921
Martin v. Löwis11437992002-04-12 09:54:03 +00008922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008923if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008924
Matthias Kloseb159a552010-04-25 21:00:44 +00008925
Matthias Kloseb9621712010-04-24 17:59:49 +00008926$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008927
Matthias Kloseb159a552010-04-25 21:00:44 +00008928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008929$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008931else
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
8933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008934$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008935
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008937rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008939 *) ;;
8940esac
8941
Guido van Rossum70c7f481998-03-26 18:44:10 +00008942# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8944$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008945if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008947else
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008949LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953/* Override any GCC internal prototype to avoid an error.
8954 Use char because int might match the return type of a GCC
8955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956#ifdef __cplusplus
8957extern "C"
8958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008959char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008963return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ;
8965 return 0;
8966}
8967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008972fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008973rm -f core conftest.err conftest.$ac_objext \
8974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8978$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008979if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008980 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008981fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008982 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8984$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008985if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008986 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008987else
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008989LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993/* Override any GCC internal prototype to avoid an error.
8994 Use char because int might match the return type of a GCC
8995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996#ifdef __cplusplus
8997extern "C"
8998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008999char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009000int
9001main ()
9002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ;
9005 return 0;
9006}
9007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009010else
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013rm -f core conftest.err conftest.$ac_objext \
9014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009015LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9018$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009019if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009020 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009021fi
9022 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009023
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9025$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009028if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9031$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009032LIBS="$withval $LIBS"
9033
9034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9036$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009037fi
9038
Guido van Rossum7f43da71994-08-01 12:15:30 +00009039
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009040if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009041 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9042set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009045if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009047else
9048 case $PKG_CONFIG in
9049 [\\/]* | ?:[\\/]*)
9050 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9051 ;;
9052 *)
9053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056 IFS=$as_save_IFS
9057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009060 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009062 break 2
9063 fi
9064done
Matthias Kloseb9621712010-04-24 17:59:49 +00009065 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009066IFS=$as_save_IFS
9067
9068 ;;
9069esac
9070fi
9071PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9072if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9074$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009075else
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009078fi
9079
9080
9081fi
9082if test -z "$ac_cv_path_PKG_CONFIG"; then
9083 ac_pt_PKG_CONFIG=$PKG_CONFIG
9084 # Extract the first word of "pkg-config", so it can be a program name with args.
9085set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9087$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009088if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009090else
9091 case $ac_pt_PKG_CONFIG in
9092 [\\/]* | ?:[\\/]*)
9093 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9094 ;;
9095 *)
9096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9097for as_dir in $PATH
9098do
9099 IFS=$as_save_IFS
9100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009103 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009105 break 2
9106 fi
9107done
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009109IFS=$as_save_IFS
9110
9111 ;;
9112esac
9113fi
9114ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9115if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9117$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009118else
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009121fi
9122
9123 if test "x$ac_pt_PKG_CONFIG" = x; then
9124 PKG_CONFIG=""
9125 else
9126 case $cross_compiling:$ac_tool_warned in
9127yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009130ac_tool_warned=yes ;;
9131esac
9132 PKG_CONFIG=$ac_pt_PKG_CONFIG
9133 fi
9134else
9135 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9136fi
9137
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009138
9139# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9141$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009142
9143# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009144if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009145 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009146else
9147 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009148fi
9149
9150
Matthias Kloseb9621712010-04-24 17:59:49 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9152$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009153
9154# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9156$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009157
9158# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009159if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009160 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009161else
9162 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009163fi
9164
9165
9166if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009167 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9168else
9169 LIBFFI_INCLUDEDIR=""
9170fi
9171
9172
Matthias Kloseb9621712010-04-24 17:59:49 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9174$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009175
Stefan Krah60187b52012-03-23 19:06:27 +01009176# Check for use of the system libmpdec library
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9178$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9179
9180# Check whether --with-system_libmpdec was given.
9181if test "${with_system_libmpdec+set}" = set; then :
9182 withval=$with_system_libmpdec;
9183else
9184 with_system_libmpdec="no"
9185fi
9186
9187
9188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9189$as_echo "$with_system_libmpdec" >&6; }
9190
Benjamin Peterson076ed002010-10-31 17:11:02 +00009191# Check for support for loadable sqlite extensions
9192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9193$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9194# Check whether --enable-loadable-sqlite-extensions was given.
9195if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9196 enableval=$enable_loadable_sqlite_extensions;
9197else
9198 enable_loadable_sqlite_extensions="no"
9199fi
9200
9201
9202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9203$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9204
Matthias Klose55708cc2009-04-30 08:06:49 +00009205# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9207$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009208
9209# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009210if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009211 withval=$with_dbmliborder;
9212if test x$with_dbmliborder = xyes
9213then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009214as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009215else
9216 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9217 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9218 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009219 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009220 fi
9221 done
9222fi
9223fi
9224
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9226$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009227
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009228# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009229
9230
Matthias Kloseb9621712010-04-24 17:59:49 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9232$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009235if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009236 withval=$with_signal_module;
9237fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009238
9239
9240if test -z "$with_signal_module"
9241then with_signal_module="yes"
9242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9244$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009245
9246if test "${with_signal_module}" = "yes"; then
9247 USE_SIGNAL_MODULE=""
9248 SIGNAL_OBJS=""
9249else
9250 USE_SIGNAL_MODULE="#"
9251 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9252fi
9253
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009254# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009255
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009256USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009258
Martin v. Löwis11437992002-04-12 09:54:03 +00009259
9260# Templates for things AC_DEFINEd more than once.
9261# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009262
9263
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9266$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009269if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009270 withval=$with_threads;
9271fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009272
9273
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009274# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009277if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278 withval=$with_thread; with_threads=$with_thread
9279fi
9280
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009281
9282if test -z "$with_threads"
9283then with_threads="yes"
9284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9286$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009287
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009288
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009289if test "$with_threads" = "no"
9290then
9291 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009292elif test "$ac_cv_pthread_is_default" = yes
9293then
Matthias Kloseb9621712010-04-24 17:59:49 +00009294 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009295
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009296 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009297 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009298
9299 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009301elif test "$ac_cv_kpthread" = "yes"
9302then
9303 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009304 if test "$ac_cv_cxx_thread" = "yes"; then
9305 CXX="$CXX -Kpthread"
9306 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009307 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009309 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009310 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009311elif test "$ac_cv_kthread" = "yes"
9312then
9313 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009314 if test "$ac_cv_cxx_thread" = "yes"; then
9315 CXX="$CXX -Kthread"
9316 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009318
9319 posix_threads=yes
9320 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009321elif test "$ac_cv_pthread" = "yes"
9322then
9323 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009324 if test "$ac_cv_cxx_thread" = "yes"; then
9325 CXX="$CXX -pthread"
9326 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009328
9329 posix_threads=yes
9330 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009331else
9332 if test ! -z "$with_threads" -a -d "$with_threads"
9333 then LDFLAGS="$LDFLAGS -L$with_threads"
9334 fi
9335 if test ! -z "$withval" -a -d "$withval"
9336 then LDFLAGS="$LDFLAGS -L$withval"
9337 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009338
9339 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009340 # define _POSIX_THREADS in unistd.h. Some apparently don't
9341 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9343$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009345/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009346
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009347#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009348#ifdef _POSIX_THREADS
9349yes
9350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009351
9352_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009354 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009355 unistd_defines_pthreads=yes
9356else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009357 unistd_defines_pthreads=no
9358fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009359rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009360
Matthias Kloseb9621712010-04-24 17:59:49 +00009361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9362$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009363
Matthias Kloseb9621712010-04-24 17:59:49 +00009364 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009365
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009366 # Just looking for pthread_create in libpthread is not enough:
9367 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9368 # So we really have to include pthread.h, and then link.
9369 _libs=$LIBS
9370 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9372$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009374/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009375
9376#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009377#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009378
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009379void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009380int
9381main ()
9382{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009383
9384pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ;
9386 return 0;
9387}
9388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009389if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9392$as_echo "yes" >&6; }
9393 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009394
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009395 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009396 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009397else
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009399 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009401if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009402 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009403
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009404 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009405 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009406else
Guido van Rossumad678af1998-10-02 14:42:15 +00009407
Matthias Kloseb9621712010-04-24 17:59:49 +00009408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9409$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009410if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009412else
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009414LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418/* Override any GCC internal prototype to avoid an error.
9419 Use char because int might match the return type of a GCC
9420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009421#ifdef __cplusplus
9422extern "C"
9423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009424char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
9427{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009429 ;
9430 return 0;
9431}
9432_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009434 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009435else
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009437fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009438rm -f core conftest.err conftest.$ac_objext \
9439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009440LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9443$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009444if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009445 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009447 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009448 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009449 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009450else
Greg Steinadf63d62000-07-05 10:38:09 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9453$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009454if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009455 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009456else
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009458LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009462/* Override any GCC internal prototype to avoid an error.
9463 Use char because int might match the return type of a GCC
9464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009465#ifdef __cplusplus
9466extern "C"
9467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009468char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
9471{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009479else
Matthias Kloseb9621712010-04-24 17:59:49 +00009480 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482rm -f core conftest.err conftest.$ac_objext \
9483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009484LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9487$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009488if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009489 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009490
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009491 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009492 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009493 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009494else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9497$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009500else
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009502LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506/* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509#ifdef __cplusplus
9510extern "C"
9511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009512char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513int
9514main ()
9515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ;
9518 return 0;
9519}
9520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009523else
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526rm -f core conftest.err conftest.$ac_objext \
9527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009528LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9531$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009532if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009534
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009535 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009536 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009537 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009538else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9541$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009546LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009556char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009572LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9575$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009579 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009580 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009581 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009582else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009583
Martin v. Löwis130fb172001-07-19 11:00:41 +00009584 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009585fi
9586
Guido van Rossum627b2d71993-12-24 10:39:16 +00009587
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009588fi
9589
Guido van Rossum0be3e491997-05-22 20:33:33 +00009590fi
9591
Guido van Rossum49545951997-12-02 19:28:29 +00009592fi
9593
Guido van Rossumb93a8621998-05-07 13:27:32 +00009594fi
9595
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009597rm -f core conftest.err conftest.$ac_objext \
9598 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009599
Matthias Kloseb9621712010-04-24 17:59:49 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9601$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009602if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009603 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009604else
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009606LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610/* Override any GCC internal prototype to avoid an error.
9611 Use char because int might match the return type of a GCC
9612 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009613#ifdef __cplusplus
9614extern "C"
9615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009616char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009617int
9618main ()
9619{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 ;
9622 return 0;
9623}
9624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009625if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009627else
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009630rm -f core conftest.err conftest.$ac_objext \
9631 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009632LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9635$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009636if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009637 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009638
Martin v. Löwis130fb172001-07-19 11:00:41 +00009639 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009640 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009641 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009642fi
9643
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009644
Neal Norwitza978ab02002-11-02 16:58:05 +00009645 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9647$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009648if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009650else
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009652LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009656/* Override any GCC internal prototype to avoid an error.
9657 Use char because int might match the return type of a GCC
9658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659#ifdef __cplusplus
9660extern "C"
9661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009662char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009667 ;
9668 return 0;
9669}
9670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009671if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009673else
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676rm -f core conftest.err conftest.$ac_objext \
9677 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009678LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9681$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009682if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009684
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009685 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009686 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009687 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009688fi
9689
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009690 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009691fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009692
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009693if test "$posix_threads" = "yes"; then
9694 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009695
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009697
9698 fi
9699
9700 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9701 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009702 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009703$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009704
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009705 ;;
9706 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009707$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009708
9709 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009710 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009711$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009712
9713 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009714 esac
9715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9717$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009720else
Matthias Kloseb9621712010-04-24 17:59:49 +00009721 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009722 ac_cv_pthread_system_supported=no
9723else
Matthias Kloseb9621712010-04-24 17:59:49 +00009724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009726
9727 #include <stdio.h>
9728 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009729 void *foo(void *parm) {
9730 return NULL;
9731 }
9732 main() {
9733 pthread_attr_t attr;
9734 pthread_t id;
9735 if (pthread_attr_init(&attr)) exit(-1);
9736 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9737 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9738 exit(0);
9739 }
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742 ac_cv_pthread_system_supported=yes
9743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9747 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009748fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009750
Guido van Rossum627b2d71993-12-24 10:39:16 +00009751fi
9752
Matthias Kloseb9621712010-04-24 17:59:49 +00009753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9754$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009755 if test "$ac_cv_pthread_system_supported" = "yes"; then
9756
Matthias Kloseb9621712010-04-24 17:59:49 +00009757$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009758
9759 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 for ac_func in pthread_sigmask
9761do :
9762 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009763if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009764 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009765#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009766_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009767 case $ac_sys_system in
9768 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009769
Matthias Kloseb9621712010-04-24 17:59:49 +00009770$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009771
9772 ;;
9773 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009774fi
9775done
9776
9777fi
9778
9779
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009780# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009781
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9783$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009785if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009786 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009787 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009790 ipv6=no
9791 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9793$as_echo "yes" >&6; }
9794 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009795
9796 ipv6=yes
9797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009799else
Martin v. Löwis11437992002-04-12 09:54:03 +00009800
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009803 /* AF_INET6 available check */
9804#include <sys/types.h>
9805#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009806int
9807main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009808{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009809int domain = AF_INET6;
9810 ;
9811 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009812}
Martin v. Löwis11437992002-04-12 09:54:03 +00009813_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009814if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009815
Matthias Kloseb9621712010-04-24 17:59:49 +00009816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9817$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009820else
Matthias Kloseb159a552010-04-25 21:00:44 +00009821
Matthias Kloseb9621712010-04-24 17:59:49 +00009822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9823$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009824 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009825
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009826fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009828
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009829if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9831$as_echo_n "checking if RFC2553 API is available... " >&6; }
9832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009833/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009834
9835 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009836#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009837int
9838main ()
9839{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009840struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009841 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ;
9843 return 0;
9844}
Matthias Kloseb159a552010-04-25 21:00:44 +00009845
Martin v. Löwis11437992002-04-12 09:54:03 +00009846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009847if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009848
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009850$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009851 ipv6=yes
9852
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009853else
Matthias Kloseb159a552010-04-25 21:00:44 +00009854
9855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009856$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009857 ipv6=no
9858
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009861fi
9862
9863if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009864 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009865
9866fi
9867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868fi
9869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009870
9871ipv6type=unknown
9872ipv6lib=none
9873ipv6trylibc=no
9874
9875if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9877$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009878 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9879 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009880 case $i in
9881 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009884
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009885#include <netinet/in.h>
9886#ifdef IPV6_INRIA_VERSION
9887yes
9888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009889_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009892 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009894rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009895
9896 ;;
9897 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009901#include <netinet/in.h>
9902#ifdef __KAME__
9903yes
9904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009908 ipv6type=$i;
9909 ipv6lib=inet6
9910 ipv6libdir=/usr/local/v6/lib
9911 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009913rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914
9915 ;;
9916 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009918/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920#include <features.h>
9921#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9922yes
9923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009924_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927 ipv6type=$i;
9928 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009930rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009931
9932 ;;
9933 linux-inet6)
9934 if test -d /usr/inet6; then
9935 ipv6type=$i
9936 ipv6lib=inet6
9937 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009938 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009939 fi
9940 ;;
9941 solaris)
9942 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009943 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944 ipv6type=$i
9945 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946 fi
9947 fi
9948 ;;
9949 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009951/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009952
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009953#include <sys/param.h>
9954#ifdef _TOSHIBA_INET6
9955yes
9956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009957_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009959 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960 ipv6type=$i;
9961 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009962 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009964rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009965
9966 ;;
9967 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971#include </usr/local/v6/include/sys/v6config.h>
9972#ifdef __V6D__
9973yes
9974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009978 ipv6type=$i;
9979 ipv6lib=v6;
9980 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009981 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009983rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984
9985 ;;
9986 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009990#include <sys/param.h>
9991#ifdef _ZETA_MINAMI_INET6
9992yes
9993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009997 ipv6type=$i;
9998 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009999 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010001rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002
10003 ;;
10004 esac
10005 if test "$ipv6type" != "unknown"; then
10006 break
10007 fi
10008 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10010$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011fi
10012
10013if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10014 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10015 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10016 echo "using lib$ipv6lib"
10017 else
10018 if test $ipv6trylibc = "yes"; then
10019 echo "using libc"
10020 else
10021 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10022 echo "You need to fetch lib$ipv6lib.a from appropriate"
10023 echo 'ipv6 kit and compile beforehand.'
10024 exit 1
10025 fi
10026 fi
10027fi
10028
Matthias Kloseb9621712010-04-24 17:59:49 +000010029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10030$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010032/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010033
10034 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010035int
10036main ()
10037{
10038FSIORefNum fRef = 0
10039 ;
10040 return 0;
10041}
Matthias Kloseb159a552010-04-25 21:00:44 +000010042
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010044if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010045
Matthias Kloseb159a552010-04-25 21:00:44 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10050$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010052else
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
Matthias Kloseb9621712010-04-24 17:59:49 +000010054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10055$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010056
10057fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10059
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010060# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10062$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 withval=$with_doc_strings;
10067fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010068
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010069
10070if test -z "$with_doc_strings"
10071then with_doc_strings="yes"
10072fi
10073if test "$with_doc_strings" != "no"
10074then
10075
Matthias Kloseb9621712010-04-24 17:59:49 +000010076$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010077
10078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10080$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010081
Antoine Pitrou042b1282010-08-13 21:15:58 +000010082# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10084$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010088 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010089if test "$withval" != no
10090then
10091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010093
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10095$as_echo "yes" >&6; }
10096else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010098fi
10099else
Matthias Kloseb9621712010-04-24 17:59:49 +000010100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10101$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010102fi
10103
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010104
10105# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10107$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010110if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111 withval=$with_pymalloc;
10112fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010113
Neil Schemenauera35c6882001-02-27 04:45:05 +000010114
Neil Schemenauer16c22972002-03-22 15:34:49 +000010115if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010116then
10117 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010118fi
10119if test "$with_pymalloc" != "no"
10120then
Martin v. Löwis11437992002-04-12 09:54:03 +000010121
Matthias Kloseb9621712010-04-24 17:59:49 +000010122$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010123
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010124 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10127$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010128
Benjamin Peterson05159c42009-12-03 03:01:27 +000010129# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10131$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010132
10133# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010134if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010135 withval=$with_valgrind;
10136else
10137 with_valgrind=no
10138fi
10139
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10141$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010142if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 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 +020010144if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010147
10148else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010149 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010150
10151fi
10152
10153
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010154 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010155fi
10156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010157# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010158
Guido van Rossum98935bf2001-09-05 19:13:16 +000010159DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010160
Guido van Rossume97ee181999-12-20 21:27:22 +000010161# the dlopen() function means we might want to use dynload_shlib.o. some
10162# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010163for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010164do :
10165 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010166if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010167 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010168#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010169_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010170
Guido van Rossume97ee181999-12-20 21:27:22 +000010171fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010172done
Guido van Rossume97ee181999-12-20 21:27:22 +000010173
Michael W. Hudson54241132001-12-07 15:38:26 +000010174
Guido van Rossume97ee181999-12-20 21:27:22 +000010175# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10176# loading of modules.
10177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10179$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010180if test -z "$DYNLOADFILE"
10181then
10182 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010183 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10184 if test "$ac_cv_func_dlopen" = yes
10185 then DYNLOADFILE="dynload_shlib.o"
10186 else DYNLOADFILE="dynload_aix.o"
10187 fi
10188 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010189 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010190 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10191 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010192 *)
10193 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10194 # out any dynamic loading
10195 if test "$ac_cv_func_dlopen" = yes
10196 then DYNLOADFILE="dynload_shlib.o"
10197 else DYNLOADFILE="dynload_stub.o"
10198 fi
10199 ;;
10200 esac
10201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10203$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010204if test "$DYNLOADFILE" != "dynload_stub.o"
10205then
Martin v. Löwis11437992002-04-12 09:54:03 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010208
10209fi
10210
Neil Schemenauer4e425612001-06-19 15:44:15 +000010211# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10212
Michael W. Hudson54241132001-12-07 15:38:26 +000010213
Matthias Kloseb9621712010-04-24 17:59:49 +000010214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10215$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010216if test -z "$MACHDEP_OBJS"
10217then
Jack Jansene578a632001-08-15 01:27:14 +000010218 MACHDEP_OBJS=$extra_machdep_objs
10219else
10220 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010221fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010222if test -z "$MACHDEP_OBJS"; then
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10224$as_echo "none" >&6; }
10225else
10226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10227$as_echo "$MACHDEP_OBJS" >&6; }
10228fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010229
Guido van Rossum627b2d71993-12-24 10:39:16 +000010230# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010231for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010232 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010233 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010234 futimens futimes gai_strerror \
10235 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010236 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010237 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010238 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10239 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010240 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010241 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010242 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010243 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010244 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010245 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010246 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10247 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010248 sigaction sigaltstack siginterrupt sigpending sigrelse \
10249 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010250 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010251 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10252 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010253do :
10254 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10255ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010256if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010258#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010259_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010260
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010261fi
10262done
10263
Michael W. Hudson54241132001-12-07 15:38:26 +000010264
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010265ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10266 #include <dirent.h>
10267"
10268if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10269
10270$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10271
10272fi
10273
10274
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010275# For some functions, having a definition is not sufficient, since
10276# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10278$as_echo_n "checking for chroot... " >&6; }
10279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010281#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010282int
10283main ()
10284{
10285void *x=chroot
10286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010293
Matthias Kloseb159a552010-04-25 21:00:44 +000010294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010295$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010296else
Matthias Kloseb9621712010-04-24 17:59:49 +000010297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10298$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010299
10300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10303$as_echo_n "checking for link... " >&6; }
10304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010305/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010306#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010307int
10308main ()
10309{
10310void *x=link
10311 ;
10312 return 0;
10313}
10314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316
Matthias Kloseb9621712010-04-24 17:59:49 +000010317$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010318
Matthias Kloseb159a552010-04-25 21:00:44 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010320$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010321else
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10323$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010324
10325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10328$as_echo_n "checking for symlink... " >&6; }
10329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010330/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010331#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010332int
10333main ()
10334{
10335void *x=symlink
10336 ;
10337 return 0;
10338}
10339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010340if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010343
Matthias Kloseb159a552010-04-25 21:00:44 +000010344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010345$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010346else
Matthias Kloseb9621712010-04-24 17:59:49 +000010347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10348$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010349
10350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10353$as_echo_n "checking for fchdir... " >&6; }
10354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010355/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010356#include <unistd.h>
10357int
10358main ()
10359{
10360void *x=fchdir
10361 ;
10362 return 0;
10363}
10364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010368
Matthias Kloseb159a552010-04-25 21:00:44 +000010369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010370$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010371else
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10373$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010374
10375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10378$as_echo_n "checking for fsync... " >&6; }
10379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010380/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010381#include <unistd.h>
10382int
10383main ()
10384{
10385void *x=fsync
10386 ;
10387 return 0;
10388}
10389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010393
Matthias Kloseb159a552010-04-25 21:00:44 +000010394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010395$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010396else
Matthias Kloseb9621712010-04-24 17:59:49 +000010397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10398$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010399
10400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10403$as_echo_n "checking for fdatasync... " >&6; }
10404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010405/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010406#include <unistd.h>
10407int
10408main ()
10409{
10410void *x=fdatasync
10411 ;
10412 return 0;
10413}
10414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010415if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416
Matthias Kloseb9621712010-04-24 17:59:49 +000010417$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010418
Matthias Kloseb159a552010-04-25 21:00:44 +000010419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010420$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010421else
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010424
10425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10428$as_echo_n "checking for epoll... " >&6; }
10429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010430/* end confdefs.h. */
10431#include <sys/epoll.h>
10432int
10433main ()
10434{
10435void *x=epoll_create
10436 ;
10437 return 0;
10438}
10439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010440if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010443
Matthias Kloseb159a552010-04-25 21:00:44 +000010444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010445$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010446else
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10448$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010449
10450fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10453$as_echo_n "checking for epoll_create1... " >&6; }
10454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10455/* end confdefs.h. */
10456#include <sys/epoll.h>
10457int
10458main ()
10459{
10460void *x=epoll_create1
10461 ;
10462 return 0;
10463}
10464_ACEOF
10465if ac_fn_c_try_compile "$LINENO"; then :
10466
10467$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10468
10469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10470$as_echo "yes" >&6; }
10471else
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473$as_echo "no" >&6; }
10474
10475fi
10476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10478$as_echo_n "checking for kqueue... " >&6; }
10479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010480/* end confdefs.h. */
10481
10482#include <sys/types.h>
10483#include <sys/event.h>
10484
10485int
10486main ()
10487{
10488int x=kqueue()
10489 ;
10490 return 0;
10491}
10492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010496
Matthias Kloseb159a552010-04-25 21:00:44 +000010497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010499else
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10501$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010502
10503fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010505# On some systems (eg. FreeBSD 5), we would find a definition of the
10506# functions ctermid_r, setgroups in the library, but no prototype
10507# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10508# address to avoid compiler warnings and potential miscompilations
10509# because of the missing prototypes.
10510
Matthias Kloseb9621712010-04-24 17:59:49 +000010511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10512$as_echo_n "checking for ctermid_r... " >&6; }
10513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010514/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010515
Martin v. Löwisd5843682002-11-21 20:41:28 +000010516#include <stdio.h>
10517
Martin v. Löwisd5843682002-11-21 20:41:28 +000010518int
10519main ()
10520{
10521void* p = ctermid_r
10522 ;
10523 return 0;
10524}
10525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010529
Matthias Kloseb159a552010-04-25 21:00:44 +000010530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010531$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010532else
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10534$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010535
10536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10538
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10540$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010541if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010542 $as_echo_n "(cached) " >&6
10543else
10544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010545/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010546#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010547int
10548main ()
10549{
10550void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010551
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010552 ;
10553 return 0;
10554}
10555_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010556if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010557 ac_cv_flock_decl=yes
10558else
10559 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010560
10561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010563
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010564fi
10565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10566$as_echo "$ac_cv_flock_decl" >&6; }
10567if test "x${ac_cv_flock_decl}" = xyes; then
10568 for ac_func in flock
10569do :
10570 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010571if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010572 cat >>confdefs.h <<_ACEOF
10573#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010574_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010575
Antoine Pitroua3000072010-09-07 14:52:42 +000010576else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010578$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010579if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010580 $as_echo_n "(cached) " >&6
10581else
10582 ac_check_lib_save_LIBS=$LIBS
10583LIBS="-lbsd $LIBS"
10584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10585/* end confdefs.h. */
10586
10587/* Override any GCC internal prototype to avoid an error.
10588 Use char because int might match the return type of a GCC
10589 builtin and then its argument prototype would still apply. */
10590#ifdef __cplusplus
10591extern "C"
10592#endif
10593char flock ();
10594int
10595main ()
10596{
10597return flock ();
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602if ac_fn_c_try_link "$LINENO"; then :
10603 ac_cv_lib_bsd_flock=yes
10604else
10605 ac_cv_lib_bsd_flock=no
10606fi
10607rm -f core conftest.err conftest.$ac_objext \
10608 conftest$ac_exeext conftest.$ac_ext
10609LIBS=$ac_check_lib_save_LIBS
10610fi
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10612$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010613if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010614 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010615
10616
10617$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10618
10619
10620fi
10621
10622
10623fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010624done
10625
Antoine Pitroua3000072010-09-07 14:52:42 +000010626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627
Matthias Kloseb9621712010-04-24 17:59:49 +000010628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10629$as_echo_n "checking for getpagesize... " >&6; }
10630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010632
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010633#include <unistd.h>
10634
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010635int
10636main ()
10637{
10638void* p = getpagesize
10639 ;
10640 return 0;
10641}
10642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010643if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010644
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010646
Matthias Kloseb159a552010-04-25 21:00:44 +000010647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010649else
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010652
10653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010655
Victor Stinner984890f2011-11-24 13:53:38 +010010656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10657$as_echo_n "checking for broken unsetenv... " >&6; }
10658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10659/* end confdefs.h. */
10660
10661#include <stdlib.h>
10662
10663int
10664main ()
10665{
10666int res = unsetenv("DUMMY")
10667 ;
10668 return 0;
10669}
10670_ACEOF
10671if ac_fn_c_try_compile "$LINENO"; then :
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673$as_echo "no" >&6; }
10674else
10675
10676$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10677
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10679$as_echo "yes" >&6; }
10680
10681fi
10682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10683
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010684for ac_prog in true
10685do
10686 # Extract the first word of "$ac_prog", so it can be a program name with args.
10687set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10689$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010690if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010691 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692else
10693 if test -n "$TRUE"; then
10694 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10695else
10696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10697for as_dir in $PATH
10698do
10699 IFS=$as_save_IFS
10700 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010703 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 $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 +000010705 break 2
10706 fi
10707done
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010710
10711fi
10712fi
10713TRUE=$ac_cv_prog_TRUE
10714if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10716$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010717else
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10719$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010720fi
10721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010722
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723 test -n "$TRUE" && break
10724done
10725test -n "$TRUE" || TRUE="/bin/true"
10726
10727
Matthias Kloseb9621712010-04-24 17:59:49 +000010728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10729$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010730if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010732else
10733 ac_check_lib_save_LIBS=$LIBS
10734LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010736/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010737
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738/* Override any GCC internal prototype to avoid an error.
10739 Use char because int might match the return type of a GCC
10740 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010741#ifdef __cplusplus
10742extern "C"
10743#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010744char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010745int
10746main ()
10747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010749 ;
10750 return 0;
10751}
10752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010754 ac_cv_lib_c_inet_aton=yes
10755else
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010758rm -f core conftest.err conftest.$ac_objext \
10759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010760LIBS=$ac_check_lib_save_LIBS
10761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10763$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010764if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010765 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010766else
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10768$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010769if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010771else
10772 ac_check_lib_save_LIBS=$LIBS
10773LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010775/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777/* Override any GCC internal prototype to avoid an error.
10778 Use char because int might match the return type of a GCC
10779 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780#ifdef __cplusplus
10781extern "C"
10782#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010783char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010784int
10785main ()
10786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010788 ;
10789 return 0;
10790}
10791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010792if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010793 ac_cv_lib_resolv_inet_aton=yes
10794else
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010797rm -f core conftest.err conftest.$ac_objext \
10798 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010799LIBS=$ac_check_lib_save_LIBS
10800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10802$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010803if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010804 cat >>confdefs.h <<_ACEOF
10805#define HAVE_LIBRESOLV 1
10806_ACEOF
10807
10808 LIBS="-lresolv $LIBS"
10809
10810fi
10811
10812
10813fi
10814
10815
Christian Heimesd0764e22007-12-04 15:00:33 +000010816# On Tru64, chflags seems to be present, but calling it will
10817# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10819$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010820if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010822else
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010824 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010825else
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010827/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010828
Christian Heimesd0764e22007-12-04 15:00:33 +000010829#include <sys/stat.h>
10830#include <unistd.h>
10831int main(int argc, char*argv[])
10832{
10833 if(chflags(argv[0], 0) != 0)
10834 return 1;
10835 return 0;
10836}
Ned Deily3eb67d52011-06-28 00:00:28 -070010837
Christian Heimesd0764e22007-12-04 15:00:33 +000010838_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010839if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010840 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010843fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10845 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010846fi
10847
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010848
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10851$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010852if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010854if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010855 ac_cv_have_chflags="yes"
10856else
10857 ac_cv_have_chflags="no"
10858fi
10859
10860fi
10861if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010862
Matthias Kloseb9621712010-04-24 17:59:49 +000010863$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010864
10865fi
10866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10868$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010869if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010871else
Matthias Kloseb9621712010-04-24 17:59:49 +000010872 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010873 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010874else
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010876/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010877
Christian Heimesd0764e22007-12-04 15:00:33 +000010878#include <sys/stat.h>
10879#include <unistd.h>
10880int main(int argc, char*argv[])
10881{
10882 if(lchflags(argv[0], 0) != 0)
10883 return 1;
10884 return 0;
10885}
Ned Deily3eb67d52011-06-28 00:00:28 -070010886
Christian Heimesd0764e22007-12-04 15:00:33 +000010887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010888if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010889 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010890else
Matthias Kloseb9621712010-04-24 17:59:49 +000010891 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010892fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010893rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10894 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010895fi
10896
10897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10900$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010901if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010903if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010904 ac_cv_have_lchflags="yes"
10905else
10906 ac_cv_have_lchflags="no"
10907fi
10908
10909fi
10910if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010913
10914fi
10915
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010916case $ac_sys_system/$ac_sys_release in
10917Darwin/*)
10918 _CUR_CFLAGS="${CFLAGS}"
10919 _CUR_LDFLAGS="${LDFLAGS}"
10920 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10921 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10922 ;;
10923esac
10924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10926$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010927if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010929else
10930 ac_check_lib_save_LIBS=$LIBS
10931LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010933/* end confdefs.h. */
10934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010935/* Override any GCC internal prototype to avoid an error.
10936 Use char because int might match the return type of a GCC
10937 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010938#ifdef __cplusplus
10939extern "C"
10940#endif
10941char inflateCopy ();
10942int
10943main ()
10944{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010951 ac_cv_lib_z_inflateCopy=yes
10952else
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010955rm -f core conftest.err conftest.$ac_objext \
10956 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010957LIBS=$ac_check_lib_save_LIBS
10958fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10960$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010961if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010964
10965fi
10966
10967
10968case $ac_sys_system/$ac_sys_release in
10969Darwin/*)
10970 CFLAGS="${_CUR_CFLAGS}"
10971 LDFLAGS="${_CUR_LDFLAGS}"
10972 ;;
10973esac
10974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10976$as_echo_n "checking for hstrerror... " >&6; }
10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010978/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010979
Martin v. Löwise9416172003-05-03 10:12:45 +000010980#include <netdb.h>
10981
Martin v. Löwise9416172003-05-03 10:12:45 +000010982int
10983main ()
10984{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010985void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010986 ;
10987 return 0;
10988}
10989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010990if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010993
Matthias Kloseb159a552010-04-25 21:00:44 +000010994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010995$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010996else
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10998$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010999
11000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011001rm -f core conftest.err conftest.$ac_objext \
11002 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11005$as_echo_n "checking for inet_aton... " >&6; }
11006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011007/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011008
Martin v. Löwis86d66262006-02-17 08:40:11 +000011009#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011010#include <sys/socket.h>
11011#include <netinet/in.h>
11012#include <arpa/inet.h>
11013
Martin v. Löwise9416172003-05-03 10:12:45 +000011014int
11015main ()
11016{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011017void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011018 ;
11019 return 0;
11020}
11021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011022if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011025
Matthias Kloseb159a552010-04-25 21:00:44 +000011026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011028else
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011031
11032fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011033rm -f core conftest.err conftest.$ac_objext \
11034 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11037$as_echo_n "checking for inet_pton... " >&6; }
11038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011040
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011041#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011042#include <sys/socket.h>
11043#include <netinet/in.h>
11044#include <arpa/inet.h>
11045
Martin v. Löwise9416172003-05-03 10:12:45 +000011046int
11047main ()
11048{
11049void* p = inet_pton
11050 ;
11051 return 0;
11052}
11053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011054if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011057
Matthias Kloseb159a552010-04-25 21:00:44 +000011058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011059$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +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öwise9416172003-05-03 10:12:45 +000011063
11064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011066
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011067# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11069$as_echo_n "checking for setgroups... " >&6; }
11070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011072
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011073#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011074#ifdef HAVE_GRP_H
11075#include <grp.h>
11076#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011077
Martin v. Löwisd5843682002-11-21 20:41:28 +000011078int
11079main ()
11080{
11081void* p = setgroups
11082 ;
11083 return 0;
11084}
11085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011086if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011087
Matthias Kloseb9621712010-04-24 17:59:49 +000011088$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011089
Matthias Kloseb159a552010-04-25 21:00:44 +000011090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011092else
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011095
11096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011098
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011099# check for openpty and forkpty
11100
11101for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011102do :
11103 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011104if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011105 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011108
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011109else
Matthias Kloseb9621712010-04-24 17:59:49 +000011110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11111$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011112if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011116LIBS="-lutil $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öwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011123#ifdef __cplusplus
11124extern "C"
11125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011126char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011127int
11128main ()
11129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000011136 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137else
Matthias Kloseb9621712010-04-24 17:59:49 +000011138 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +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öwis11437992002-04-12 09:54:03 +000011142LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11145$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011146if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011148 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011149else
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11151$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011152if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011154else
11155 ac_check_lib_save_LIBS=$LIBS
11156LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011158/* end confdefs.h. */
11159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011160/* Override any GCC internal prototype to avoid an error.
11161 Use char because int might match the return type of a GCC
11162 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011163#ifdef __cplusplus
11164extern "C"
11165#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011166char openpty ();
11167int
11168main ()
11169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011170return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011171 ;
11172 return 0;
11173}
11174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011175if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011176 ac_cv_lib_bsd_openpty=yes
11177else
Matthias Kloseb9621712010-04-24 17:59:49 +000011178 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011180rm -f core conftest.err conftest.$ac_objext \
11181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011182LIBS=$ac_check_lib_save_LIBS
11183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11185$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011186if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011188 LIBS="$LIBS -lbsd"
11189fi
11190
11191
11192fi
11193
Fred Drake8cef4cf2000-06-28 16:40:38 +000011194
11195fi
11196done
11197
11198for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011199do :
11200 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011201if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011203#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011204_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011205
Fred Drake8cef4cf2000-06-28 16:40:38 +000011206else
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11208$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011209if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011210 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211else
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011213LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217/* Override any GCC internal prototype to avoid an error.
11218 Use char because int might match the return type of a GCC
11219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011220#ifdef __cplusplus
11221extern "C"
11222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011223char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011224int
11225main ()
11226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011227return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 ;
11229 return 0;
11230}
11231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234else
Matthias Kloseb9621712010-04-24 17:59:49 +000011235 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011237rm -f core conftest.err conftest.$ac_objext \
11238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011239LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11242$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011243if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011245 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011246else
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11248$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011249if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011251else
11252 ac_check_lib_save_LIBS=$LIBS
11253LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011255/* end confdefs.h. */
11256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011257/* Override any GCC internal prototype to avoid an error.
11258 Use char because int might match the return type of a GCC
11259 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260#ifdef __cplusplus
11261extern "C"
11262#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011263char forkpty ();
11264int
11265main ()
11266{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011268 ;
11269 return 0;
11270}
11271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011272if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011273 ac_cv_lib_bsd_forkpty=yes
11274else
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011277rm -f core conftest.err conftest.$ac_objext \
11278 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011279LIBS=$ac_check_lib_save_LIBS
11280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11282$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011283if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011284 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011285 LIBS="$LIBS -lbsd"
11286fi
11287
11288
11289fi
11290
Fred Drake8cef4cf2000-06-28 16:40:38 +000011291
11292fi
11293done
11294
Jack Jansendd19cf82001-12-06 22:36:17 +000011295
Christian Heimesb186d002008-03-18 15:15:01 +000011296# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011297for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011298do :
11299 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011300if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011303_ACEOF
11304
11305fi
11306done
11307
11308
Michael W. Hudson54241132001-12-07 15:38:26 +000011309# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011310for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011311do :
11312 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11313ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011314if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011316#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011317_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011318
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011319fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011320done
11321
Michael W. Hudson54241132001-12-07 15:38:26 +000011322
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011323ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011324if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011325 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011326
Martin v. Löwis1142de32002-03-29 16:28:31 +000011327else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011328 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011329 *" dup2.$ac_objext "* ) ;;
11330 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011331 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011332esac
11333
Martin v. Löwis1142de32002-03-29 16:28:31 +000011334fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011335
11336ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011337if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011338 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11339
11340else
11341 case " $LIBOBJS " in
11342 *" getcwd.$ac_objext "* ) ;;
11343 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11344 ;;
11345esac
11346
11347fi
11348
11349ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011350if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011351 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11352
11353else
11354 case " $LIBOBJS " in
11355 *" strdup.$ac_objext "* ) ;;
11356 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11357 ;;
11358esac
11359
11360fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011361
11362
11363for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011364do :
11365 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011366if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011367 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011372#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011373int
11374main ()
11375{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011376getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 ;
11378 return 0;
11379}
11380_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
Matthias Kloseb9621712010-04-24 17:59:49 +000011383$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011384
Guido van Rossum627b2d71993-12-24 10:39:16 +000011385fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011387
Guido van Rossum627b2d71993-12-24 10:39:16 +000011388fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011389done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011390
Jack Jansen150753c2003-03-29 22:07:47 +000011391for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011392do :
11393 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011394if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011400#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011401int
11402main ()
11403{
11404setpgrp(0,0);
11405 ;
11406 return 0;
11407}
11408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011410
Matthias Kloseb9621712010-04-24 17:59:49 +000011411$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011412
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011413fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011415
11416fi
11417done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011418
Thomas Wouters3a584202000-08-05 23:28:51 +000011419for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011420do :
11421 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011422if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011423 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011427/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011428#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011429int
11430main ()
11431{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011432gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011433 ;
11434 return 0;
11435}
11436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011437if ac_fn_c_try_compile "$LINENO"; then :
11438
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439else
Skip Montanaro6dead952003-09-25 14:50:04 +000011440
Matthias Kloseb9621712010-04-24 17:59:49 +000011441$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011442
Martin v. Löwis11437992002-04-12 09:54:03 +000011443
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011446
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011448done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011449
Michael W. Hudson54241132001-12-07 15:38:26 +000011450
Victor Stinnere0be4232011-10-25 13:06:09 +020011451for ac_func in clock_gettime
11452do :
11453 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11454if test "x$ac_cv_func_clock_gettime" = xyes; then :
11455 cat >>confdefs.h <<_ACEOF
11456#define HAVE_CLOCK_GETTIME 1
11457_ACEOF
11458
11459else
11460
11461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11462$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11463if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11464 $as_echo_n "(cached) " >&6
11465else
11466 ac_check_lib_save_LIBS=$LIBS
11467LIBS="-lrt $LIBS"
11468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11469/* end confdefs.h. */
11470
11471/* Override any GCC internal prototype to avoid an error.
11472 Use char because int might match the return type of a GCC
11473 builtin and then its argument prototype would still apply. */
11474#ifdef __cplusplus
11475extern "C"
11476#endif
11477char clock_gettime ();
11478int
11479main ()
11480{
11481return clock_gettime ();
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486if ac_fn_c_try_link "$LINENO"; then :
11487 ac_cv_lib_rt_clock_gettime=yes
11488else
11489 ac_cv_lib_rt_clock_gettime=no
11490fi
11491rm -f core conftest.err conftest.$ac_objext \
11492 conftest$ac_exeext conftest.$ac_ext
11493LIBS=$ac_check_lib_save_LIBS
11494fi
11495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11496$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11497if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11498
11499 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11500
11501
11502$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11503
11504
11505fi
11506
11507
11508fi
11509done
11510
11511
11512for ac_func in clock_getres
11513do :
11514 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11515if test "x$ac_cv_func_clock_getres" = xyes; then :
11516 cat >>confdefs.h <<_ACEOF
11517#define HAVE_CLOCK_GETRES 1
11518_ACEOF
11519
11520else
11521
11522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11523$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11524if ${ac_cv_lib_rt_clock_getres+:} false; then :
11525 $as_echo_n "(cached) " >&6
11526else
11527 ac_check_lib_save_LIBS=$LIBS
11528LIBS="-lrt $LIBS"
11529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11530/* end confdefs.h. */
11531
11532/* Override any GCC internal prototype to avoid an error.
11533 Use char because int might match the return type of a GCC
11534 builtin and then its argument prototype would still apply. */
11535#ifdef __cplusplus
11536extern "C"
11537#endif
11538char clock_getres ();
11539int
11540main ()
11541{
11542return clock_getres ();
11543 ;
11544 return 0;
11545}
11546_ACEOF
11547if ac_fn_c_try_link "$LINENO"; then :
11548 ac_cv_lib_rt_clock_getres=yes
11549else
11550 ac_cv_lib_rt_clock_getres=no
11551fi
11552rm -f core conftest.err conftest.$ac_objext \
11553 conftest$ac_exeext conftest.$ac_ext
11554LIBS=$ac_check_lib_save_LIBS
11555fi
11556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11557$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11558if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11559
11560 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11561
11562
11563fi
11564
11565
11566fi
11567done
11568
11569
Matthias Kloseb9621712010-04-24 17:59:49 +000011570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11571$as_echo_n "checking for major... " >&6; }
11572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011573/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011574
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011575#if defined(MAJOR_IN_MKDEV)
11576#include <sys/mkdev.h>
11577#elif defined(MAJOR_IN_SYSMACROS)
11578#include <sys/sysmacros.h>
11579#else
11580#include <sys/types.h>
11581#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011582
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011583int
11584main ()
11585{
11586
11587 makedev(major(0),minor(0));
11588
11589 ;
11590 return 0;
11591}
11592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011594
11595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011600
11601else
Skip Montanaro6dead952003-09-25 14:50:04 +000011602
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011605
11606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011607rm -f core conftest.err conftest.$ac_objext \
11608 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011609
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011610# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011611# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11613$as_echo_n "checking for getaddrinfo... " >&6; }
11614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011615/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011616
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011617#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011618#include <sys/socket.h>
11619#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011620#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011621
Martin v. Löwis11437992002-04-12 09:54:03 +000011622int
11623main ()
11624{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011625getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 ;
11627 return 0;
11628}
11629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011630if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011631 have_getaddrinfo=yes
11632else
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011635rm -f core conftest.err conftest.$ac_objext \
11636 conftest$ac_exeext conftest.$ac_ext
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11638$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011639if test $have_getaddrinfo = yes
11640then
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11642$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011643 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011645else
Matthias Kloseb9621712010-04-24 17:59:49 +000011646 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011647
11648if test "${enable_ipv6+set}" = set; then
11649 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11650else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011651 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011652fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011656
Stefan Krah19c21392012-11-22 23:47:32 +010011657#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011658#include <sys/types.h>
11659#include <netdb.h>
11660#include <string.h>
11661#include <sys/socket.h>
11662#include <netinet/in.h>
11663
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011664int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011665{
11666 int passive, gaierr, inet4 = 0, inet6 = 0;
11667 struct addrinfo hints, *ai, *aitop;
11668 char straddr[INET6_ADDRSTRLEN], strport[16];
11669
11670 for (passive = 0; passive <= 1; passive++) {
11671 memset(&hints, 0, sizeof(hints));
11672 hints.ai_family = AF_UNSPEC;
11673 hints.ai_flags = passive ? AI_PASSIVE : 0;
11674 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011675 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011676 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11677 (void)gai_strerror(gaierr);
11678 goto bad;
11679 }
11680 for (ai = aitop; ai; ai = ai->ai_next) {
11681 if (ai->ai_addr == NULL ||
11682 ai->ai_addrlen == 0 ||
11683 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11684 straddr, sizeof(straddr), strport, sizeof(strport),
11685 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11686 goto bad;
11687 }
11688 switch (ai->ai_family) {
11689 case AF_INET:
11690 if (strcmp(strport, "54321") != 0) {
11691 goto bad;
11692 }
11693 if (passive) {
11694 if (strcmp(straddr, "0.0.0.0") != 0) {
11695 goto bad;
11696 }
11697 } else {
11698 if (strcmp(straddr, "127.0.0.1") != 0) {
11699 goto bad;
11700 }
11701 }
11702 inet4++;
11703 break;
11704 case AF_INET6:
11705 if (strcmp(strport, "54321") != 0) {
11706 goto bad;
11707 }
11708 if (passive) {
11709 if (strcmp(straddr, "::") != 0) {
11710 goto bad;
11711 }
11712 } else {
11713 if (strcmp(straddr, "::1") != 0) {
11714 goto bad;
11715 }
11716 }
11717 inet6++;
11718 break;
11719 case AF_UNSPEC:
11720 goto bad;
11721 break;
11722 default:
11723 /* another family support? */
11724 break;
11725 }
11726 }
11727 }
11728
11729 if (!(inet4 == 0 || inet4 == 2))
11730 goto bad;
11731 if (!(inet6 == 0 || inet6 == 2))
11732 goto bad;
11733
11734 if (aitop)
11735 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011736 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011737
11738 bad:
11739 if (aitop)
11740 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011741 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011742}
11743
Martin v. Löwis11437992002-04-12 09:54:03 +000011744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011746 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011753
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011754fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11759$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11760
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011761if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011762then
11763 if test $ipv6 = yes
11764 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011765 echo 'Fatal: You must get working getaddrinfo() function.'
11766 echo ' or you can specify "--disable-ipv6"'.
11767 exit 1
11768 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011769else
Martin v. Löwis11437992002-04-12 09:54:03 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011772
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011773fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011774
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011775for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011776do :
11777 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011780#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011781_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011782
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011783fi
11784done
11785
Michael W. Hudson54241132001-12-07 15:38:26 +000011786
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011787# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11789$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011790if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792else
Matthias Kloseb9621712010-04-24 17:59:49 +000011793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011794/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011795#include <sys/types.h>
11796#include <sys/time.h>
11797#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011798
Martin v. Löwis11437992002-04-12 09:54:03 +000011799int
11800main ()
11801{
11802if ((struct tm *) 0)
11803return 0;
11804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011809 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11816$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011817if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011820
11821fi
11822
Matthias Kloseb9621712010-04-24 17:59:49 +000011823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11824$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011825if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011827else
Matthias Kloseb9621712010-04-24 17:59:49 +000011828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011829/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011830#include <sys/types.h>
11831#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011832
Martin v. Löwis11437992002-04-12 09:54:03 +000011833int
11834main ()
11835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836struct tm tm;
11837 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 ;
11840 return 0;
11841}
11842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011843if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844 ac_cv_struct_tm=time.h
11845else
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11851$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011852if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011853
Matthias Kloseb9621712010-04-24 17:59:49 +000011854$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855
11856fi
11857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858ac_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 +000011859#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861"
Victor Stinnere0be4232011-10-25 13:06:09 +020011862if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011863
11864cat >>confdefs.h <<_ACEOF
11865#define HAVE_STRUCT_TM_TM_ZONE 1
11866_ACEOF
11867
11868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011869fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011870
Martin v. Löwis11437992002-04-12 09:54:03 +000011871if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874
11875else
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11877"
Victor Stinnere0be4232011-10-25 13:06:09 +020011878if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880else
Matthias Kloseb9621712010-04-24 17:59:49 +000011881 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882fi
11883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011885#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886_ACEOF
11887
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11889$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011890if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892else
Matthias Kloseb9621712010-04-24 17:59:49 +000011893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011894/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011896#if !HAVE_DECL_TZNAME
11897extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011899
Martin v. Löwis11437992002-04-12 09:54:03 +000011900int
11901main ()
11902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011903return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 ;
11905 return 0;
11906}
11907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011909 ac_cv_var_tzname=yes
11910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011913rm -f core conftest.err conftest.$ac_objext \
11914 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11917$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011918 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011919
Matthias Kloseb9621712010-04-24 17:59:49 +000011920$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011922 fi
11923fi
11924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925ac_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 +020011926if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011927
11928cat >>confdefs.h <<_ACEOF
11929#define HAVE_STRUCT_STAT_ST_RDEV 1
11930_ACEOF
11931
11932
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011933fi
11934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935ac_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 +020011936if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011937
Martin v. Löwis11437992002-04-12 09:54:03 +000011938cat >>confdefs.h <<_ACEOF
11939#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11940_ACEOF
11941
11942
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011943fi
11944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945ac_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 +020011946if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_STRUCT_STAT_ST_FLAGS 1
11950_ACEOF
11951
11952
11953fi
11954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955ac_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 +020011956if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011957
11958cat >>confdefs.h <<_ACEOF
11959#define HAVE_STRUCT_STAT_ST_GEN 1
11960_ACEOF
11961
11962
11963fi
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965ac_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 +020011966if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011967
11968cat >>confdefs.h <<_ACEOF
11969#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11970_ACEOF
11971
11972
11973fi
11974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975ac_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 +020011976if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011977
Martin v. Löwis11437992002-04-12 09:54:03 +000011978cat >>confdefs.h <<_ACEOF
11979#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11980_ACEOF
11981
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011984
11985else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011987 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11989 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011990esac
11991
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011992fi
11993
Michael W. Hudson54241132001-12-07 15:38:26 +000011994
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11997$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011998if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000else
Matthias Kloseb159a552010-04-25 21:00:44 +000012001
Matthias Kloseb9621712010-04-24 17:59:49 +000012002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012003/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012004#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012005int
12006main ()
12007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012009 ;
12010 return 0;
12011}
12012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012013if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012014 ac_cv_header_time_altzone=yes
12015else
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020fi
12021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12023$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012027
12028fi
12029
Guido van Rossumda88dad1995-01-26 00:46:29 +000012030was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12032$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012034/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012035
12036#include <sys/types.h>
12037#include <sys/select.h>
12038#include <sys/time.h>
12039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040int
12041main ()
12042{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043;
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ;
12045 return 0;
12046}
12047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012048if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012052
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012053 was_it_defined=yes
12054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12058$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012059
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12061$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012062if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012067#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012071struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012076if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012077 ac_cv_struct_addrinfo=yes
12078else
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12082fi
12083
Matthias Kloseb9621712010-04-24 17:59:49 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12085$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012086if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012089
12090fi
12091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12093$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012099
12100# include <sys/types.h>
12101# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012102int
12103main ()
12104{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012105struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012111 ac_cv_struct_sockaddr_storage=yes
12112else
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12116fi
12117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12119$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012120if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012123
12124fi
12125
Guido van Rossum627b2d71993-12-24 10:39:16 +000012126# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12129$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012130if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012135$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012136int
12137main ()
12138{
12139static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012140test_array [0] = 0;
12141return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
12143 ;
12144 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012145}
Martin v. Löwis11437992002-04-12 09:54:03 +000012146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012147if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012148 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012149else
Matthias Kloseb9621712010-04-24 17:59:49 +000012150 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12155$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158
12159fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012160
Matthias Kloseb9621712010-04-24 17:59:49 +000012161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12162$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012163if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012165else
Matthias Kloseb9621712010-04-24 17:59:49 +000012166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012167/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012168
Martin v. Löwis11437992002-04-12 09:54:03 +000012169int
12170main ()
12171{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012172
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012174 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012176 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012178 char const *const *pcpcc;
12179 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 /* NEC SVR4.0.2 mips cc rejects this. */
12181 struct point {int x, y;};
12182 static struct point const zero = {0,0};
12183 /* AIX XL C 1.02.0.0 rejects this.
12184 It does not let you subtract one const X* pointer from another in
12185 an arm of an if-expression whose if-part is not a constant
12186 expression */
12187 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190 ++pcpcc;
12191 ppc = (char**) pcpcc;
12192 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012193 { /* SCO 3.2v4 cc rejects this sort of thing. */
12194 char tx;
12195 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012197
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012199 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 }
12201 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12202 int x[] = {25, 17};
12203 const int *foo = &x[0];
12204 ++foo;
12205 }
12206 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12207 typedef const int *iptr;
12208 iptr p = 0;
12209 ++p;
12210 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012211 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012213 struct s { int j; const int *ap[3]; } bx;
12214 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 }
12216 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12217 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012220 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012221#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012222
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 ;
12224 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012225}
Martin v. Löwis11437992002-04-12 09:54:03 +000012226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228 ac_cv_c_const=yes
12229else
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12235$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012236if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012237
Matthias Kloseb9621712010-04-24 17:59:49 +000012238$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239
12240fi
12241
Michael W. Hudson54241132001-12-07 15:38:26 +000012242
Guido van Rossumda88dad1995-01-26 00:46:29 +000012243works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12245$as_echo_n "checking for working volatile... " >&6; }
12246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012247/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012248
Martin v. Löwis11437992002-04-12 09:54:03 +000012249int
12250main ()
12251{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012252volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012253 ;
12254 return 0;
12255}
12256_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012257if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012258 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259else
Skip Montanaro6dead952003-09-25 14:50:04 +000012260
Matthias Kloseb9621712010-04-24 17:59:49 +000012261$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012263
Guido van Rossum627b2d71993-12-24 10:39:16 +000012264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12267$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012268
Guido van Rossumda88dad1995-01-26 00:46:29 +000012269works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12271$as_echo_n "checking for working signed char... " >&6; }
12272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012273/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012274
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012284 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012285else
Skip Montanaro6dead952003-09-25 14:50:04 +000012286
Matthias Kloseb9621712010-04-24 17:59:49 +000012287$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012289
Guido van Rossum7f43da71994-08-01 12:15:30 +000012290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12293$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012294
Guido van Rossumda88dad1995-01-26 00:46:29 +000012295have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12297$as_echo_n "checking for prototypes... " >&6; }
12298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012299/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012300int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012301int
12302main ()
12303{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012304return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012312
Matthias Kloseb159a552010-04-25 21:00:44 +000012313 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12317$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012318
Guido van Rossumda88dad1995-01-26 00:46:29 +000012319works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12321$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012323/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012324
12325#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012326int foo(int x, ...) {
12327 va_list va;
12328 va_start(va, x);
12329 va_arg(va, int);
12330 va_arg(va, char *);
12331 va_arg(va, double);
12332 return 0;
12333}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Guido van Rossum90eea071996-08-30 20:58:57 +000012338return foo(10, "", 3.14);
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 :
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
12345
Matthias Kloseb9621712010-04-24 17:59:49 +000012346$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012347
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012348 works=yes
12349
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12353$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354
Martin v. Löwisd6320502004-08-12 13:45:08 +000012355# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12357$as_echo_n "checking for socketpair... " >&6; }
12358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012359/* end confdefs.h. */
12360
12361#include <sys/types.h>
12362#include <sys/socket.h>
12363
12364int
12365main ()
12366{
12367void *x=socketpair
12368 ;
12369 return 0;
12370}
12371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012373
Matthias Kloseb9621712010-04-24 17:59:49 +000012374$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375
Matthias Kloseb159a552010-04-25 21:00:44 +000012376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012377$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012378else
Matthias Kloseb9621712010-04-24 17:59:49 +000012379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12380$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012381
12382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012384
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12387$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012389/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390#include <sys/types.h>
12391#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012392int
12393main ()
12394{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012395struct sockaddr x;
12396x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ;
12398 return 0;
12399}
12400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012401if ac_fn_c_try_compile "$LINENO"; then :
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12403$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012406
12407else
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12409$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012410
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012413
Guido van Rossumda88dad1995-01-26 00:46:29 +000012414va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12416$as_echo_n "checking whether va_list is an array... " >&6; }
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419
12420#ifdef HAVE_STDARG_PROTOTYPES
12421#include <stdarg.h>
12422#else
12423#include <varargs.h>
12424#endif
12425
Martin v. Löwis11437992002-04-12 09:54:03 +000012426int
12427main ()
12428{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012429va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 ;
12431 return 0;
12432}
12433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012434if ac_fn_c_try_compile "$LINENO"; then :
12435
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436else
Skip Montanaro6dead952003-09-25 14:50:04 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Matthias Kloseb9621712010-04-24 17:59:49 +000012439$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012440
Guido van Rossumda88dad1995-01-26 00:46:29 +000012441 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12446$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012447
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012448# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
12450
Matthias Kloseb9621712010-04-24 17:59:49 +000012451ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012455
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12457$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012458 OLD_CFLAGS=$CFLAGS
12459 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012462
12463# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
Martin v. Löwis11437992002-04-12 09:54:03 +000012465int
12466main ()
12467{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012468
12469 char *name;
12470 struct hostent *he, *res;
12471 char buffer[2048];
12472 int buflen = 2048;
12473 int h_errnop;
12474
12475 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
12477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12489$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012491else
Skip Montanaro6dead952003-09-25 14:50:04 +000012492
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494$as_echo "no" >&6; }
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12496$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012498/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012499
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012500# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
Martin v. Löwis11437992002-04-12 09:54:03 +000012502int
12503main ()
12504{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012505
12506 char *name;
12507 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012508 char buffer[2048];
12509 int buflen = 2048;
12510 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012511
Matthias Kloseb159a552010-04-25 21:00:44 +000012512 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
12514 ;
12515 return 0;
12516}
12517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012518if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Matthias Kloseb159a552010-04-25 21:00:44 +000012523$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12526$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012528else
Skip Montanaro6dead952003-09-25 14:50:04 +000012529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12531$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12533$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12535/* end confdefs.h. */
12536
12537# include <netdb.h>
12538
12539int
12540main ()
12541{
12542
12543 char *name;
12544 struct hostent *he;
12545 struct hostent_data data;
12546
12547 (void) gethostbyname_r(name, he, &data);
12548
12549 ;
12550 return 0;
12551}
12552_ACEOF
12553if ac_fn_c_try_compile "$LINENO"; then :
12554
12555 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12556
12557
12558$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12559
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12561$as_echo "yes" >&6; }
12562
12563else
12564
12565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12566$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012570
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012573
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012576 CFLAGS=$OLD_CFLAGS
12577
12578else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 for ac_func in gethostbyname
12581do :
12582 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012583if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012584 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012585#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012586_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012589done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012590
Michael W. Hudson54241132001-12-07 15:38:26 +000012591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012592fi
12593
Michael W. Hudson54241132001-12-07 15:38:26 +000012594
12595
12596
12597
12598
12599
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600# checks for system services
12601# (none yet)
12602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012603# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012604ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012605if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012606
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012607else
Matthias Kloseb9621712010-04-24 17:59:49 +000012608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12609$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012610if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012612else
Martin v. Löwis11437992002-04-12 09:54:03 +000012613 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012614LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012618/* Override any GCC internal prototype to avoid an error.
12619 Use char because int might match the return type of a GCC
12620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012621#ifdef __cplusplus
12622extern "C"
12623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012624char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012625int
12626main ()
12627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ;
12630 return 0;
12631}
12632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012635else
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012638rm -f core conftest.err conftest.$ac_objext \
12639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012640LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12643$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012644if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 cat >>confdefs.h <<_ACEOF
12646#define HAVE_LIBIEEE 1
12647_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012649 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012650
Guido van Rossum627b2d71993-12-24 10:39:16 +000012651fi
12652
Michael W. Hudson54241132001-12-07 15:38:26 +000012653
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012654fi
12655
Michael W. Hudson54241132001-12-07 15:38:26 +000012656
Guido van Rossum7f253911997-05-09 02:42:48 +000012657# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12659$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012662if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012664if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012665then
12666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12670$as_echo "yes" >&6; }
12671else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012673fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012674else
Matthias Kloseb9621712010-04-24 17:59:49 +000012675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12676$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012677fi
12678
Guido van Rossum7f253911997-05-09 02:42:48 +000012679
Guido van Rossum7f43da71994-08-01 12:15:30 +000012680# check for --with-libm=...
12681
Guido van Rossum563e7081996-09-10 18:20:48 +000012682case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012683Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012684*) LIBM=-lm
12685esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12687$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012690if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012691 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012692if test "$withval" = no
12693then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12695$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012696elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12699$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012700else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012701fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12704$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705fi
12706
Guido van Rossum7f43da71994-08-01 12:15:30 +000012707
12708# check for --with-libc=...
12709
Matthias Kloseb9621712010-04-24 17:59:49 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12711$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012716if test "$withval" = no
12717then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12719$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012720elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012721then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12723$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012724else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012725fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12728$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729fi
12730
Guido van Rossum7f43da71994-08-01 12:15:30 +000012731
Stefan Krah1919b7e2012-03-21 18:25:23 +010012732# **************************************
12733# * Check for gcc x64 inline assembler *
12734# **************************************
12735
12736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12737$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12739/* end confdefs.h. */
12740
12741int
12742main ()
12743{
12744
12745 __asm__ __volatile__ ("movq %rcx, %rax");
12746
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751if ac_fn_c_try_compile "$LINENO"; then :
12752 have_gcc_asm_for_x64=yes
12753else
12754 have_gcc_asm_for_x64=no
12755fi
12756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12758$as_echo "$have_gcc_asm_for_x64" >&6; }
12759if test "$have_gcc_asm_for_x64" = yes
12760then
12761
12762$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12763
12764fi
12765
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012766# **************************************************
12767# * Check for various properties of floating point *
12768# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12771$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012772if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012774else
12775
Matthias Kloseb9621712010-04-24 17:59:49 +000012776if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012777 ac_cv_little_endian_double=no
12778else
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012780/* end confdefs.h. */
12781
12782#include <string.h>
12783int main() {
12784 double x = 9006104071832581.0;
12785 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12786 return 0;
12787 else
12788 return 1;
12789}
12790
12791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012792if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012793 ac_cv_little_endian_double=yes
12794else
Matthias Kloseb9621712010-04-24 17:59:49 +000012795 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012799fi
12800
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012801fi
12802
Matthias Kloseb9621712010-04-24 17:59:49 +000012803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12804$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012805if test "$ac_cv_little_endian_double" = yes
12806then
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012809
12810fi
12811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12813$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012814if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012816else
12817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012819 ac_cv_big_endian_double=no
12820else
Matthias Kloseb9621712010-04-24 17:59:49 +000012821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012822/* end confdefs.h. */
12823
12824#include <string.h>
12825int main() {
12826 double x = 9006104071832581.0;
12827 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12828 return 0;
12829 else
12830 return 1;
12831}
12832
12833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012834if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012835 ac_cv_big_endian_double=yes
12836else
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841fi
12842
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012843fi
12844
Matthias Kloseb9621712010-04-24 17:59:49 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12846$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847if test "$ac_cv_big_endian_double" = yes
12848then
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012851
12852fi
12853
12854# Some ARM platforms use a mixed-endian representation for doubles.
12855# While Python doesn't currently have full support for these platforms
12856# (see e.g., issue 1762561), we can at least make sure that float <-> string
12857# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12859$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012860if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012861 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012862else
12863
Matthias Kloseb9621712010-04-24 17:59:49 +000012864if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012865 ac_cv_mixed_endian_double=no
12866else
Matthias Kloseb9621712010-04-24 17:59:49 +000012867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012868/* end confdefs.h. */
12869
12870#include <string.h>
12871int main() {
12872 double x = 9006104071832581.0;
12873 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12874 return 0;
12875 else
12876 return 1;
12877}
12878
12879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012880if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012881 ac_cv_mixed_endian_double=yes
12882else
Matthias Kloseb9621712010-04-24 17:59:49 +000012883 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887fi
12888
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012889fi
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12892$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012893if test "$ac_cv_mixed_endian_double" = yes
12894then
12895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897
12898fi
12899
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012900# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012901# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012902# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012903# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012904# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012905# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012906
12907# This inline assembler syntax may also work for suncc and icc,
12908# so we try it on all platforms.
12909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12911$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012913/* end confdefs.h. */
12914
12915int
12916main ()
12917{
12918
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012919 unsigned short cw;
12920 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12921 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012922
12923 ;
12924 return 0;
12925}
12926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012927if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928 have_gcc_asm_for_x87=yes
12929else
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012931fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12934$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012935if test "$have_gcc_asm_for_x87" = yes
12936then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937
Matthias Kloseb9621712010-04-24 17:59:49 +000012938$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012939
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012940fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012942# Detect whether system arithmetic is subject to x87-style double
12943# rounding issues. The result of this test has little meaning on non
12944# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12945# mode is round-to-nearest and double rounding issues are present, and
12946# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12948$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012949# $BASECFLAGS may affect the result
12950ac_save_cc="$CC"
12951CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012952if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012953 ac_cv_x87_double_rounding=no
12954else
Matthias Kloseb9621712010-04-24 17:59:49 +000012955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012956/* end confdefs.h. */
12957
12958#include <stdlib.h>
12959#include <math.h>
12960int main() {
12961 volatile double x, y, z;
12962 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12963 x = 0.99999999999999989; /* 1-2**-53 */
12964 y = 1./x;
12965 if (y != 1.)
12966 exit(0);
12967 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12968 x = 1e16;
12969 y = 2.99999;
12970 z = x + y;
12971 if (z != 1e16+4.)
12972 exit(0);
12973 /* both tests show evidence of double rounding */
12974 exit(1);
12975}
12976
12977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012978if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012979 ac_cv_x87_double_rounding=no
12980else
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012982fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012985fi
12986
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012987CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12989$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012990if test "$ac_cv_x87_double_rounding" = yes
12991then
12992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012994
12995fi
12996
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012997# ************************************
12998# * Check for mathematical functions *
12999# ************************************
13000
13001LIBS_SAVE=$LIBS
13002LIBS="$LIBS $LIBM"
13003
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013004for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13005do :
13006 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13007ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013008if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013009 cat >>confdefs.h <<_ACEOF
13010#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13011_ACEOF
13012
13013fi
13014done
13015
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013016for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013017do :
13018 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13019ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013020if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013021 cat >>confdefs.h <<_ACEOF
13022#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13023_ACEOF
13024
13025fi
13026done
13027
13028ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13029"
Victor Stinnere0be4232011-10-25 13:06:09 +020013030if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013031 ac_have_decl=1
13032else
13033 ac_have_decl=0
13034fi
13035
13036cat >>confdefs.h <<_ACEOF
13037#define HAVE_DECL_ISINF $ac_have_decl
13038_ACEOF
13039ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13040"
Victor Stinnere0be4232011-10-25 13:06:09 +020013041if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013042 ac_have_decl=1
13043else
13044 ac_have_decl=0
13045fi
13046
13047cat >>confdefs.h <<_ACEOF
13048#define HAVE_DECL_ISNAN $ac_have_decl
13049_ACEOF
13050ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13051"
Victor Stinnere0be4232011-10-25 13:06:09 +020013052if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013053 ac_have_decl=1
13054else
13055 ac_have_decl=0
13056fi
13057
13058cat >>confdefs.h <<_ACEOF
13059#define HAVE_DECL_ISFINITE $ac_have_decl
13060_ACEOF
13061
13062
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013063# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13064# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13066$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013067if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013069else
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013072 ac_cv_tanh_preserves_zero_sign=no
13073else
Matthias Kloseb9621712010-04-24 17:59:49 +000013074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013075/* end confdefs.h. */
13076
13077#include <math.h>
13078#include <stdlib.h>
13079int main() {
13080 /* return 0 if either negative zeros don't exist
13081 on this platform or if negative zeros exist
13082 and tanh(-0.) == -0. */
13083 if (atan2(0., -1.) == atan2(-0., -1.) ||
13084 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13085 else exit(1);
13086}
13087
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013090 ac_cv_tanh_preserves_zero_sign=yes
13091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13095 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013096fi
13097
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013098fi
13099
Matthias Kloseb9621712010-04-24 17:59:49 +000013100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13101$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013102if test "$ac_cv_tanh_preserves_zero_sign" = yes
13103then
13104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013106
13107fi
13108
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013109if test "$ac_cv_func_log1p" = yes
13110then
13111 # On some versions of AIX, log1p(-0.) returns 0. instead of
13112 # -0. See issue #9920.
13113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13114$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013115 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013116 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013117else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013118
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013119 if test "$cross_compiling" = yes; then :
13120 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013121else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13123/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013124
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013125 #include <math.h>
13126 #include <stdlib.h>
13127 int main() {
13128 /* Fail if the signs of log1p(-0.) and -0. can be
13129 distinguished. */
13130 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13131 return 0;
13132 else
13133 return 1;
13134 }
13135
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013136_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013137if ac_fn_c_try_run "$LINENO"; then :
13138 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013139else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013140 ac_cv_log1p_drops_zero_sign=yes
13141fi
13142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13143 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013144fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013145
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013146fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013147
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13149$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13150fi
13151if test "$ac_cv_log1p_drops_zero_sign" = yes
13152then
13153
13154$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13155
13156fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013157
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013158LIBS=$LIBS_SAVE
13159
Mark Dickinsona614f042009-11-28 12:48:43 +000013160# For multiprocessing module, check that sem_open
13161# actually works. For FreeBSD versions <= 7.2,
13162# the kernel module that provides POSIX semaphores
13163# isn't loaded by default, so an attempt to call
13164# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13166$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013167if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013169else
Matthias Kloseb9621712010-04-24 17:59:49 +000013170 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013171 ac_cv_posix_semaphores_enabled=yes
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013174/* end confdefs.h. */
13175
13176#include <unistd.h>
13177#include <fcntl.h>
13178#include <stdio.h>
13179#include <semaphore.h>
13180#include <sys/stat.h>
13181
13182int main(void) {
13183 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13184 if (a == SEM_FAILED) {
13185 perror("sem_open");
13186 return 1;
13187 }
13188 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013189 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013190 return 0;
13191}
13192
13193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013194if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013195 ac_cv_posix_semaphores_enabled=yes
13196else
Matthias Kloseb9621712010-04-24 17:59:49 +000013197 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013201fi
13202
13203
Mark Dickinsona614f042009-11-28 12:48:43 +000013204fi
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13207$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013208if test $ac_cv_posix_semaphores_enabled = no
13209then
13210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013212
13213fi
13214
Mark Dickinson10683072009-04-18 21:18:19 +000013215# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13217$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013218if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220else
Matthias Kloseb9621712010-04-24 17:59:49 +000013221 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013223else
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013225/* end confdefs.h. */
13226
13227#include <unistd.h>
13228#include <fcntl.h>
13229#include <stdio.h>
13230#include <semaphore.h>
13231#include <sys/stat.h>
13232
13233int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013234 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013235 int count;
13236 int res;
13237 if(a==SEM_FAILED){
13238 perror("sem_open");
13239 return 1;
13240
13241 }
13242 res = sem_getvalue(a, &count);
13243 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013244 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013245 return res==-1 ? 1 : 0;
13246}
13247
Mark Dickinson10683072009-04-18 21:18:19 +000013248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013250 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013254rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13255 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013256fi
13257
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013258
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259fi
13260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13262$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013263if test $ac_cv_broken_sem_getvalue = yes
13264then
13265
Matthias Kloseb9621712010-04-24 17:59:49 +000013266$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013267
13268fi
13269
Mark Dickinsonbd792642009-03-18 20:06:12 +000013270# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13272$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013273# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013275 enableval=$enable_big_digits; case $enable_big_digits in
13276yes)
13277 enable_big_digits=30 ;;
13278no)
13279 enable_big_digits=15 ;;
1328015|30)
13281 ;;
13282*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013283 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 +000013284esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13286$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013287
13288cat >>confdefs.h <<_ACEOF
13289#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13290_ACEOF
13291
13292
13293else
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13295$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013296fi
13297
13298
Guido van Rossumef2255b2000-03-10 22:30:29 +000013299# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013300ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013301if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013306 wchar_h="yes"
13307
Guido van Rossumef2255b2000-03-10 22:30:29 +000013308else
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013310
13311fi
13312
Michael W. Hudson54241132001-12-07 15:38:26 +000013313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013315# determine wchar_t size
13316if test "$wchar_h" = yes
13317then
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13320# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13321# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13323$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013324if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13328"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Martin v. Löwis11437992002-04-12 09:54:03 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 if test "$ac_cv_type_wchar_t" = yes; then
13332 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013334as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013335See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336 else
13337 ac_cv_sizeof_wchar_t=0
13338 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13343$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344
13345
13346
Martin v. Löwis11437992002-04-12 09:54:03 +000013347cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013348#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013349_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013350
Michael W. Hudson54241132001-12-07 15:38:26 +000013351
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013352fi
13353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13355$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013356have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013358/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013359
13360#include <tcl.h>
13361#if TCL_UTF_MAX != 6
13362# error "NOT UCS4_TCL"
13363#endif
13364int
13365main ()
13366{
13367
13368 ;
13369 return 0;
13370}
13371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013372if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013373
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013376
13377 have_ucs4_tcl=yes
13378
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13382$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013383
Skip Montanaro6dead952003-09-25 14:50:04 +000013384# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013385if test "$wchar_h" = yes
13386then
13387 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13389$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013390 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013391 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013392else
13393
Matthias Kloseb9621712010-04-24 17:59:49 +000013394 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013395 ac_cv_wchar_t_signed=yes
13396else
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013398/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013399
13400 #include <wchar.h>
13401 int main()
13402 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013403 /* Success: exit code 0 */
13404 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013405 }
13406
13407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013408if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013409 ac_cv_wchar_t_signed=yes
13410else
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013415fi
13416
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013417fi
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13420$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013421fi
13422
Georg Brandl52d168a2008-01-07 18:10:24 +000013423# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013424if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013425 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013426then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013427 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013430
Georg Brandl52d168a2008-01-07 18:10:24 +000013431else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013432 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013433fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13435$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013436
13437# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13439$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013440if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 ac_cv_c_bigendian=unknown
13444 # See if we're dealing with a universal compiler.
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446/* end confdefs.h. */
13447#ifndef __APPLE_CC__
13448 not a universal capable compiler
13449 #endif
13450 typedef int dummy;
13451
Skip Montanaro6dead952003-09-25 14:50:04 +000013452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
13454
13455 # Check for potential -arch flags. It is not universal unless
13456 # there are at least two -arch flags with different values.
13457 ac_arch=
13458 ac_prev=
13459 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13460 if test -n "$ac_prev"; then
13461 case $ac_word in
13462 i?86 | x86_64 | ppc | ppc64)
13463 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13464 ac_arch=$ac_word
13465 else
13466 ac_cv_c_bigendian=universal
13467 break
13468 fi
13469 ;;
13470 esac
13471 ac_prev=
13472 elif test "x$ac_word" = "x-arch"; then
13473 ac_prev=arch
13474 fi
13475 done
13476fi
13477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478 if test $ac_cv_c_bigendian = unknown; then
13479 # See if sys/param.h defines the BYTE_ORDER macro.
13480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013481/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013482#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485int
13486main ()
13487{
Matthias Kloseb9621712010-04-24 17:59:49 +000013488#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13489 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13490 && LITTLE_ENDIAN)
13491 bogus endian macros
13492 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013493
13494 ;
13495 return 0;
13496}
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013499 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013502#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505int
13506main ()
13507{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013508#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013509 not big endian
13510 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
13512 ;
13513 return 0;
13514}
13515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013516if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013517 ac_cv_c_bigendian=yes
13518else
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013522fi
13523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13524 fi
13525 if test $ac_cv_c_bigendian = unknown; then
13526 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013528/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013529#include <limits.h>
13530
Martin v. Löwis11437992002-04-12 09:54:03 +000013531int
13532main ()
13533{
Matthias Kloseb9621712010-04-24 17:59:49 +000013534#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13535 bogus endian macros
13536 #endif
13537
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ;
13539 return 0;
13540}
13541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013542if ac_fn_c_try_compile "$LINENO"; then :
13543 # It does; now see whether it defined to _BIG_ENDIAN or not.
13544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13545/* end confdefs.h. */
13546#include <limits.h>
13547
13548int
13549main ()
13550{
13551#ifndef _BIG_ENDIAN
13552 not big endian
13553 #endif
13554
13555 ;
13556 return 0;
13557}
13558_ACEOF
13559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013563fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13565fi
13566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567 fi
13568 if test $ac_cv_c_bigendian = unknown; then
13569 # Compile a test program.
13570 if test "$cross_compiling" = yes; then :
13571 # Try to guess by grepping values from an object file.
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573/* end confdefs.h. */
13574short int ascii_mm[] =
13575 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13576 short int ascii_ii[] =
13577 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13578 int use_ascii (int i) {
13579 return ascii_mm[i] + ascii_ii[i];
13580 }
13581 short int ebcdic_ii[] =
13582 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13583 short int ebcdic_mm[] =
13584 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13585 int use_ebcdic (int i) {
13586 return ebcdic_mm[i] + ebcdic_ii[i];
13587 }
13588 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013589
Matthias Kloseb9621712010-04-24 17:59:49 +000013590int
13591main ()
13592{
13593return use_ascii (foo) == use_ebcdic (foo);
13594 ;
13595 return 0;
13596}
13597_ACEOF
13598if ac_fn_c_try_compile "$LINENO"; then :
13599 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13600 ac_cv_c_bigendian=yes
13601 fi
13602 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13603 if test "$ac_cv_c_bigendian" = unknown; then
13604 ac_cv_c_bigendian=no
13605 else
13606 # finding both strings is unlikely to happen, but who knows?
13607 ac_cv_c_bigendian=unknown
13608 fi
13609 fi
13610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013612else
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013614/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013616int
13617main ()
13618{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 /* Are we little or big endian? From Harbison&Steele. */
13621 union
13622 {
13623 long int l;
13624 char c[sizeof (long int)];
13625 } u;
13626 u.l = 1;
13627 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628
13629 ;
13630 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013631}
Martin v. Löwis11437992002-04-12 09:54:03 +000013632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013633if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013634 ac_cv_c_bigendian=no
13635else
Matthias Kloseb9621712010-04-24 17:59:49 +000013636 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013638rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13639 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13645$as_echo "$ac_cv_c_bigendian" >&6; }
13646 case $ac_cv_c_bigendian in #(
13647 yes)
13648 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13649;; #(
13650 no)
13651 ;; #(
13652 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ;; #(
13657 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013658 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013659 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013661
Michael W. Hudson54241132001-12-07 15:38:26 +000013662
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013663# ABI version string for Python extension modules. This appears between the
13664# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13665# from the following attributes which affect the ABI of this Python build (in
13666# this order):
13667#
13668# * The Python implementation (always 'cpython-' for us)
13669# * The major and minor version numbers
13670# * --with-pydebug (adds a 'd')
13671# * --with-pymalloc (adds a 'm')
13672# * --with-wide-unicode (adds a 'u')
13673#
13674# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013675# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13676# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013677
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13679$as_echo_n "checking ABIFLAGS... " >&6; }
13680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13681$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13683$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013684SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13686$as_echo "$SOABI" >&6; }
13687
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13689$as_echo_n "checking LDVERSION... " >&6; }
13690LDVERSION='$(VERSION)$(ABIFLAGS)'
13691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13692$as_echo "$LDVERSION" >&6; }
13693
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013694# SO is the extension of shared libraries `(including the dot!)
13695# -- usually .so, .sl on HP-UX, .dll on Cygwin
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13697$as_echo_n "checking SO... " >&6; }
13698if test -z "$SO"
13699then
13700 case $ac_sys_system in
13701 hp*|HP*)
13702 case `uname -m` in
13703 ia64) SO=.so;;
13704 *) SO=.sl;;
13705 esac
13706 ;;
13707 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013708 Linux*|GNU*)
13709 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013710 *) SO=.so;;
13711 esac
13712else
13713 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013714 echo
13715 echo '====================================================================='
13716 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013717 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013718 echo '+ Do you really mean to change the extension for shared libraries? +'
13719 echo '+ Continuing in 10 seconds to let you to ponder. +'
13720 echo '+ +'
13721 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013722 sleep 10
13723fi
13724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13725$as_echo "$SO" >&6; }
13726
Stefan Krah8c8adf62013-01-17 20:41:56 +010013727
13728cat >>confdefs.h <<_ACEOF
13729#define SHLIB_EXT "$SO"
13730_ACEOF
13731
13732
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013733# Check whether right shifting a negative integer extends the sign bit
13734# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13736$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740
Matthias Kloseb9621712010-04-24 17:59:49 +000013741if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013742 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013743else
Matthias Kloseb9621712010-04-24 17:59:49 +000013744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013745/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013746
13747int main()
13748{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013749 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013750}
13751
Martin v. Löwis11437992002-04-12 09:54:03 +000013752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013753if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013754 ac_cv_rshift_extends_sign=yes
13755else
Matthias Kloseb9621712010-04-24 17:59:49 +000013756 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013760fi
13761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762fi
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13765$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013766if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013767then
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013770
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013771fi
13772
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013773# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13775$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013776if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013777 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013778else
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Matthias Kloseb9621712010-04-24 17:59:49 +000013780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013782#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013783int
13784main ()
13785{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013786
13787 FILE *f = fopen("/dev/null", "r");
13788 flockfile(f);
13789 getc_unlocked(f);
13790 funlockfile(f);
13791
Martin v. Löwis11437992002-04-12 09:54:03 +000013792 ;
13793 return 0;
13794}
13795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013796if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013797 ac_cv_have_getc_unlocked=yes
13798else
Matthias Kloseb9621712010-04-24 17:59:49 +000013799 ac_cv_have_getc_unlocked=no
13800fi
13801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13806$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013807if test "$ac_cv_have_getc_unlocked" = yes
13808then
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013811
13812fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013813
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013814# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013815# save the value of LIBS so we don't actually link Python with readline
13816LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013817
Gregory P. Smith18820942008-09-07 06:24:49 +000013818# On some systems we need to link readline to a termcap compatible
13819# library. NOTE: Keep the precedence of listed libraries synchronised
13820# with setup.py.
13821py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13823$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013824for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013825 if test -z "$py_libtermcap"; then
13826 READLINE_LIBS="-lreadline"
13827 else
13828 READLINE_LIBS="-lreadline -l$py_libtermcap"
13829 fi
13830 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013832/* end confdefs.h. */
13833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013834/* Override any GCC internal prototype to avoid an error.
13835 Use char because int might match the return type of a GCC
13836 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013837#ifdef __cplusplus
13838extern "C"
13839#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013840char readline ();
13841int
13842main ()
13843{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013844return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013845 ;
13846 return 0;
13847}
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013850 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013852rm -f core conftest.err conftest.$ac_objext \
13853 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013854 if test $py_cv_lib_readline = yes; then
13855 break
13856 fi
13857done
13858# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13859#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013860if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13862$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013863else
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13865$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013866
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013868
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013869fi
13870
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013871# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13873$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013874if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013875 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013876else
13877 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013878LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013880/* end confdefs.h. */
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882/* Override any GCC internal prototype to avoid an error.
13883 Use char because int might match the return type of a GCC
13884 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013885#ifdef __cplusplus
13886extern "C"
13887#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013888char rl_callback_handler_install ();
13889int
13890main ()
13891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013898 ac_cv_lib_readline_rl_callback_handler_install=yes
13899else
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013902rm -f core conftest.err conftest.$ac_objext \
13903 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013904LIBS=$ac_check_lib_save_LIBS
13905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13907$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013911
13912fi
13913
13914
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013915# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013918#include <readline/readline.h>
13919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013920if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921 have_readline=yes
13922else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013924
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013926rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927if test $have_readline = yes
13928then
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013930/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013931#include <readline/readline.h>
13932
13933_ACEOF
13934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013938
13939fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013940rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013943/* end confdefs.h. */
13944#include <readline/readline.h>
13945
13946_ACEOF
13947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013951
13952fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013953rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013954
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013955fi
13956
Martin v. Löwis0daad592001-09-30 21:09:59 +000013957# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13959$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013960if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013962else
Martin v. Löwis11437992002-04-12 09:54:03 +000013963 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013964LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013968/* Override any GCC internal prototype to avoid an error.
13969 Use char because int might match the return type of a GCC
13970 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013971#ifdef __cplusplus
13972extern "C"
13973#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013974char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013975int
13976main ()
13977{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ;
13980 return 0;
13981}
13982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013983if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013985else
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013987fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013988rm -f core conftest.err conftest.$ac_objext \
13989 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013990LIBS=$ac_check_lib_save_LIBS
13991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13993$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013994if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013997
Martin v. Löwis0daad592001-09-30 21:09:59 +000013998fi
13999
Michael W. Hudson54241132001-12-07 15:38:26 +000014000
Thomas Wouters89d996e2007-09-08 17:39:28 +000014001# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14003$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014006else
14007 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014008LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014010/* end confdefs.h. */
14011
14012/* Override any GCC internal prototype to avoid an error.
14013 Use char because int might match the return type of a GCC
14014 builtin and then its argument prototype would still apply. */
14015#ifdef __cplusplus
14016extern "C"
14017#endif
14018char rl_completion_display_matches_hook ();
14019int
14020main ()
14021{
14022return rl_completion_display_matches_hook ();
14023 ;
14024 return 0;
14025}
14026_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014027if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014028 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14029else
Matthias Kloseb9621712010-04-24 17:59:49 +000014030 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014031fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014032rm -f core conftest.err conftest.$ac_objext \
14033 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014034LIBS=$ac_check_lib_save_LIBS
14035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14037$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014038if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014041
14042fi
14043
14044
Martin v. Löwis0daad592001-09-30 21:09:59 +000014045# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14047$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014050else
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014052LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
14079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14081$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014085
Guido van Rossum353ae582001-07-10 16:45:32 +000014086fi
14087
Jack Jansendd19cf82001-12-06 22:36:17 +000014088
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091/* end confdefs.h. */
14092#include <readline/readline.h>
14093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014094if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095 have_readline=yes
14096else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014098
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014100rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101if test $have_readline = yes
14102then
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104/* end confdefs.h. */
14105#include <readline/readline.h>
14106
14107_ACEOF
14108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014110
Matthias Kloseb9621712010-04-24 17:59:49 +000014111$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
14113fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014114rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014115
14116fi
14117
Martin v. Löwis82bca632006-02-10 20:49:30 +000014118# End of readline checks: restore LIBS
14119LIBS=$LIBS_no_readline
14120
Matthias Kloseb9621712010-04-24 17:59:49 +000014121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14122$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014123if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014125else
Martin v. Löwis11437992002-04-12 09:54:03 +000014126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014128 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014132
14133int main()
14134{
14135 int val1 = nice(1);
14136 if (val1 != -1 && val1 == nice(2))
14137 exit(0);
14138 exit(1);
14139}
14140
Martin v. Löwis11437992002-04-12 09:54:03 +000014141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014143 ac_cv_broken_nice=yes
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014149fi
14150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014151fi
14152
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14154$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014155if test "$ac_cv_broken_nice" = yes
14156then
Martin v. Löwis11437992002-04-12 09:54:03 +000014157
Matthias Kloseb9621712010-04-24 17:59:49 +000014158$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014159
14160fi
14161
Matthias Kloseb9621712010-04-24 17:59:49 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14163$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014164if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014166else
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168 ac_cv_broken_poll=no
14169else
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014171/* end confdefs.h. */
14172
14173#include <poll.h>
14174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175int main()
14176{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014178 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179
14180 close (42);
14181
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014188 return 1;
14189}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190
14191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014192if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193 ac_cv_broken_poll=yes
14194else
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014201fi
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14204$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014205if test "$ac_cv_broken_poll" = yes
14206then
14207
Matthias Kloseb9621712010-04-24 17:59:49 +000014208$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014209
14210fi
14211
Brett Cannon43802422005-02-10 20:48:03 +000014212# 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 +000014213# (which is not required by ISO C or UNIX spec) and/or if we support
14214# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014215ac_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 +000014216#include <$ac_cv_struct_tm>
14217
Matthias Kloseb9621712010-04-24 17:59:49 +000014218"
Victor Stinnere0be4232011-10-25 13:06:09 +020014219if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014220
14221cat >>confdefs.h <<_ACEOF
14222#define HAVE_STRUCT_TM_TM_ZONE 1
14223_ACEOF
14224
14225
14226fi
14227
14228if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14229
Matthias Kloseb9621712010-04-24 17:59:49 +000014230$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014231
14232else
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14234"
Victor Stinnere0be4232011-10-25 13:06:09 +020014235if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237else
Matthias Kloseb9621712010-04-24 17:59:49 +000014238 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239fi
14240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243_ACEOF
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14246$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014247if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249else
Matthias Kloseb9621712010-04-24 17:59:49 +000014250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014251/* end confdefs.h. */
14252#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253#if !HAVE_DECL_TZNAME
14254extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014255#endif
14256
14257int
14258main ()
14259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014260return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014265if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014266 ac_cv_var_tzname=yes
14267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014270rm -f core conftest.err conftest.$ac_objext \
14271 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14274$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014275 if test $ac_cv_var_tzname = yes; then
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014278
14279 fi
14280fi
14281
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014282
Martin v. Löwis1d459062005-03-14 21:23:33 +000014283# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14285$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014286if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288else
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014291 ac_cv_working_tzset=no
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014294/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295
14296#include <stdlib.h>
14297#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014298#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014299
14300#if HAVE_TZNAME
14301extern char *tzname[];
14302#endif
14303
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014304int main()
14305{
Brett Cannon18367812003-09-19 00:59:16 +000014306 /* Note that we need to ensure that not only does tzset(3)
14307 do 'something' with localtime, but it works as documented
14308 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014309 This includes making sure that tzname is set properly if
14310 tm->tm_zone does not exist since it is the alternative way
14311 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014312
14313 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014314 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014315 */
14316
Martin v. Löwis1d459062005-03-14 21:23:33 +000014317 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014318 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14319
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014320 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014321 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014322 if (localtime(&groundhogday)->tm_hour != 0)
14323 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014324#if HAVE_TZNAME
14325 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14326 if (strcmp(tzname[0], "UTC") ||
14327 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14328 exit(1);
14329#endif
Brett Cannon18367812003-09-19 00:59:16 +000014330
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014331 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014332 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014333 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014334 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014335#if HAVE_TZNAME
14336 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14337 exit(1);
14338#endif
Brett Cannon18367812003-09-19 00:59:16 +000014339
14340 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14341 tzset();
14342 if (localtime(&groundhogday)->tm_hour != 11)
14343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014344#if HAVE_TZNAME
14345 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14346 exit(1);
14347#endif
14348
14349#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014350 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14351 exit(1);
14352 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14353 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014354#endif
Brett Cannon18367812003-09-19 00:59:16 +000014355
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014356 exit(0);
14357}
14358
14359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014360if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014361 ac_cv_working_tzset=yes
14362else
Matthias Kloseb9621712010-04-24 17:59:49 +000014363 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014367fi
14368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14372$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014373if test "$ac_cv_working_tzset" = yes
14374then
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014377
14378fi
14379
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014380# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14382$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014383if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014387/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014388#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014389int
14390main ()
14391{
14392
14393struct stat st;
14394st.st_mtim.tv_nsec = 1;
14395
14396 ;
14397 return 0;
14398}
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014401 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406fi
14407
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14409$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014410if test "$ac_cv_stat_tv_nsec" = yes
14411then
14412
Matthias Kloseb9621712010-04-24 17:59:49 +000014413$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014414
14415fi
14416
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014417# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14419$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014420if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014424/* end confdefs.h. */
14425#include <sys/stat.h>
14426int
14427main ()
14428{
14429
14430struct stat st;
14431st.st_mtimespec.tv_nsec = 1;
14432
14433 ;
14434 return 0;
14435}
14436_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014437if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438 ac_cv_stat_tv_nsec2=yes
14439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14443fi
14444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14446$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014447if test "$ac_cv_stat_tv_nsec2" = yes
14448then
14449
Matthias Kloseb9621712010-04-24 17:59:49 +000014450$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014451
14452fi
14453
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014454ac_save_cppflags="$CPPFLAGS"
14455CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014456# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14458$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014463/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014464#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014465int
14466main ()
14467{
Jack Jansen666b1e72001-10-31 12:11:48 +000014468
14469 int rtn;
14470 rtn = mvwdelch(0,0,0);
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014476if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014477 ac_cv_mvwdelch_is_expression=yes
14478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482fi
14483
Matthias Kloseb9621712010-04-24 17:59:49 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14485$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014486
14487if test "$ac_cv_mvwdelch_is_expression" = yes
14488then
Martin v. Löwis11437992002-04-12 09:54:03 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014491
14492fi
14493
Matthias Kloseb9621712010-04-24 17:59:49 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14495$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014496if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014501#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014502int
14503main ()
14504{
Jack Jansen666b1e72001-10-31 12:11:48 +000014505
14506 WINDOW *w;
14507 w->_flags = 0;
14508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 ;
14510 return 0;
14511}
14512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014513if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014514 ac_cv_window_has_flags=yes
14515else
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519fi
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14522$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014523
Jack Jansen666b1e72001-10-31 12:11:48 +000014524
14525if test "$ac_cv_window_has_flags" = yes
14526then
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014529
14530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14533$as_echo_n "checking for is_term_resized... " >&6; }
14534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014535/* end confdefs.h. */
14536#include <curses.h>
14537int
14538main ()
14539{
14540void *x=is_term_resized
14541 ;
14542 return 0;
14543}
14544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014548
Matthias Kloseb159a552010-04-25 21:00:44 +000014549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014550$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014551else
Matthias Kloseb9621712010-04-24 17:59:49 +000014552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14553$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014554
14555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14557
Matthias Kloseb9621712010-04-24 17:59:49 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14559$as_echo_n "checking for resize_term... " >&6; }
14560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014561/* end confdefs.h. */
14562#include <curses.h>
14563int
14564main ()
14565{
14566void *x=resize_term
14567 ;
14568 return 0;
14569}
14570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014571if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014574
Matthias Kloseb159a552010-04-25 21:00:44 +000014575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14579$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014580
14581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14585$as_echo_n "checking for resizeterm... " >&6; }
14586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014587/* end confdefs.h. */
14588#include <curses.h>
14589int
14590main ()
14591{
14592void *x=resizeterm
14593 ;
14594 return 0;
14595}
14596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014598
Matthias Kloseb9621712010-04-24 17:59:49 +000014599$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014600
Matthias Kloseb159a552010-04-25 21:00:44 +000014601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014602$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014603else
Matthias Kloseb9621712010-04-24 17:59:49 +000014604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14605$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014606
14607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014609# last curses configure check
14610CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14613$as_echo "$as_me: checking for device files" >&6;}
14614
14615if test "x$cross_compiling" = xyes; then
14616 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14618$as_echo_n "checking for /dev/ptmx... " >&6; }
14619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14620$as_echo "not set" >&6; }
14621 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14622 fi
14623 if test "${ac_cv_file__dev_ptc+set}" != set; then
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14625$as_echo_n "checking for /dev/ptc... " >&6; }
14626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14627$as_echo "not set" >&6; }
14628 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14629 fi
14630fi
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14633$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014634if ${ac_cv_file__dev_ptmx+:} false; then :
14635 $as_echo_n "(cached) " >&6
14636else
14637 test "$cross_compiling" = yes &&
14638 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14639if test -r "/dev/ptmx"; then
14640 ac_cv_file__dev_ptmx=yes
14641else
14642 ac_cv_file__dev_ptmx=no
14643fi
14644fi
14645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14646$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14647if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014648
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014649fi
14650
14651if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014654
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014655fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14657$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014658if ${ac_cv_file__dev_ptc+:} false; then :
14659 $as_echo_n "(cached) " >&6
14660else
14661 test "$cross_compiling" = yes &&
14662 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14663if test -r "/dev/ptc"; then
14664 ac_cv_file__dev_ptc=yes
14665else
14666 ac_cv_file__dev_ptc=no
14667fi
14668fi
14669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14670$as_echo "$ac_cv_file__dev_ptc" >&6; }
14671if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014672
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014673fi
14674
14675if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014676
Matthias Kloseb9621712010-04-24 17:59:49 +000014677$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014678
Neal Norwitz865400f2003-03-21 01:42:58 +000014679fi
14680
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014681if test "$have_long_long" = yes
14682then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14684$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014685 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014687else
Matthias Kloseb9621712010-04-24 17:59:49 +000014688 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014689 ac_cv_have_long_long_format="cross -- assuming no"
14690 if test x$GCC = xyes; then
14691 save_CFLAGS=$CFLAGS
14692 CFLAGS="$CFLAGS -Werror -Wformat"
14693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14694/* end confdefs.h. */
14695
14696 #include <stdio.h>
14697 #include <stddef.h>
14698
14699int
14700main ()
14701{
14702
14703 char *buffer;
14704 sprintf(buffer, "%lld", (long long)123);
14705 sprintf(buffer, "%lld", (long long)-123);
14706 sprintf(buffer, "%llu", (unsigned long long)123);
14707
14708 ;
14709 return 0;
14710}
14711_ACEOF
14712if ac_fn_c_try_compile "$LINENO"; then :
14713 ac_cv_have_long_long_format=yes
14714
14715fi
14716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14717 CFLAGS=$save_CFLAGS
14718 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014721/* end confdefs.h. */
14722
14723 #include <stdio.h>
14724 #include <stddef.h>
14725 #include <string.h>
14726
14727 #ifdef HAVE_SYS_TYPES_H
14728 #include <sys/types.h>
14729 #endif
14730
14731 int main()
14732 {
14733 char buffer[256];
14734
14735 if (sprintf(buffer, "%lld", (long long)123) < 0)
14736 return 1;
14737 if (strcmp(buffer, "123"))
14738 return 1;
14739
14740 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14741 return 1;
14742 if (strcmp(buffer, "-123"))
14743 return 1;
14744
14745 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14746 return 1;
14747 if (strcmp(buffer, "123"))
14748 return 1;
14749
14750 return 0;
14751 }
14752
14753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014755 ac_cv_have_long_long_format=yes
14756else
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014761fi
14762
14763
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014764fi
14765
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14767$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014768fi
14769
Mark Dickinson89d7d412009-12-31 20:50:59 +000014770if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014771then
14772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014774
14775fi
14776
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014777if test $ac_sys_system = Darwin
14778then
14779 LIBS="$LIBS -framework CoreFoundation"
14780fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14783$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014784if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014786else
Matthias Kloseb9621712010-04-24 17:59:49 +000014787 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014788 ac_cv_have_size_t_format="cross -- assuming yes"
14789
Thomas Wouters477c8d52006-05-27 19:21:47 +000014790else
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014793
Thomas Wouters477c8d52006-05-27 19:21:47 +000014794#include <stdio.h>
14795#include <stddef.h>
14796#include <string.h>
14797
Christian Heimes2c181612007-12-17 20:04:13 +000014798#ifdef HAVE_SYS_TYPES_H
14799#include <sys/types.h>
14800#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014801
14802#ifdef HAVE_SSIZE_T
14803typedef ssize_t Py_ssize_t;
14804#elif SIZEOF_VOID_P == SIZEOF_LONG
14805typedef long Py_ssize_t;
14806#else
14807typedef int Py_ssize_t;
14808#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014809
Christian Heimes2c181612007-12-17 20:04:13 +000014810int main()
14811{
14812 char buffer[256];
14813
Thomas Wouters477c8d52006-05-27 19:21:47 +000014814 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14815 return 1;
14816
Thomas Wouters89f507f2006-12-13 04:49:30 +000014817 if (strcmp(buffer, "123"))
14818 return 1;
14819
14820 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14821 return 1;
14822
14823 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014824 return 1;
14825
14826 return 0;
14827}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014828
Thomas Wouters477c8d52006-05-27 19:21:47 +000014829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014831 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014837fi
14838
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14841$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014842if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845
14846fi
14847
Matthias Kloseb9621712010-04-24 17:59:49 +000014848ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014849#ifdef HAVE_SYS_TYPES_H
14850#include <sys/types.h>
14851#endif
14852#ifdef HAVE_SYS_SOCKET_H
14853#include <sys/socket.h>
14854#endif
14855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856"
Victor Stinnere0be4232011-10-25 13:06:09 +020014857if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014858
Martin v. Löwis11437992002-04-12 09:54:03 +000014859else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014860
Matthias Kloseb9621712010-04-24 17:59:49 +000014861$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014862
14863fi
14864
Michael W. Hudson54241132001-12-07 15:38:26 +000014865
Matthias Kloseb9621712010-04-24 17:59:49 +000014866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14867$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014868if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014870else
Matthias Kloseb9621712010-04-24 17:59:49 +000014871 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014872 ac_cv_broken_mbstowcs=no
14873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014875/* end confdefs.h. */
14876
Stefan Krah19c21392012-11-22 23:47:32 +010014877#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014878#include<stdlib.h>
14879int main() {
14880 size_t len = -1;
14881 const char *str = "text";
14882 len = mbstowcs(NULL, str, 0);
14883 return (len != 4);
14884}
14885
14886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014887if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014888 ac_cv_broken_mbstowcs=no
14889else
Matthias Kloseb9621712010-04-24 17:59:49 +000014890 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14893 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014894fi
14895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014896fi
14897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14899$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014900if test "$ac_cv_broken_mbstowcs" = yes
14901then
14902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014904
14905fi
14906
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14909$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910
14911# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014912if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014914if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014915then
14916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14920$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014921fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014922if test "$withval" = no
14923then
14924
14925$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14928$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014929fi
14930
Antoine Pitrou042b1282010-08-13 21:15:58 +000014931else
14932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14933$as_echo "no value specified" >&6; }
14934fi
14935
Antoine Pitroub52ec782009-01-25 16:34:23 +000014936
Matthias Kloseb17289e2012-03-15 19:51:34 +010014937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14938$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14939if ${ac_cv_computed_gotos+:} false; then :
14940 $as_echo_n "(cached) " >&6
14941else
14942 if test "$cross_compiling" = yes; then :
14943 if test "${with_computed_gotos+set}" = set; then
14944 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14945 else
14946 ac_cv_computed_gotos=no
14947 fi
14948else
14949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14950/* end confdefs.h. */
14951
14952int main(int argc, char **argv)
14953{
14954 static void *targets[1] = { &&LABEL1 };
14955 goto LABEL2;
14956LABEL1:
14957 return 0;
14958LABEL2:
14959 goto *targets[0];
14960 return 1;
14961}
14962
14963_ACEOF
14964if ac_fn_c_try_run "$LINENO"; then :
14965 ac_cv_computed_gotos=yes
14966else
14967 ac_cv_computed_gotos=no
14968fi
14969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14970 conftest.$ac_objext conftest.beam conftest.$ac_ext
14971fi
14972
14973fi
14974
14975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14976$as_echo "$ac_cv_computed_gotos" >&6; }
14977case "$ac_cv_computed_gotos" in yes*)
14978
14979$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14980
14981esac
14982
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014983case $ac_sys_system in
14984AIX*)
14985
14986$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14987 ;;
14988esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014989
Michael W. Hudson54241132001-12-07 15:38:26 +000014990
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014991
14992
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014993for h in `(cd $srcdir;echo Python/thread_*.h)`
14994do
14995 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14996done
14997
Michael W. Hudson54241132001-12-07 15:38:26 +000014998
Neal Norwitzd24499d2005-12-18 21:36:39 +000014999SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15001$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015002for dir in $SRCDIRS; do
15003 if test ! -d $dir; then
15004 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015005 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015006done
Matthias Kloseb9621712010-04-24 17:59:49 +000015007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15008$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015009
Stefan Krah1919b7e2012-03-21 18:25:23 +010015010# Availability of -O2:
15011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15012$as_echo_n "checking for -O2... " >&6; }
15013saved_cflags="$CFLAGS"
15014CFLAGS="-O2"
15015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016/* end confdefs.h. */
15017
15018int
15019main ()
15020{
15021
15022
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_compile "$LINENO"; then :
15028 have_O2=yes
15029else
15030 have_O2=no
15031fi
15032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15034$as_echo "$have_O2" >&6; }
15035CFLAGS="$saved_cflags"
15036
15037# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15038# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15040$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15041saved_cflags="$CFLAGS"
15042CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15043if test "$have_O2" = no; then
15044 CFLAGS=""
15045fi
15046if test "$cross_compiling" = yes; then :
15047 have_glibc_memmove_bug=undefined
15048else
15049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15050/* end confdefs.h. */
15051
15052#include <stdio.h>
15053#include <stdlib.h>
15054#include <string.h>
15055void foo(void *p, void *q) { memmove(p, q, 19); }
15056int main() {
15057 char a[32] = "123456789000000000";
15058 foo(&a[9], a);
15059 if (strcmp(a, "123456789123456789000000000") != 0)
15060 return 1;
15061 foo(a, &a[9]);
15062 if (strcmp(a, "123456789000000000") != 0)
15063 return 1;
15064 return 0;
15065}
15066
15067_ACEOF
15068if ac_fn_c_try_run "$LINENO"; then :
15069 have_glibc_memmove_bug=no
15070else
15071 have_glibc_memmove_bug=yes
15072fi
15073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15074 conftest.$ac_objext conftest.beam conftest.$ac_ext
15075fi
15076
15077CFLAGS="$saved_cflags"
15078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15079$as_echo "$have_glibc_memmove_bug" >&6; }
15080if test "$have_glibc_memmove_bug" = yes; then
15081
15082$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15083
15084fi
15085
15086if test "$have_gcc_asm_for_x87" = yes; then
15087 # Some versions of gcc miscompile inline asm:
15088 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15089 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15090 case $CC in
15091 *gcc*)
15092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15093$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15094 saved_cflags="$CFLAGS"
15095 CFLAGS="-O2"
15096 if test "$cross_compiling" = yes; then :
15097 have_ipa_pure_const_bug=undefined
15098else
15099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100/* end confdefs.h. */
15101
15102 __attribute__((noinline)) int
15103 foo(int *p) {
15104 int r;
15105 asm ( "movl \$6, (%1)\n\t"
15106 "xorl %0, %0\n\t"
15107 : "=r" (r) : "r" (p) : "memory"
15108 );
15109 return r;
15110 }
15111 int main() {
15112 int p = 8;
15113 if ((foo(&p) ? : p) != 6)
15114 return 1;
15115 return 0;
15116 }
15117
15118_ACEOF
15119if ac_fn_c_try_run "$LINENO"; then :
15120 have_ipa_pure_const_bug=no
15121else
15122 have_ipa_pure_const_bug=yes
15123fi
15124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
15126fi
15127
15128 CFLAGS="$saved_cflags"
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15130$as_echo "$have_ipa_pure_const_bug" >&6; }
15131 if test "$have_ipa_pure_const_bug" = yes; then
15132
15133$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15134
15135 fi
15136 ;;
15137 esac
15138fi
15139
Guido van Rossum627b2d71993-12-24 10:39:16 +000015140# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015141ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015142
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015143ac_config_files="$ac_config_files Modules/ld_so_aix"
15144
Martin v. Löwis11437992002-04-12 09:54:03 +000015145cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146# This file is a shell script that caches the results of configure
15147# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015148# scripts and configure runs, see configure's option --config-cache.
15149# It is not useful on other systems. If it contains results you don't
15150# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151#
Martin v. Löwis11437992002-04-12 09:54:03 +000015152# config.status only pays attention to the cache file if you give it
15153# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015154#
Skip Montanaro6dead952003-09-25 14:50:04 +000015155# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015156# loading this file, other *unset* `ac_cv_foo' will be assigned the
15157# following values.
15158
15159_ACEOF
15160
Guido van Rossumf78abae1997-01-21 22:02:36 +000015161# The following way of writing the cache mishandles newlines in values,
15162# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015164# Ultrix sh set writes to stderr and can't be redirected directly,
15165# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166(
15167 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15168 eval ac_val=\$$ac_var
15169 case $ac_val in #(
15170 *${as_nl}*)
15171 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15173$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174 esac
15175 case $ac_var in #(
15176 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15178 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179 esac ;;
15180 esac
15181 done
15182
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15185 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015186 # `set' does not quote correctly, so add quotes: double-quote
15187 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015189 "s/'/'\\\\''/g;
15190 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 *)
15193 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015195 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196 esac |
15197 sort
15198) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015203 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15204 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015205 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15206 :end' >>confcache
15207if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15208 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015209 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15211$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015212 if test ! -f "$cache_file" || test -h "$cache_file"; then
15213 cat confcache >"$cache_file"
15214 else
15215 case $cache_file in #(
15216 */* | ?:*)
15217 mv -f confcache "$cache_file"$$ &&
15218 mv -f "$cache_file"$$ "$cache_file" ;; #(
15219 *)
15220 mv -f confcache "$cache_file" ;;
15221 esac
15222 fi
15223 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015224 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15226$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015227 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015228fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231test "x$prefix" = xNONE && prefix=$ac_default_prefix
15232# Let make expand exec_prefix.
15233test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015234
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015235DEFS=-DHAVE_CONFIG_H
15236
Skip Montanaro6dead952003-09-25 14:50:04 +000015237ac_libobjs=
15238ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015239U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015240for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15241 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015243 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15245 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15247 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015248done
15249LIBOBJS=$ac_libobjs
15250
15251LTLIBOBJS=$ac_ltlibobjs
15252
15253
Martin v. Löwis11437992002-04-12 09:54:03 +000015254
Matthias Kloseb9621712010-04-24 17:59:49 +000015255
Victor Stinnere0be4232011-10-25 13:06:09 +020015256: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015257ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015258ac_clean_files_save=$ac_clean_files
15259ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015260{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15261$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15262as_write_fail=0
15263cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264#! $SHELL
15265# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015266# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015267# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015268# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015269
Martin v. Löwis11437992002-04-12 09:54:03 +000015270debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015271ac_cs_recheck=false
15272ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274SHELL=\${CONFIG_SHELL-$SHELL}
15275export SHELL
15276_ASEOF
15277cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15278## -------------------- ##
15279## M4sh Initialization. ##
15280## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015281
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015282# Be more Bourne compatible
15283DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015284if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015285 emulate sh
15286 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015287 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015288 # is contrary to our usage. Disable this feature.
15289 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015291else
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 case `(set -o) 2>/dev/null` in #(
15293 *posix*) :
15294 set -o posix ;; #(
15295 *) :
15296 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015297esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015298fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015299
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301as_nl='
15302'
15303export as_nl
15304# Printing a long string crashes Solaris 7 /usr/bin/printf.
15305as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15306as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15307as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15308# Prefer a ksh shell builtin over an external printf program on Solaris,
15309# but without wasting forks for bash or zsh.
15310if test -z "$BASH_VERSION$ZSH_VERSION" \
15311 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15312 as_echo='print -r --'
15313 as_echo_n='print -rn --'
15314elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15315 as_echo='printf %s\n'
15316 as_echo_n='printf %s'
15317else
15318 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15319 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15320 as_echo_n='/usr/ucb/echo -n'
15321 else
15322 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15323 as_echo_n_body='eval
15324 arg=$1;
15325 case $arg in #(
15326 *"$as_nl"*)
15327 expr "X$arg" : "X\\(.*\\)$as_nl";
15328 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15329 esac;
15330 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15331 '
15332 export as_echo_n_body
15333 as_echo_n='sh -c $as_echo_n_body as_echo'
15334 fi
15335 export as_echo_body
15336 as_echo='sh -c $as_echo_body as_echo'
15337fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
15339# The user is always right.
15340if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 PATH_SEPARATOR=:
15342 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15343 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15344 PATH_SEPARATOR=';'
15345 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348
15349# IFS
15350# We need space, tab and new line, in precisely that order. Quoting is
15351# there to prevent editors from complaining about space-tab.
15352# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15353# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354IFS=" "" $as_nl"
15355
15356# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015357as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015358case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015359 *[\\/]* ) as_myself=$0 ;;
15360 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015361for as_dir in $PATH
15362do
15363 IFS=$as_save_IFS
15364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15366 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369 ;;
15370esac
15371# We did not find ourselves, most probably we were run as `sh COMMAND'
15372# in which case we are not to be found in the path.
15373if test "x$as_myself" = x; then
15374 as_myself=$0
15375fi
15376if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015377 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15378 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015379fi
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381# Unset variables that we do not need and which cause bugs (e.g. in
15382# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15383# suppresses any "Segmentation fault" message there. '((' could
15384# trigger a bug in pdksh 5.2.14.
15385for as_var in BASH_ENV ENV MAIL MAILPATH
15386do eval test x\${$as_var+set} = xset \
15387 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388done
15389PS1='$ '
15390PS2='> '
15391PS4='+ '
15392
15393# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015394LC_ALL=C
15395export LC_ALL
15396LANGUAGE=C
15397export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398
Matthias Kloseb9621712010-04-24 17:59:49 +000015399# CDPATH.
15400(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15401
15402
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015403# as_fn_error STATUS ERROR [LINENO LOG_FD]
15404# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015407# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015408as_fn_error ()
15409{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015410 as_status=$1; test $as_status -eq 0 && as_status=1
15411 if test "$4"; then
15412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015415 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 as_fn_exit $as_status
15417} # as_fn_error
15418
15419
15420# as_fn_set_status STATUS
15421# -----------------------
15422# Set $? to STATUS, without forking.
15423as_fn_set_status ()
15424{
15425 return $1
15426} # as_fn_set_status
15427
15428# as_fn_exit STATUS
15429# -----------------
15430# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15431as_fn_exit ()
15432{
15433 set +e
15434 as_fn_set_status $1
15435 exit $1
15436} # as_fn_exit
15437
15438# as_fn_unset VAR
15439# ---------------
15440# Portably unset VAR.
15441as_fn_unset ()
15442{
15443 { eval $1=; unset $1;}
15444}
15445as_unset=as_fn_unset
15446# as_fn_append VAR VALUE
15447# ----------------------
15448# Append the text in VALUE to the end of the definition contained in VAR. Take
15449# advantage of any shell optimizations that allow amortized linear growth over
15450# repeated appends, instead of the typical quadratic growth present in naive
15451# implementations.
15452if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15453 eval 'as_fn_append ()
15454 {
15455 eval $1+=\$2
15456 }'
15457else
15458 as_fn_append ()
15459 {
15460 eval $1=\$$1\$2
15461 }
15462fi # as_fn_append
15463
15464# as_fn_arith ARG...
15465# ------------------
15466# Perform arithmetic evaluation on the ARGs, and store the result in the
15467# global $as_val. Take advantage of shells that can avoid forks. The arguments
15468# must be portable across $(()) and expr.
15469if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15470 eval 'as_fn_arith ()
15471 {
15472 as_val=$(( $* ))
15473 }'
15474else
15475 as_fn_arith ()
15476 {
15477 as_val=`expr "$@" || test $? -eq 1`
15478 }
15479fi # as_fn_arith
15480
15481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482if expr a : '\(a\)' >/dev/null 2>&1 &&
15483 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15484 as_expr=expr
15485else
15486 as_expr=false
15487fi
15488
15489if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15490 as_basename=basename
15491else
15492 as_basename=false
15493fi
15494
Matthias Kloseb9621712010-04-24 17:59:49 +000015495if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15496 as_dirname=dirname
15497else
15498 as_dirname=false
15499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015501as_me=`$as_basename -- "$0" ||
15502$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15503 X"$0" : 'X\(//\)$' \| \
15504 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015506 sed '/^.*\/\([^/][^/]*\)\/*$/{
15507 s//\1/
15508 q
15509 }
15510 /^X\/\(\/\/\)$/{
15511 s//\1/
15512 q
15513 }
15514 /^X\/\(\/\).*/{
15515 s//\1/
15516 q
15517 }
15518 s/.*/./; q'`
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520# Avoid depending upon Character Ranges.
15521as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15522as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15523as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15524as_cr_digits='0123456789'
15525as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526
15527ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015528case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015531 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 xy) ECHO_C='\c';;
15533 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15534 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535 esac;;
15536*)
15537 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015538esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015539
Martin v. Löwis11437992002-04-12 09:54:03 +000015540rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541if test -d conf$$.dir; then
15542 rm -f conf$$.dir/conf$$.file
15543else
15544 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015547if (echo >conf$$.file) 2>/dev/null; then
15548 if ln -s conf$$.file conf$$ 2>/dev/null; then
15549 as_ln_s='ln -s'
15550 # ... but there are two gotchas:
15551 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15552 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015553 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015555 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 elif ln conf$$.file conf$$ 2>/dev/null; then
15557 as_ln_s=ln
15558 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015559 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015561else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015562 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015564rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15565rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Matthias Kloseb9621712010-04-24 17:59:49 +000015567
15568# as_fn_mkdir_p
15569# -------------
15570# Create "$as_dir" as a directory, including parents if necessary.
15571as_fn_mkdir_p ()
15572{
15573
15574 case $as_dir in #(
15575 -*) as_dir=./$as_dir;;
15576 esac
15577 test -d "$as_dir" || eval $as_mkdir_p || {
15578 as_dirs=
15579 while :; do
15580 case $as_dir in #(
15581 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15582 *) as_qdir=$as_dir;;
15583 esac
15584 as_dirs="'$as_qdir' $as_dirs"
15585 as_dir=`$as_dirname -- "$as_dir" ||
15586$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15587 X"$as_dir" : 'X\(//\)[^/]' \| \
15588 X"$as_dir" : 'X\(//\)$' \| \
15589 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15590$as_echo X"$as_dir" |
15591 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15592 s//\1/
15593 q
15594 }
15595 /^X\(\/\/\)[^/].*/{
15596 s//\1/
15597 q
15598 }
15599 /^X\(\/\/\)$/{
15600 s//\1/
15601 q
15602 }
15603 /^X\(\/\).*/{
15604 s//\1/
15605 q
15606 }
15607 s/.*/./; q'`
15608 test -d "$as_dir" && break
15609 done
15610 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015611 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015612
15613
15614} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015615if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015616 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015617else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015618 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015619 as_mkdir_p=false
15620fi
15621
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015622
15623# as_fn_executable_p FILE
15624# -----------------------
15625# Test if FILE is an executable regular file.
15626as_fn_executable_p ()
15627{
15628 test -f "$1" && test -x "$1"
15629} # as_fn_executable_p
15630as_test_x='test -x'
15631as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015632
15633# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015634as_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 +000015635
15636# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639
Martin v. Löwis11437992002-04-12 09:54:03 +000015640exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015641## ----------------------------------- ##
15642## Main body of $CONFIG_STATUS script. ##
15643## ----------------------------------- ##
15644_ASEOF
15645test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15648# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015649# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650# values after options handling.
15651ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015652This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015653generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015654
15655 CONFIG_FILES = $CONFIG_FILES
15656 CONFIG_HEADERS = $CONFIG_HEADERS
15657 CONFIG_LINKS = $CONFIG_LINKS
15658 CONFIG_COMMANDS = $CONFIG_COMMANDS
15659 $ $0 $@
15660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015661on `(hostname || uname -n) 2>/dev/null | sed 1q`
15662"
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664_ACEOF
15665
Matthias Kloseb9621712010-04-24 17:59:49 +000015666case $ac_config_files in *"
15667"*) set x $ac_config_files; shift; ac_config_files=$*;;
15668esac
15669
15670case $ac_config_headers in *"
15671"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15672esac
15673
15674
15675cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015676# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015677config_files="$ac_config_files"
15678config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015681
Matthias Kloseb9621712010-04-24 17:59:49 +000015682cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015683ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015684\`$as_me' instantiates files and other configuration actions
15685from templates according to the current configuration. Unless the files
15686and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015689
15690 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015691 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 --config print configuration, then exit
15693 -q, --quiet, --silent
15694 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015695 -d, --debug don't remove temporary files
15696 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 --file=FILE[:TEMPLATE]
15698 instantiate the configuration file FILE
15699 --header=FILE[:TEMPLATE]
15700 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015701
15702Configuration files:
15703$config_files
15704
15705Configuration headers:
15706$config_headers
15707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015711cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15712ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015714python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015715configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015716 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015717
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015718Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015719This config.status script is free software; the Free Software Foundation
15720gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721
15722ac_pwd='$ac_pwd'
15723srcdir='$srcdir'
15724INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015725MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015726test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015727_ACEOF
15728
Matthias Kloseb9621712010-04-24 17:59:49 +000015729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15730# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_need_defaults=:
15732while test $# != 0
15733do
15734 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015735 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015736 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15737 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015738 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015740 --*=)
15741 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15742 ac_optarg=
15743 ac_shift=:
15744 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015746 ac_option=$1
15747 ac_optarg=$2
15748 ac_shift=shift
15749 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 esac
15751
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015754 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15755 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 $as_echo "$ac_cs_version"; exit ;;
15758 --config | --confi | --conf | --con | --co | --c )
15759 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015760 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 debug=: ;;
15762 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015763 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 case $ac_optarg in
15765 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015766 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 esac
15768 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_need_defaults=false;;
15770 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015772 case $ac_optarg in
15773 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15774 esac
15775 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015777 --he | --h)
15778 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015779 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015780Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015782 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015783 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15784 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15785 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015786
15787 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015788 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015789Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015790
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015793
15794 esac
15795 shift
15796done
15797
Skip Montanaro6dead952003-09-25 14:50:04 +000015798ac_configure_extra_args=
15799
15800if $ac_cs_silent; then
15801 exec 6>/dev/null
15802 ac_configure_extra_args="$ac_configure_extra_args --silent"
15803fi
15804
15805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015807if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015808 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 shift
15810 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15811 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015812 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015814fi
15815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015817cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818exec 5>>config.log
15819{
15820 echo
15821 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15822## Running $as_me. ##
15823_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015824 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015832
15833# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015834for ac_config_target in $ac_config_targets
15835do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836 case $ac_config_target in
15837 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15838 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15839 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015840 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15841 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015842 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15843 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015844 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015845 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846
Victor Stinnere0be4232011-10-25 13:06:09 +020015847 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015848 esac
15849done
15850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851
Martin v. Löwis11437992002-04-12 09:54:03 +000015852# If the user did not use the arguments to specify the items to instantiate,
15853# then the envvar interface is used. Set only those that are not.
15854# We use the long form for the default assignment because of an extremely
15855# bizarre bug on SunOS 4.1.3.
15856if $ac_need_defaults; then
15857 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15858 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15859fi
15860
Skip Montanaro6dead952003-09-25 14:50:04 +000015861# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015863# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864# Hook for its removal unless debugging.
15865# Note that there is a small window in which the directory will not be cleaned:
15866# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015867$debug ||
15868{
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015870 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015871 : "${ac_tmp:=$tmp}"
15872 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015874 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015875}
Martin v. Löwis11437992002-04-12 09:54:03 +000015876# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015877
Martin v. Löwis11437992002-04-12 09:54:03 +000015878{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015880 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015881} ||
15882{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883 tmp=./conf$$-$RANDOM
15884 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015885} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015886ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888# Set up the scripts for CONFIG_FILES section.
15889# No need to generate them if there are no CONFIG_FILES.
15890# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893
15894ac_cr=`echo X | tr X '\015'`
15895# On cygwin, bash can eat \r inside `` if the user requested igncr.
15896# But we know of no other shell where ac_cr would be empty at this
15897# point, so we can use a bashism as a fallback.
15898if test "x$ac_cr" = x; then
15899 eval ac_cr=\$\'\\r\'
15900fi
15901ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15902if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015903 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015904else
15905 ac_cs_awk_cr=$ac_cr
15906fi
15907
Victor Stinnere0be4232011-10-25 13:06:09 +020015908echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015909_ACEOF
15910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912{
15913 echo "cat >conf$$subs.awk <<_ACEOF" &&
15914 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15915 echo "_ACEOF"
15916} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15918ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919ac_delim='%!_!# '
15920for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015922 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15925 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926 break
15927 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015928 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015929 else
15930 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015931 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932done
Matthias Kloseb9621712010-04-24 17:59:49 +000015933rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934
Matthias Kloseb9621712010-04-24 17:59:49 +000015935cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015936cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015938sed -n '
15939h
15940s/^/S["/; s/!.*/"]=/
15941p
15942g
15943s/^[^!]*!//
15944:repl
15945t repl
15946s/'"$ac_delim"'$//
15947t delim
15948:nl
15949h
15950s/\(.\{148\}\)..*/\1/
15951t more1
15952s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15953p
15954n
15955b repl
15956:more1
15957s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15958p
15959g
15960s/.\{148\}//
15961t nl
15962:delim
15963h
15964s/\(.\{148\}\)..*/\1/
15965t more2
15966s/["\\]/\\&/g; s/^/"/; s/$/"/
15967p
15968b
15969:more2
15970s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15971p
15972g
15973s/.\{148\}//
15974t delim
15975' <conf$$subs.awk | sed '
15976/^[^""]/{
15977 N
15978 s/\n//
15979}
15980' >>$CONFIG_STATUS || ac_write_fail=1
15981rm -f conf$$subs.awk
15982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15983_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015984cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015985 for (key in S) S_is_set[key] = 1
15986 FS = ""
15987
15988}
15989{
15990 line = $ 0
15991 nfields = split(line, field, "@")
15992 substed = 0
15993 len = length(field[1])
15994 for (i = 2; i < nfields; i++) {
15995 key = field[i]
15996 keylen = length(key)
15997 if (S_is_set[key]) {
15998 value = S[key]
15999 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16000 len += length(value) + length(field[++i])
16001 substed = 1
16002 } else
16003 len += 1 + keylen
16004 }
16005
16006 print line
16007}
16008
16009_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16012if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16013 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16014else
16015 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016016fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016017 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016018_ACEOF
16019
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016020# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16021# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022# trailing colons and then remove the whole line if VPATH becomes empty
16023# (actually we leave an empty line to preserve line numbers).
16024if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016025 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16026h
16027s///
16028s/^/:/
16029s/[ ]*$/:/
16030s/:\$(srcdir):/:/g
16031s/:\${srcdir}:/:/g
16032s/:@srcdir@:/:/g
16033s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016035x
16036s/\(=[ ]*\).*/\1/
16037G
16038s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039s/^[^=]*=[ ]*$//
16040}'
16041fi
16042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044fi # test -n "$CONFIG_FILES"
16045
Matthias Kloseb9621712010-04-24 17:59:49 +000016046# Set up the scripts for CONFIG_HEADERS section.
16047# No need to generate them if there are no CONFIG_HEADERS.
16048# This happens for instance with `./config.status Makefile'.
16049if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016050cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016051BEGIN {
16052_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016053
Matthias Kloseb9621712010-04-24 17:59:49 +000016054# Transform confdefs.h into an awk script `defines.awk', embedded as
16055# here-document in config.status, that substitutes the proper values into
16056# config.h.in to produce config.h.
16057
16058# Create a delimiter string that does not exist in confdefs.h, to ease
16059# handling of long lines.
16060ac_delim='%!_!# '
16061for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016062 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16063 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016064 break
16065 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016066 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 else
16068 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16069 fi
16070done
16071
16072# For the awk script, D is an array of macro values keyed by name,
16073# likewise P contains macro parameters if any. Preserve backslash
16074# newline sequences.
16075
16076ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16077sed -n '
16078s/.\{148\}/&'"$ac_delim"'/g
16079t rset
16080:rset
16081s/^[ ]*#[ ]*define[ ][ ]*/ /
16082t def
16083d
16084:def
16085s/\\$//
16086t bsnl
16087s/["\\]/\\&/g
16088s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16089D["\1"]=" \3"/p
16090s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16091d
16092:bsnl
16093s/["\\]/\\&/g
16094s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16095D["\1"]=" \3\\\\\\n"\\/p
16096t cont
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16098t cont
16099d
16100:cont
16101n
16102s/.\{148\}/&'"$ac_delim"'/g
16103t clear
16104:clear
16105s/\\$//
16106t bsnlc
16107s/["\\]/\\&/g; s/^/"/; s/$/"/p
16108d
16109:bsnlc
16110s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16111b cont
16112' <confdefs.h | sed '
16113s/'"$ac_delim"'/"\\\
16114"/g' >>$CONFIG_STATUS || ac_write_fail=1
16115
16116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16117 for (key in D) D_is_set[key] = 1
16118 FS = ""
16119}
16120/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16121 line = \$ 0
16122 split(line, arg, " ")
16123 if (arg[1] == "#") {
16124 defundef = arg[2]
16125 mac1 = arg[3]
16126 } else {
16127 defundef = substr(arg[1], 2)
16128 mac1 = arg[2]
16129 }
16130 split(mac1, mac2, "(") #)
16131 macro = mac2[1]
16132 prefix = substr(line, 1, index(line, defundef) - 1)
16133 if (D_is_set[macro]) {
16134 # Preserve the white space surrounding the "#".
16135 print prefix "define", macro P[macro] D[macro]
16136 next
16137 } else {
16138 # Replace #undef with comments. This is necessary, for example,
16139 # in the case of _POSIX_SOURCE, which is predefined and required
16140 # on some systems where configure will not decide to define it.
16141 if (defundef == "undef") {
16142 print "/*", prefix defundef, macro, "*/"
16143 next
16144 }
16145 }
16146}
16147{ print }
16148_ACAWK
16149_ACEOF
16150cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016151 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016152fi # test -n "$CONFIG_HEADERS"
16153
16154
16155eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16156shift
16157for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016158do
16159 case $ac_tag in
16160 :[FHLC]) ac_mode=$ac_tag; continue;;
16161 esac
16162 case $ac_mode$ac_tag in
16163 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016164 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016165 :[FH]-) ac_tag=-:-;;
16166 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16167 esac
16168 ac_save_IFS=$IFS
16169 IFS=:
16170 set x $ac_tag
16171 IFS=$ac_save_IFS
16172 shift
16173 ac_file=$1
16174 shift
16175
16176 case $ac_mode in
16177 :L) ac_source=$1;;
16178 :[FH])
16179 ac_file_inputs=
16180 for ac_f
16181 do
16182 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016183 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 *) # Look for the file first in the build tree, then in the source tree
16185 # (if the path is not absolute). The absolute path cannot be DOS-style,
16186 # because $ac_f cannot contain `:'.
16187 test -f "$ac_f" ||
16188 case $ac_f in
16189 [\\/$]*) false;;
16190 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16191 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016192 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016194 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16195 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016196 done
16197
16198 # Let's still pretend it is `configure' which instantiates (i.e., don't
16199 # use $as_me), people would be surprised to read:
16200 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016201 configure_input='Generated from '`
16202 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16203 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016204 if test x"$ac_file" != x-; then
16205 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016206 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16207$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016208 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016209 # Neutralize special characters interpreted by sed in replacement strings.
16210 case $configure_input in #(
16211 *\&* | *\|* | *\\* )
16212 ac_sed_conf_input=`$as_echo "$configure_input" |
16213 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16214 *) ac_sed_conf_input=$configure_input;;
16215 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016216
16217 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016218 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16219 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 esac
16221 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 esac
16223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016225$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 X"$ac_file" : 'X\(//\)[^/]' \| \
16227 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016229$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16231 s//\1/
16232 q
16233 }
16234 /^X\(\/\/\)[^/].*/{
16235 s//\1/
16236 q
16237 }
16238 /^X\(\/\/\)$/{
16239 s//\1/
16240 q
16241 }
16242 /^X\(\/\).*/{
16243 s//\1/
16244 q
16245 }
16246 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016247 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 ac_builddir=.
16249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016250case "$ac_dir" in
16251.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16252*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016255 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 case $ac_top_builddir_sub in
16257 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16258 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16259 esac ;;
16260esac
16261ac_abs_top_builddir=$ac_pwd
16262ac_abs_builddir=$ac_pwd$ac_dir_suffix
16263# for backward compatibility:
16264ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016265
16266case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269 ac_top_srcdir=$ac_top_builddir_sub
16270 ac_abs_top_srcdir=$ac_pwd ;;
16271 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 ac_top_srcdir=$srcdir
16274 ac_abs_top_srcdir=$srcdir ;;
16275 *) # Relative name.
16276 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16277 ac_top_srcdir=$ac_top_build_prefix$srcdir
16278 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016279esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016281
Martin v. Löwis11437992002-04-12 09:54:03 +000016282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 case $ac_mode in
16284 :F)
16285 #
16286 # CONFIG_FILE
16287 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
16289 case $INSTALL in
16290 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016291 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016293 ac_MKDIR_P=$MKDIR_P
16294 case $MKDIR_P in
16295 [\\/$]* | ?:[\\/]* ) ;;
16296 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16297 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016298_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299
Matthias Kloseb9621712010-04-24 17:59:49 +000016300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301# If the template does not know about datarootdir, expand it.
16302# FIXME: This hack should be removed a few years after 2.60.
16303ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016304ac_sed_dataroot='
16305/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306 p
16307 q
16308}
16309/@datadir@/p
16310/@docdir@/p
16311/@infodir@/p
16312/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016313/@mandir@/p'
16314case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315*datarootdir*) ac_datarootdir_seen=yes;;
16316*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16318$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 ac_datarootdir_hack='
16322 s&@datadir@&$datadir&g
16323 s&@docdir@&$docdir&g
16324 s&@infodir@&$infodir&g
16325 s&@localedir@&$localedir&g
16326 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328esac
16329_ACEOF
16330
16331# Neutralize VPATH when `$srcdir' = `.'.
16332# Shell code in configure.ac might set extrasub.
16333# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016334cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16335ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016336$extrasub
16337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016338cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016339:t
16340/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016341s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016343s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344s&@srcdir@&$ac_srcdir&;t t
16345s&@abs_srcdir@&$ac_abs_srcdir&;t t
16346s&@top_srcdir@&$ac_top_srcdir&;t t
16347s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16348s&@builddir@&$ac_builddir&;t t
16349s&@abs_builddir@&$ac_abs_builddir&;t t
16350s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16351s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016352s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016353$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016354"
Victor Stinnere0be4232011-10-25 13:06:09 +020016355eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16356 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016359 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16360 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16361 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016364$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016365which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016366
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016369 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16370 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016371 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 ;;
16374 :H)
16375 #
16376 # CONFIG_HEADER
16377 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016379 {
16380 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016381 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16382 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016383 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016384 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16386$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016387 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016389 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016391 fi
16392 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016393 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016395 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399
16400 esac
16401
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016402
16403 case $ac_file$ac_mode in
16404 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16405
16406 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407done # for ac_tag
16408
Guido van Rossum627b2d71993-12-24 10:39:16 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016411_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016412ac_clean_files=$ac_clean_files_save
16413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016415 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
16418# configure is writing to config.log, and then calls config.status.
16419# config.status does its own redirection, appending to config.log.
16420# Unfortunately, on DOS this fails, as config.log is still kept open
16421# by configure, so config.status won't be able to write to it; its
16422# output is simply discarded. So we exec the FD to /dev/null,
16423# effectively closing config.log, so it can be properly (re)opened and
16424# appended to by config.status. When coming back to configure, we
16425# need to make the FD available again.
16426if test "$no_create" != yes; then
16427 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016428 ac_config_status_args=
16429 test "$silent" = yes &&
16430 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016432 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 exec 5>>config.log
16434 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16435 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016436 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016437fi
16438if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16440$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016441fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016442
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016444echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016445if test ! -f Modules/Setup
16446then
16447 cp $srcdir/Modules/Setup.dist Modules/Setup
16448fi
16449
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016450echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016451if test ! -f Modules/Setup.local
16452then
16453 echo "# Edit this file for local setup changes" >Modules/Setup.local
16454fi
16455
16456echo "creating Makefile"
16457$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16458 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016459 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016460mv config.c Modules